CLI to build and develop Next.js apps for Cloudflare Pages
### next-on-pages environment related information System: Platform: linux Arch: x64 Version: #202411060320 SMP PREEMPT_DYNAMIC Thu Nov 21 18:51:36 UTC 2024 CPU: (16) x64 AMD Ryzen 7 PRO 6850U with Radeon Graphics Memory: 14 GB Shell: /bin/bash Package Manager Used: npm (10.8.2) Relevant Packages: @cloudflare/next-on-pages: 1.13.7 vercel: 41.0.2 next: 15.1.5 ### Description When loading a `/login` route I was getting this error: ``` โ [ERROR] DOMException { code: 5, name: 'InvalidCharacterError', message: "atob() called with invalid base64-encoded data. (Only whitespace, '+', '/', alphanumeric ASCII, and up to two terminal '=' signs when the input data length is divisible by 4 are allowed.)", stack: "InvalidCharacterError: atob() called with invalid base64-encoded data. (Only whitespace, '+', '/', alphanumeric ASCII, and up to two terminal '=' signs when the input data length is divisible by 4 are allowed.)\n" + ' at _ (file:///home/user/src/cf-pages-next/.vercel/output/static/_worker.js/__next-on-pages-dist__/webpack/2792.js:1:1928)\n' + ' at a (file:///home/user/src/cf-pages-next/.vercel/output/static/_worker.js/__next-on-pages-dist__/functions/login.func.js:1:27434)\n' + ' at C (file:///home/user/src/cf-pages-next/.vercel/output/static/_worker.js/__next-on-pages-dist__/functions/login.func.js:1:28134)', digest: '1523712075' } ``` ### Reproduction Minimal reproduction: https://github.com/ts-web/cloudflare-pages-next-starter/tree/56cbebb81b00851bec1b26fede110b746fa9d24f I've narrowed this down to this server action function: ``` async () => { 'use server'; await new Promise((resolve) => { setTimeout(resolve, 2000); }); console.log('sign in', redirectUrl); } ``` - If the server action is within `page.tsx` the error does not appear. - If the server action is embedded in `@/components/SignIn`, the error appears. See the above reproduction commit for the bug. The commit preceding it is a working version. The buggy commit just moves the server action function to the `@/components/SignIn` module. ### Pages Deployment Method None ### Pages Deployment ID _No response_ ### Additional Information _No response_ ### Would you like to help? - [ ] Would you like to help fixing this bug?
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by ts-web and has received 2 comments.