hamster1963 / nezha-dash

A simple dashboard for nezha.
https://nezhadash-docs.buycoffee.top
Apache License 2.0
1.09k stars 789 forks source link

出现了"请检查您的环境变量并检查服务器控制台"问题 #134

Closed detesion closed 4 days ago

detesion commented 4 days ago

这是我的环境变量

image

这是构建日志

image

以及最终呈现的样子

image

在前两天是可以的,但是昨天突然间就出现这个样子了,使用的dashboard版本是v0.20.13,agent版本是0.20.5。希望可以知道我下一步要怎么排查,如果需要更多的信息,请告诉我。感谢

hamster1963 commented 4 days ago

请问baseurl是使用域名连接的吗?cloudflare部署不支持ip直连

detesion commented 4 days ago

请问baseurl是使用域名连接的吗?cloudflare部署不支持ip直连

是的是的,用的域名

hamster1963 commented 4 days ago

可以尝试更换token 然后重新部署一下试一试

detesion commented 4 days ago

可以尝试更换token 然后重新部署一下试一试

好的,我去试试看

detesion commented 4 days ago

可以尝试更换token 然后重新部署一下试一试

问题依旧,打开还是图三那个界面

hamster1963 commented 4 days ago

请检查所填写baseURL直都可以正确跳转到哪吒监控仪表盘,如果还不行,可以f12打开开发者工具查看接口返回错误日志,如没有错误日志,可以查看cloudflare的日志https://developers.cloudflare.com/pages/functions/debugging-and-logging/

hamster1963 commented 4 days ago

可通过https://t.me/+nTtoIdM_4eE2YWRl联系到我

detesion commented 4 days ago

https://developers.cloudflare.com/pages/functions/debugging-and-logging/

image

是这样的吗

hamster1963 commented 4 days ago

对,你点开 api/server 相关接口 看看日志

detesion commented 4 days ago

对,你点开 api/server 相关接口 看看日志

{
  "truncated": false,
  "executionModel": "stateless",
  "outcome": "ok",
  "scriptVersion": {
    "id": "0622bce7-c612-440a-9380-4c5c94a1a7da"
  },
  "scriptName": "pages-worker--4380100-production",
  "diagnosticsChannelEvents": [],
  "exceptions": [],
  "logs": [
    {
      "message": [
        "TypeError: Illegal invocation: function called with incorrect `this` reference. See https://developers.cloudflare.com/workers/observability/errors/#illegal-invocation-errors for details."
      ],
      "level": "error",
      "timestamp": 1732945225765
    }
  ],
  "eventTimestamp": 1732945225196,
  "event": {
    "request": {
      "url": "https://nezha-dash-6uh.pages.dev/api/server",
      "method": "GET",
      "headers": {
        "accept": "*/*",
        "accept-encoding": "gzip, br",
        "accept-language": "zh-CN,zh;q=0.9,zh-TW;q=0.8",
        "cf-connecting-ip": "193.246.164.xxx",
        "cf-ipcountry": "HK",
        "cf-ray": "8ea880a95ef2xxxx",
        "cf-visitor": "{\"scheme\":\"https\"}",
        "connection": "Keep-Alive",
        "host": "nezha-dash-6uh.pages.dev",
        "priority": "u=1, i",
        "referer": "https://nezha-dash-6uh.pages.dev/",
        "sec-ch-ua": "\"Google Chrome\";v=\"131\", \"Chromium\";v=\"131\", \"Not_A Brand\";v=\"24\"",
        "sec-ch-ua-mobile": "?0",
        "sec-ch-ua-platform": "\"macOS\"",
        "sec-fetch-dest": "empty",
        "sec-fetch-mode": "cors",
        "sec-fetch-site": "same-origin",
        "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
        "x-forwarded-proto": "https",
        "x-real-ip": "193.246.164.xxx"
      },
      "cf": {
        "clientTcpRtt": 1,
        "longitude": "114.175xx",
        "httpProtocol": "HTTP/2",
        "tlsCipher": "AEAD-AES128-GCM-SHA256",
        "continent": "AS",
        "asn": 216354,
        "clientAcceptEncoding": "gzip, deflate, br, zstd",
        "country": "HK",
        "verifiedBotCategory": "",
        "tlsClientAuth": {
          "certIssuerDNLegacy": "",
          "certIssuerSKI": "",
          "certSubjectDNRFC2253": "",
          "certSubjectDNLegacy": "",
          "certFingerprintSHA256": "",
          "certNotBefore": "",
          "certSKI": "",
          "certSerial": "",
          "certIssuerDN": "",
          "certVerified": "NONE",
          "certNotAfter": "",
          "certSubjectDN": "",
          "certPresented": "0",
          "certRevoked": "0",
          "certIssuerSerial": "",
          "certIssuerDNRFC2253": "",
          "certFingerprintSHA1": ""
        },
        "tlsClientHelloLength": "1996",
        "tlsExportedAuthenticator": {
          "clientFinished": "1dcb309d9894xxxxxx",
          "clientHandshake": "2f77da12c0be5exxxxx",
          "serverHandshake": "9448a2d1c282cbxxxxx",
          "serverFinished": "9858ecdae0ab26bxxxxx"
        },
        "tlsVersion": "TLSv1.3",
        "city": "Hong Kong",
        "timezone": "Asia/Hong_Kong",
        "tlsClientExtensionsSha1": "tKDKEv5cF1uSxxxx",
        "edgeRequestKeepAliveStatus": 1,
        "requestPriority": "weight=220;exclusive=1",
        "latitude": "22.284xx",
        "tlsClientRandom": "HEi41hLVwGDXlxxxxxx",
        "asOrganization": "MisakaF Network",
        "colo": "HKG",
        "pagesHostName": "nezha-dash-6uh.pages.dev",
        "botManagement": {
          "corporateProxy": false,
          "verifiedBot": false,
          "jsDetection": {
            "passed": false
          },
          "staticResource": false,
          "detectionIds": {},
          "score": 99
        }
      }
    },
    "response": {
      "status": 500
    }
  },
  "id": 14
}

我做了些隐私的屏蔽,不知道有没有影响分析日志

hamster1963 commented 4 days ago

了解,可以尝试一下更新nezha-dash

https://buycoffee.top/blog/tech/nezha-upgrade

查看 cloudflare 更新部分

hamster1963 commented 4 days ago

近期cloudflare服务变更较大,如有其他问题可直接telegram与我交流

detesion commented 4 days ago

https://buycoffee.top/blog/tech/nezha-upgrade

近期cloudflare服务变更较大,如有其他问题可直接telegram与我交流

我现在是dev分支,需要切到稳定版分支嘛

hamster1963 commented 4 days ago

啊,你应该用cloudflare分支部署的,cloudflare-dev是内部测试分支

hamster1963 commented 4 days ago

可更新cloudflare分支后,在cloudflare pages重新创建部署一下,应该就没问题了

detesion commented 4 days ago

是的,我看有测试想着可能可以用到新特性所以就用的dev分支

detesion commented 4 days ago

我去重新部署一下吧

hamster1963 commented 4 days ago

是的,我看有测试想着可能可以用到新特性所以就用的dev分支

好的好的,看来我要把测试分支隐藏掉😂

detesion commented 4 days ago

恢复啦恢复啦,十分感谢~