Next.js developers see errors when using server actions
11 posts since Jan 2024, all from GitHub.
“Link to the code that reproduces this issue https://github.com/huseyinbuyukdere/temp issue gzip next To Reproduce Start the application in development mode using next dev. Create an API route under the App Router, e.g., /app/api/example/route.js Example Api Route Send a GET…”
“Bug Description Bug description In the next.js docs, it is mentioned that the PosthogPageView needs to be dynamically imported at the layout level, which usually is a server component. I did it, and that's what I get: Please describe. If this affects the front end, screenshots…”
“Link to the code that reproduces this issue https://codesandbox.io/p/sandbox/next js forked slktwp To Reproduce When start my application, my header is visible in the browser. This is causing the below vulnerability issue 1. Untrusted user input in response header will result in…”
Several developers are encountering issues with Next.js, including problems with redirects, HTTP headers, and constant output within template strings. These issues often manifest as 404 errors or unexpected behavior in API routes.
SOURCES (11)
“Testing 258369 <img width="1386" height="750" alt="Image" src="https://github.com/user attachments/assets/9c1ca54e 3e0d 43ca aa75 2d7e021fc915" / Doesn't let me copy the error nor does the agent know to look at the opened app”
“Link to the code that reproduces this issue https://github.com/huseyinbuyukdere/temp issue gzip next To Reproduce Start the application in development mode using next dev. Create an API route under the App Router, e.g., /app/api/example/route.js Example Api Route Send a GET request to the API route with curl curl H "Accept Encoding: gzip" http://localhost:3000/api/example Observe the response headers and payload. Current vs. Expected behavior Current vs. Expected behavior bash Operating System:”
“Link to the code that reproduces this issue https://github.com/Ethan Arrowood/next issue repro To Reproduce Follow readme in https://github.com/Ethan Arrowood/next issue repro Or: 1. Generate a new nextjs app, npx create next app . Called it my app 2. As a sibling to the next app created in step 1, create a new directory next transitive 3. Add a package.json with the content: { "dependencies": { "next app": "file:../my app" } } 4. cd into next transitive and run npm install install links (the op”
“Bug Description Bug description In the next.js docs, it is mentioned that the PosthogPageView needs to be dynamically imported at the layout level, which usually is a server component. I did it, and that's what I get: Please describe. If this affects the front end, screenshots would be of great help. If you are on PostHog Cloud it would be really valuable if you can share any links where the problem occurs. This speeds up our ability to troubleshoot tremendously. Debug info”
“Link to the code that reproduces this issue https://codesandbox.io/p/sandbox/next js forked slktwp To Reproduce When start my application, my header is visible in the browser. This is causing the below vulnerability issue 1. Untrusted user input in response header will result in HTTP Header Injection or Response Splitting Attacks.\n 2. This application allows user controlled URLs to be passed directly to HTTP client libraries. This can result in Server Side Request Forgery (SSRF). SSRF refers to”
“Link to the code that reproduces this issue https://github.com/okcoker/vercel bug report To Reproduce 1. Start the application 2. Inspect the output on the <main element 3. See inline style output as style="margin top:30px;height:calc(100vh [object Object]px)" Current vs. Expected behavior I expected to see the style output as style="margin top:30px;height:calc(100vh 30px)" Provide environment information Which area(s) are affected? (Select all that apply) Output (export/standalone) Which stage(”
“Link to the code that reproduces this issue https://github.com/lukemorton/next testing To Reproduce 1. Add admin.localhost to /etc/hosts 2. Run development server 3. Navigate to http://admin.localhost:3000/a 4. Submit form Current vs. Expected behavior When you submit the form, the redirect in the server action attempts to redirect to /b but 404s instead even though the URL exists. If you refresh the page works. In the example attached there is also a <Link / on /a which navigates fine to /b. Ap”
“Link to the code that reproduces this issue https://github.com/ant design/ant design/issues/48758 To Reproduce Hi, I'm the member of antd team. Recently get report with build perf issue of Next.js: https://github.com/ant design/ant design/issues/48758 After dig, found that Next.js has the perf issue with long string .concat function. Pls help to check on this. Here is the workaround PR on antd side: https://github.com/react component/async validator/pull/9 The research report (PR background part”
“Link to the code that reproduces this issue https://github.com/zhangwei900808/next issue demo To Reproduce 1、clone project 2、pnpm install 3、pnpm run dev 4、open the page and you can see chrome console output: Uncaught SyntaxError: Invalid or unexpected token 5、same minutes you can see error:Uncaught ChunkLoadError: Loading chunk app/layout failed. <img width="998" alt="image" src="https://github.com/vercel/next.js/assets/4385154/37de7c45 c9dc 442d 9360 e7c69d66f949" Current vs. Expected behavior”
“Link to the code that reproduces this issue https://codesandbox.io/p/devbox/root loading nested routes wzthqy To Reproduce 1. Start the application 2. Navigate to child route (root loading.js will be used as loading UI) 3. Navigate from child route to grandchild route (root loading.js will not be used as loading UI) Current vs. Expected behavior Based on (my understanding of) the docs, I would expect for loading.js to behave in a similar way as layout.js and error.js. In my example, the root lay”
“Link to the code that reproduces this issue https://github.com/Justinyu1618/nextjs issue test To Reproduce The issue happens inconsistently, and only when running the dev server. Try running a server action inside a client component. You may need to make a few edits or have the dev server continuously running for a while. 1. Clone the attached repo, which runs a server action inside a client component 2. yarn dev 3. Try refreshing the page several times, or make some edits. At some point, the is”
