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

Issue with APP_WEBHOOK_SECRET Environment Variable Not Being Recognized During Build #105

Open
JanusChoi opened this issue Mar 31, 2024 · 4 comments

Comments

@JanusChoi
Copy link

JanusChoi commented Mar 31, 2024

Hello,

I am encountering an issue when deploying an application on Vercel, where the build process fails due to the APP_WEBHOOK_SECRET environment variable apparently not being recognized or found, despite being set.

Here's the error message I receive during deployment:

Error: MISSING APP_WEBHOOK_SECRET!
    at 46379 (/vercel/path0/.next/server/app/astria/prompt-webhook/route.js:1:1562)
    ...
> Build error occurred
Error: Failed to collect page data for /astria/prompt-webhook
    ...

I have confirmed that the APP_WEBHOOK_SECRET is a randomly generated string (in this case, "yousayitsarandomstring?") as suggested in the documentation/README, and I've made sure to set it correctly in the project settings on Vercel.

Here are the steps I've taken to troubleshoot without success:

  1. Double-checked that the environment variable is set in the Vercel project settings.
  2. Ensured that the variable is being correctly referenced in the code using process.env.APP_WEBHOOK_SECRET.
  3. Attempted to deploy with a simpler value for the environment variable to rule out issues with special characters.
  4. Reviewed the Vercel documentation and existing issues for any similar cases or additional configuration steps I might have missed.

I am wondering if there are any known issues with environment variable recognition during the build phase on Vercel, or if there are additional steps I need to take to ensure the environment variable is correctly passed and recognized by the build environment.

Any guidance or suggestions would be greatly appreciated.

Thank you!

@fred3105
Copy link

fred3105 commented Apr 5, 2024

Hey Janus,

I'm also having issues with Astria's callbacks, I would suggest double checking astria/train-model/route.ts and make sure that your callback url contains &webhook_secret=${appWebhookSecret}

If the url is correct, the problem likely comes from Astria. Are you using the mock environment for Astria or the production environment ?

@suifeng8619
Copy link

You need to add the APP_WEBHOOK_SECRET and ASTRIA_API_KEY fields in the background

@matr1xp
Copy link

matr1xp commented Aug 13, 2024

Same issue here, tried adding variables in Vercel's Environment variables dashboard, re-run the deployment and it still fails with error:
Error: MISSING APP_WEBHOOK_SECRET! at 46379 (/vercel/path0/.next/server/app/astria/prompt-webhook/route.js:1:1562)
Please fix. Thank you.

@SnoochiMink
Copy link

SnoochiMink commented Jan 10, 2025

error1
same here. every redeploy its either missing api key or missing webhook secret. both should be fine

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

5 participants