Skip to content
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

When env key is change #5

Open
ChristopherAlphonse opened this issue Aug 4, 2024 · 12 comments
Open

When env key is change #5

ChristopherAlphonse opened this issue Aug 4, 2024 · 12 comments

Comments

@ChristopherAlphonse
Copy link

Something went wrong!
Request failed with status code 500
AxiosError: Request failed with status code 500 at settle (webpack-internal:///(rsc)/./node_modules/axios/lib/core/settle.js:24:12) at IncomingMessage.handleStreamEnd (webpack-internal:///(rsc)/./node_modules/axios/lib/adapters/http.js:629:71) at IncomingMessage.emit (node:events:532:35) at endReadableNT (node:internal/streams/readable:1696:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) at Axios.request (webpack-internal:///(rsc)/./node_modules/axios/lib/core/Axios.js:57:41) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
DIGEST: 60112185

Screenshot 2024-08-04 163856

@yehjxraymond
Copy link
Contributor

Hi can you help me understand how to reproduce the issue with some of the info:

Env: Window version?
Have you copied .env.example to .env?
Are there any console error in the browser??

@yehjxraymond
Copy link
Contributor

I've upgraded one of the package that might have caused this issue, can you pull the latest code and see if that fixes it?

@ChristopherAlphonse
Copy link
Author

when i get the key from my profile the server return 500 after writing two articles

@ChristopherAlphonse
Copy link
Author

this works to view: NEXT_PUBLIC_BLOG_ID=clvlugru90000o4g8ahxp069s but once I add my own ID it no longer works

@TheRealDzox
Copy link

TheRealDzox commented Aug 7, 2024

Same issue here. If I want to deploy the site to Vercel it throws this error:

Error: NEXT_PUBLIC_BLOG_ID is missing
    at /vercel/path0/.next/server/app/api/og-image/route.js:1:3458
    at 1542 (/vercel/path0/.next/server/app/api/og-image/route.js:1:4067)
    at t (/vercel/path0/.next/server/webpack-runtime.js:1:128)
    at 3770 (/vercel/path0/.next/server/app/api/og-image/route.js:1:4119)
    at t (/vercel/path0/.next/server/webpack-runtime.js:1:128)
    at 5020 (/vercel/path0/.next/server/app/api/og-image/route.js:1:584)
    at t (/vercel/path0/.next/server/webpack-runtime.js:1:128)
    at r (/vercel/path0/.next/server/app/api/og-image/route.js:1:5445)
    at /vercel/path0/.next/server/app/api/og-image/route.js:1:5472
    at t.X (/vercel/path0/.next/server/webpack-runtime.js:1:1206)
Build error occurred
Error: Failed to collect page data for /api/og-image
    at /vercel/path0/node_modules/next/dist/build/utils.js:1268:15
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  type: 'Error'
}

Edit:
After commiting the .env with the example the deploy worked. (I will definetly not do this with my own BlogID).
Hopefully you find a fix for this :)

@ChristopherAlphonse
Copy link
Author

@TheRealDzox yes once i add my own blog id it failed after two blogs, and failed to navigate to any pages taps

@yehjxraymond
Copy link
Contributor

Hi @ChristopherAlphonse, can you perform the following:

Pull the latest code from this repo again or upgrade the wisp client in package.json to the following and run npm i:

"@wisp-cms/client": "^0.0.14",

We've recently addressed two separate issues that led to a 500 error, the first being a dated client calling a redirected endpoint and the second was a failure of the related post endpoint when there's a post without featured image is returned.

If this doesn't solve the issue, I'll love to get into a call with you to resolve it together.

@yehjxraymond
Copy link
Contributor

@TheRealDzox You are missing the env variable on Vercel, it's a separate issue than what Christopher encountered. The reason is that the .env file does not get pushed (or it can pose security risk).

To solve the issue, you'll have to add the env variable on Vercel:

  1. Log in to vercel and go to your project page and click "Settings"
    CleanShot 2024-08-08 at 11 07 52
  2. Insert your env variable in and save it.
    CleanShot 2024-08-08 at 11 09 33
  3. Redeploy your site
    CleanShot 2024-08-08 at 11 11 00

@TheRealDzox
Copy link

TheRealDzox commented Aug 8, 2024

Thanks :)
Had the env configured in the team settings.

@ChristopherAlphonse
Copy link
Author

@yehjxraymond let hop on a call later.

@yehjxraymond
Copy link
Contributor

@ChristopherAlphonse Please let me know if you've tried the mentioned method. Also lmk know an email I can contact you at.

@ChristopherAlphonse
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants