ChatGPT-Next-Web icon indicating copy to clipboard operation
ChatGPT-Next-Web copied to clipboard

[Bug] Loading js Fail

Open 2451965602 opened this issue 5 months ago • 10 comments

Bug Description

There is a 404 error when loading the (https://chat.yourang.top/_next/static/chunks/webpack-65324f1f3e744e11.js) file, which causes the page to remain in a loading state.

Steps to Reproduce

Visiting web

Expected Behavior

200 ok

Screenshots

screenshot-1708955309753

Deployment Method

  • [X] Docker
  • [ ] Vercel
  • [ ] Server

Desktop OS

Windows11

Desktop Browser

Edge

Desktop Browser Version

No response

Smartphone Device

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Browser Version

No response

Additional Logs

No response

2451965602 avatar Feb 26 '24 14:02 2451965602

Are you using the latest version on your website?

H0llyW00dzZ avatar Feb 26 '24 14:02 H0llyW00dzZ

i had the same problem using the latest docker version ,But when I turn off the CDN, there's no problem accessing the origin site directly

zhaojie199512 avatar Feb 26 '24 14:02 zhaojie199512

i had the same problem using the latest docker version

maybe cause this one ff166f7b4cf52be5716fb93b7c0f3c872def2ef5, because last version it's nothing, none bug fixes as well

H0llyW00dzZ avatar Feb 26 '24 14:02 H0llyW00dzZ

@zhaojie199512 could you share the docker image hash so that we could try reproduce this issue?

fred-bf avatar Feb 26 '24 14:02 fred-bf

@H0llyW00dzZ Its not likely, the issue here showing that client side cannot load compiled js file. Not relevant to making request to LLM api service.

fred-bf avatar Feb 26 '24 14:02 fred-bf

@zhaojie199512 could you share the docker image hash so that we could try reproduce this issue? sha256:e286024c3691048a2f57bdd253d2b333d3ecff563819c97616814621a5e53373

zhaojie199512 avatar Feb 26 '24 14:02 zhaojie199512

@H0llyW00dzZ Its not likely, the issue here showing that client side cannot load compiled js file. Not relevant to making request to LLM api service.

It's weird,,

I haven't encountered this problem with my fork.

H0llyW00dzZ avatar Feb 26 '24 15:02 H0llyW00dzZ

您能否共享 docker 映像哈希值,以便我们可以尝试重现此问题?

sha256:e286024c3691048a2f57bdd253d2b333d3ecff563819c97616814621a5e53373 在主机中执行了curl 命令返回的html代码依旧为 404 notfound

2451965602 avatar Feb 26 '24 15:02 2451965602

Bot detected the issue body's language is not English, translate it automatically.


Can you share the docker image hash so we can try to reproduce the issue?

sha256:e286024c3691048a2f57bdd253d2b333d3ecff563819c97616814621a5e53373 The html code returned by executing the curl command on the host is still 404 notfound.

Issues-translate-bot avatar Feb 26 '24 15:02 Issues-translate-bot

i had the same problem using the latest docker version ,But when I turn off the CDN, there's no problem accessing the origin site directly

I mapped the container's port 3000 to 3001 and executed the following command: curl 127.0.0.1:3001/_next/static/chunks/webpack-65324f1f3e744e11.js The response was: <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-56d8644ed16774eb.js" defer=""></script><script src="/_next/static/chunks/framework-4498e84bb0ba1830.js" defer=""></script><script src="/_next/static/chunks/main-69c6a49da1f94a59.js" defer=""></script><script src="/_next/static/chunks/pages/_app-0fe44225c17aa1f2.js" defer=""></script><script src="/_next/static/chunks/pages/_error-a73f64b4ecbfa014.js" defer=""></script><script src="/_next/static/mGPk_GhsgFpnso-1olNFg/_buildManifest.js" defer=""></script><script src="/_next/static/mGPk_GhsgFpnso-1olNFg/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"mGPk_GhsgFpnso-1olNFg","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>

2451965602 avatar Feb 26 '24 15:02 2451965602

i had the same problem using the latest docker version ,But when I turn off the CDN, there's no problem accessing the origin site directly

I mapped the container's port 3000 to 3001 and executed the following command: curl 127.0.0.1:3001/_next/static/chunks/webpack-65324f1f3e744e11.js The response was: <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-56d8644ed16774eb.js" defer=""></script><script src="/_next/static/chunks/framework-4498e84bb0ba1830.js" defer=""></script><script src="/_next/static/chunks/main-69c6a49da1f94a59.js" defer=""></script><script src="/_next/static/chunks/pages/_app-0fe44225c17aa1f2.js" defer=""></script><script src="/_next/static/chunks/pages/_error-a73f64b4ecbfa014.js" defer=""></script><script src="/_next/static/mGPk_GhsgFpnso-1olNFg/_buildManifest.js" defer=""></script><script src="/_next/static/mGPk_GhsgFpnso-1olNFg/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"mGPk_GhsgFpnso-1olNFg","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>

I've encountered a similar issue in my environment where I was using Azure Front Door as the CDN. The problem reoccurred after I did a Docker pull to update the image.

In fact, running the command "_curl 127.0.0.1:3001/next/static/chunks/webpack-65324f1f3e744e11.js" after bypassing the CDN was not right, because the new Docker image did not contain "webpack-65324f1f3e744e11.js" file.

If you need to verify that Main page conditions, please try accessing 127.0.0.1:3001 directly in your browser after bypassing the CDN. It is expected to work correctly.

The final solution is to perform a purge of all caches in your CDN and wait for some time. If you have other layers of caching enabled, please remember to clear all cache at each level after updating docker image.

Using Azure Front Door as an example, you would need to do the following (most other CDN products have a similar cache clearing feature):

image


中文回复:

我在我的环境中遇到跟你相似的问题,我使用了AzureFrontDoor作为CDN。当时我在Docker pull更新Image之后问题就复现了。

实际上你在绕过CDN之后运行 命令 “curl 127.0.0.1:3001/_next/static/chunks/webpack-65324f1f3e744e11.js” 是一个错误的行为,因为新的Docker Image中并不包含“webpack-65324f1f3e744e11.js”。

如果你需要验证是否可以正常访问的话,请直在绕过CDN之后直接使用浏览器访问 127.0.0.1:3001,预计是可以工作正常的。

那么最终解决方法是,请在你的CDN中执行Purge所有缓存,并等待一段时间。如果你还有其他的中间层开启了缓存,请记住在更新Image之后对每一级缓存都执行清理操作。

AndyX-Net avatar Feb 27 '24 02:02 AndyX-Net

@2451965602 @zhaojie199512 I couldnt match the sha in recent releases, could you share the version tag of your docker images? @AndyX-Net just mentioned a possible reason when your cdn havent update some js index file, you could also try to prune you CDN cache to check whether the issue still exists

fred-bf avatar Feb 27 '24 06:02 fred-bf

i had the same problem using the latest docker version ,But when I turn off the CDN, there's no problem accessing the origin site directly

I mapped the container's port 3000 to 3001 and executed the following command: curl 127.0.0.1:3001/_next/static/chunks/webpack-65324f1f3e744e11.js The response was: <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>404: This page could not be found</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-56d8644ed16774eb.js" defer=""></script><script src="/_next/static/chunks/framework-4498e84bb0ba1830.js" defer=""></script><script src="/_next/static/chunks/main-69c6a49da1f94a59.js" defer=""></script><script src="/_next/static/chunks/pages/_app-0fe44225c17aa1f2.js" defer=""></script><script src="/_next/static/chunks/pages/_error-a73f64b4ecbfa014.js" defer=""></script><script src="/_next/static/mGPk_GhsgFpnso-1olNFg/_buildManifest.js" defer=""></script><script src="/_next/static/mGPk_GhsgFpnso-1olNFg/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">This page could not be found<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"mGPk_GhsgFpnso-1olNFg","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>

I've encountered a similar issue in my environment where I was using Azure Front Door as the CDN. The problem reoccurred after I did a Docker pull to update the image.

In fact, running the command "_curl 127.0.0.1:3001/next/static/chunks/webpack-65324f1f3e744e11.js" after bypassing the CDN was not right, because the new Docker image did not contain "webpack-65324f1f3e744e11.js" file.

If you need to verify that Main page conditions, please try accessing 127.0.0.1:3001 directly in your browser after bypassing the CDN. It is expected to work correctly.

The final solution is to perform a purge of all caches in your CDN and wait for some time. If you have other layers of caching enabled, please remember to clear all cache at each level after updating docker image.

Using Azure Front Door as an example, you would need to do the following (most other CDN products have a similar cache clearing feature):

image

中文回复:

我在我的环境中遇到跟你相似的问题,我使用了AzureFrontDoor作为CDN。当时我在Docker pull更新Image之后问题就复现了。

实际上你在绕过CDN之后运行 命令 “curl 127.0.0.1:3001/_next/static/chunks/webpack-65324f1f3e744e11.js” 是一个错误的行为,因为新的Docker Image中并不包含“webpack-65324f1f3e744e11.js”。

如果你需要验证是否可以正常访问的话,请直在绕过CDN之后直接使用浏览器访问 127.0.0.1:3001,预计是可以工作正常的。

那么最终解决方法是,请在你的CDN中执行Purge所有缓存,并等待一段时间。如果你还有其他的中间层开启了缓存,请记住在更新Image之后对每一级缓存都执行清理操作。

Thank you for your method, the problem has been solved

2451965602 avatar Feb 27 '24 06:02 2451965602

@2451965602 @zhaojie199512 I couldnt match the sha in recent releases, could you share the version tag of your docker images? @AndyX-Net just mentioned a possible reason when your cdn havent update some js index file, you could also try to prune you CDN cache to check whether the issue still exists

The images tag is [yidadaa/chatgpt-next-web:latest@sha256:e286024c3691048a2f57bdd253d2b333d3ecff563819c97616814621a5e53373]

2451965602 avatar Feb 27 '24 07:02 2451965602