-
Notifications
You must be signed in to change notification settings - Fork 26.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chunk Load Error using dynamic routes ([lang]) #62479
Comments
I managed to remove the next-intl library and the error still persists. it seems it's occurring when a server component has client components within a dynamic route, so not really dependednt on any external libraries. |
I had a similar problem. You should add env NEXTAUTH_URL=your_domain |
I'm doing that locally for another project, but it doesn't make any difference |
I was able to fix the error. It's related to the previous errors on dynamic routs. There was a problem in the encoding url in server.js The url was all lower case having the encoded square brackets lowercase therefore not properly encoded. (%5b instead of %5B) I added a replace statement before the url processing. I'll post the code later for awareness |
@leof240 Hey Leof 👋 Any chance you got that code handy? I'm currently experiencing an almost identical issue except my uri is getting encoded twice around my slug. So, I'm getting %255B instead of %5B... incredibly frustrating. Using Next v13.5.6. Appreciate any help! |
Link to the code that reproduces this issue
https://github.com/leof240/chunk_load_error_nextauth-nextintl
To Reproduce
Current vs. Expected behavior
Current:
![Screenshot 2024-02-24 at 12 47 07](https://private-user-images.githubusercontent.com/6764386/307517835-dbf5504f-e76e-4756-a70e-1dceff9bd02a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyNDA1ODAsIm5iZiI6MTcyNDI0MDI4MCwicGF0aCI6Ii82NzY0Mzg2LzMwNzUxNzgzNS1kYmY1NTA0Zi1lNzZlLTQ3NTYtYTcwZS0xZGNlZmY5YmQwMmEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjFUMTEzODAwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZjFiMDJmYmE1NmM3YTE2OGZjZThhZmE2ODY3YjNlOGFhOTlkNmJjNmVkMzk4MTFlNzJlZGI2NjQ4ZWVlMzAwNiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.ATjpI9xvaRURi6LYFD2lMTa1ZybGU6dLsDVPpCItJjk)
In development the site is working as expected.
in a production build and production environment, the site is throwing a Chunk Load Error on the page js file behind
the buttons on the page do not work
Expected:
The expected behaviour is to show a page with 2 buttons for signin and sign out. when clicking the signin button, the session is updated and after a page refresh is shown from the layout and the page.
it's also showing the page title translated into different languages for the /en, /fr, / it
Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure, App Router, Internationalization (i18n), Middleware / Edge (API routes, runtime)
Which stage(s) are affected? (Select all that apply)
Vercel (Deployed), Other (Deployed)
Additional context
the "next" package is updated to canary version ( 24 / 02 / 2024)
cannot reproduce the error on development environment with npm run start
The text was updated successfully, but these errors were encountered: