500

TypeError in /archives//20.html

Cannot read property 'length' of undefined
app/controller/archives.js:49:65
ArchivesController.index
if (url.indexOf("tag") != "-1") { await ctx.render("archivesTag.ejs", { data: archivesData }) } else { if (url.indexOf("html") != "-1") { const a = await ctx.service.archivesTemplate.addviews() for (var i = 0; i < linksData[0].content[0].infoContent.length; i++) { archivesData.archives[7].content = archivesData.archives[7].content.replace( new RegExp(linksData[0].content[0].infoContent[i], "g"), "<a class='links' target='_blank' href='" + linksData[0].content[0].linksContent[i] + "'>" +
internal/process/task_queues.js:97:5
processTicksAndRejections
async node_modules/egg-development/app/middleware/egg_loader_trace.js:9:50
node_modules/egg-security/lib/middlewares/xssProtection.js:7:5
async xssProtection
const utils = require('../utils'); module.exports = options => { return async function xssProtection(ctx, next) { await next(); const opts = utils.merge(options, ctx.securityOptions.xssProtection); if (utils.checkIfIgnore(opts, ctx)) return; ctx.set('x-xss-protection', opts.value);
node_modules/egg-security/lib/middlewares/nosniff.js:8:5
async nosniff
const statuses = require('statuses'); const utils = require('../utils'); module.exports = options => { return async function nosniff(ctx, next) { await next(); // ignore redirect response if (statuses.redirect[ctx.status]) return; const opts = utils.merge(options, ctx.securityOptions.nosniff);
node_modules/egg-security/lib/middlewares/noopen.js:8:5
async noopen
const utils = require('../utils'); // @see http://blogs.msdn.com/b/ieinternals/archive/2009/06/30/internet-explorer-custom-http-headers.aspx module.exports = options => { return async function noopen(ctx, next) { await next(); const opts = utils.merge(options, ctx.securityOptions.noopen); if (utils.checkIfIgnore(opts, ctx)) return; ctx.set('x-download-options', 'noopen');
node_modules/koa-session/index.js:41:7
async session
return async function session(ctx, next) { const sess = ctx[CONTEXT_SESSION]; if (sess.store) await sess.initFromExternal(); try { await next(); } catch (err) { throw err; } finally { if (opts.autoCommit) { await sess.commit();
node_modules/koa-bodyparser/index.js:78:5
async bodyParser
} else { throw err; } } await next(); }; async function parseBody(ctx) { if ( enableJson &&
async node_modules/koa-static-cache/index.js:41:56

Request Details

URI
/archives//20.html
Request Method
GET
HTTP Version
Connection
close

Headers

host
127.0.0.1:7001
x-request-id
da8dc20ddcd7d96b1bcbb29eeeba8271
x-real-ip
18.209.63.120
x-forwarded-for
18.209.63.120, 10.255.129.128, 121.36.12.99, 10.255.226.192
x-forwarded-host
test-guanwang-vhall.vhallyun.com
x-forwarded-port
80
x-forwarded-proto
https
x-forwarded-scheme
https
x-scheme
https
x-original-forwarded-for
18.209.63.120, 10.255.129.128, 121.36.12.99
accept
*/*
user-agent
claudebot

Cookies

AppInfo

baseDir
/application
config
{
  session: {
    maxAge: 86400000,
    key: 'EGG_SESS',
    httpOnly: true,
    encrypt: true,
    logValue: true,
    overwrite: true,
    signed: true,
    autoCommit: true,
    encode: [Function: encode],
    decode: [Function: decode],
    genid: [Function: v4]
  },
  security: {
    domainWhiteList: [],
    protocolWhiteList: [],
    defaultMiddleware: 'csrf,hsts,methodnoallow,noopen,nosniff,csp,xssProtection,xframe,dta',
    csrf: {
      enable: true,
      type: 'ctoken',
      ignoreJSON: false,
      useSession: false,
      cookieName: 'csrfToken',
      sessionName: 'csrfToken',
      headerName: 'x-csrf-token',
      bodyName: '_csrf',
      queryName: '_csrf',
      supportedRequests: [Array],
      refererWhiteList: [],
      matching: [Function]
    },
    xframe: { enable: false, value: 'SAMEORIGIN' },
    hsts: { enable: false, maxAge: 31536000, includeSubdomains: false },
    dta: { enable: true, matching: [Function] },
    methodnoallow: { enable: true, matching: [Function] },
    noopen: { enable: true, matching: [Function] },
    nosniff: { enable: true, matching: [Function] },
    referrerPolicy: { enable: false, value: 'no-referrer-when-downgrade' },
    xssProtection: { enable: true, value: '1; mode=block', matching: [Function] },
    csp: { enable: false, policy: {} },
    ssrf: { ipBlackList: null, ipExceptionList: null, checkAddress: null },
    _protocolWhiteListSet: Set { 'http', 'https', 'file', 'data' }
  },
  helper: { shtml: {} },
  jsonp: { limit: 50, callback: [ '_callback', 'callback' ], csrf: false },
  onerror: {
    errorPageUrl: '',
    appErrorFilter: null,
    templatePath: '/application/node_modules/egg-onerror/lib/onerror_page.mustache'
  },
  i18n: {
    defaultLocale: 'en_US',
    dirs: [
      '/application/node_modules/egg-session/config/locales',
      '/application/node_modules/egg-security/config/locales',
      '/application/node_modules/egg-jsonp/config/locales',
      '/application/node_modules/egg-onerror/config/locales',
      '/application/node_modules/egg-i18n/config/locales',
      '/application/node_modules/egg-watcher/config/locales',
      '/application/node_modules/egg-schedule/config/locales',
      '/application/node_modules/egg-multipart/config/locales',
      '/application/node_modules/egg-development/config/locales',
      '/application/node_modules/egg-logrotator/config/locales',
      '/application/node_modules/egg-static/config/locales',
      '/application/node_modules/egg-view/config/locales',
      '/application/node_modules/egg-view-ejs/config/locales',
      '/application/node_modules/egg-axios-plus/config/locales',
      '/application/node_modules/egg/config/locales',
      '/application/config/locales'
    ],
    queryField: 'locale',
    cookieField: 'locale',
    cookieDomain: '',
    cookieMaxAge: '1y',
    functionName: '__'
  },
  watcher: {
    type: 'development',
    eventSources: {
      default: '/application/node_modules/egg-watcher/lib/event-sources/default',
      development: '/application/node_modules/egg-watcher/lib/event-sources/development'
    }
  },
  customLogger: {
    scheduleLogger: { consoleLevel: 'NONE', file: 'egg-schedule.log' }
  },
  schedule: { directory: [] },
  multipart: {
    mode: 'stream',
    autoFields: false,
    defaultCharset: 'utf8',
    fieldNameSize: 100,
    fieldSize: 102400,
    fields: 10,
    fileSize: 10485760,
    files: 10,
    fileExtensions: [],
    whitelist: null,
    allowArrayField: false,
    tmpdir: '/tmp/egg-multipart-tmp/vhall',
    cleanSchedule: { cron: '0 30 4 * * *', disable: false }
  },
  development: {
    watchDirs: [],
    ignoreDirs: [],
    fastReady: false,
    reloadOnDebug: true,
    overrideDefault: false,
    overrideIgnore: false
  },
  logrotator: {
    filesRotateByHour: null,
    hourDelimiter: '-',
    filesRotateBySize: null,
    maxFileSize: 52428800,
    maxFiles: 10,
    rotateDuration: 60000,
    maxDays: 31
  },
  static: {
    prefix: '/public',
    dir: '/application/app/public',
    dynamic: true,
    preload: false,
    buffer: true,
    maxFiles: 1000,
    maxAge: 31536000
  },
  view: {
    root: [ '/application/app/view' ],
    cache: false,
    defaultExtension: '.html',
    defaultViewEngine: '',
    mapping: { '.ejs': 'ejs' }
  },
  ejs: {
    root: '/application/app/view',
    cache: false,
    debug: false,
    compileDebug: true,
    delimiter: null,
    strict: false
  },
  axiosPlus: {
    headers: { common: [Object] },
    timeout: 5000,
    app: true,
    agent: false,
    baseURL: 'https://test-guanwang-api.vhallyun.com/'
  },
  env: 'local',
  name: 'vhall',
  keys: 'vhall_1621937424484_5519',
  cookies: {},
  proxy: false,
  maxIpsCount: 0,
  maxProxyCount: 0,
  protocolHeaders: 'x-forwarded-proto',
  ipHeaders: 'x-forwarded-for',
  hostHeaders: '',
  pkg: {
    name: 'vhall',
    version: '1.0.0',
    description: '',
    private: true,
    egg: { declarations: true },
    dependencies: {
      axios: '^0.21.1',
      egg: '^2.15.1',
      'egg-axios-plus': '^3.1.2',
      'egg-scripts': '^2.15.3',
      'egg-view-ejs': '^2.0.1',
      'egg-view-nunjucks': '^2.3.0',
      ws: '^3.3.2'
    },
    devDependencies: {
      autod: '^3.0.1',
      'autod-egg': '^1.1.0',
      'egg-bin': '^4.11.0',
      'egg-ci': '^1.11.0',
      'egg-mock': '^3.21.0',
      eslint: '^5.13.0',
      'eslint-config-egg': '^7.1.0'
    },
    engines: { node: '>=10.0.0' },
    scripts: {
      start: 'egg-scripts start --port=7001 --title=egg-server --ignore-stderr --env=prod',
      stop: 'egg-scripts stop --title=egg-server-vhall',
      dev: 'egg-bin dev',
      debug: 'egg-bin debug',
      test: 'npm run lint -- --fix && npm run test-local',
      'test-local': 'egg-bin test',
      cov: 'egg-bin cov',
      lint: 'eslint .',
      ci: 'npm run lint && npm run cov',
      autod: 'autod'
    },
    ci: { version: '10' },
    repository: { type: 'git', url: '' },
    author: '',
    license: 'MIT'
  },
  baseDir: '/application',
  HOME: '/root',
  rundir: '/application/run',
  dump: {
    ignore: Set {
      'pass',
      'pwd',
      'passd',
      'passwd',
      'password',
      'keys',
      'masterKey',
      'accessKey',
      /secret/i
    }
  },
  confusedConfigurations: {
    bodyparser: 'bodyParser',
    notFound: 'notfound',
    sitefile: 'siteFile',
    middlewares: 'middleware',
    httpClient: 'httpclient'
  },
  notfound: { pageUrl: '' },
  siteFile: {
    '/favicon.ico': <Buffer 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 ca 00 00 00 ca 08 06 00 00 00 e4 65 df a8 00 00 00 01 73 52 47 42 00 ae ce 1c e9 00 00 18 f9 ... 6413 more bytes>,
    cacheControl: 'public, max-age=2592000'
  },
  bodyParser: {
    enable: true,
    encoding: 'utf8',
    formLimit: '1mb',
    jsonLimit: '1mb',
    textLimit: '1mb',
    strict: true,
    queryString: {
      arrayLimit: 100,
      depth: 5,
      parameterLimit: 1000,
      allowDots: true
    },
    onerror: undefined,
    detectJSON: undefined,
    returnRawBody: true
  },
  logger: {
    dir: '/application/logs/vhall',
    encoding: 'utf8',
    env: 'local',
    level: 'INFO',
    consoleLevel: 'INFO',
    disableConsoleAfterReady: false,
    outputJSON: false,
    buffer: true,
    appLogName: 'vhall-web.log',
    coreLogName: 'egg-web.log',
    agentLogName: 'egg-agent.log',
    errorLogName: 'common-error.log',
    coreLogger: { consoleLevel: 'WARN' },
    allowDebugAtProd: false,
    enablePerformanceTimer: false,
    type: 'application'
  },
  httpclient: {
    enableDNSCache: false,
    dnsCacheLookupInterval: 10000,
    dnsCacheMaxLength: 1000,
    request: { timeout: 5000 },
    httpAgent: {
      keepAlive: true,
      freeSocketTimeout: 4000,
      maxSockets: 9007199254740991,
      maxFreeSockets: 256
    },
    httpsAgent: {
      keepAlive: true,
      freeSocketTimeout: 4000,
      maxSockets: 9007199254740991,
      maxFreeSockets: 256
    }
  },
  meta: { enable: true, logging: false },
  coreMiddleware: [
    'meta',
    'siteFile',
    'notfound',
    'static',
    'bodyParser',
    'overrideMethod',
    'session',
    'securities',
    'i18n',
    'eggLoaderTrace'
  ],
  workerStartTimeout: 600000,
  serverTimeout: null,
  cluster: { listen: { path: '', port: 7001, hostname: '' } },
  clusterClient: { maxWaitTime: 60000, responseTimeout: 60000 },
  onClientError: null,
  middleware: [],
  coreMiddlewares: [
    'meta',
    'siteFile',
    'notfound',
    'static',
    'bodyParser',
    'overrideMethod',
    'session',
    'securities',
    'i18n',
    'eggLoaderTrace'
  ],
  appMiddlewares: [],
  appMiddleware: [],
  multipartParseOptions: {
    autoFields: false,
    defCharset: 'utf8',
    limits: {
      fieldNameSize: 100,
      fieldSize: 102400,
      fields: 10,
      fileSize: 10485760,
      files: 10
    },
    checkFile: [Function: checkFile]
  }
}