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

Deployment fails. #88

Closed
shunki-github opened this issue Oct 30, 2021 · 6 comments
Closed

Deployment fails. #88

shunki-github opened this issue Oct 30, 2021 · 6 comments

Comments

@shunki-github
Copy link

After setting up stripe, I try to deploy and it fails.
The error is as follows

Unhandled error during request: FetchError: invalid json response body at https://---.supabase.co/rest/v1/products?

It seems that there is a problem with the supabase setting, please let me know how to solve it.

@chrismendes
Copy link

chrismendes commented Oct 31, 2021

Same problem:

FetchError: invalid json response body at https://....supabase.co/rest/v1/products?select=*%2Cprices%28*%29&active=eq.true&prices.active=eq.true&order=metadata-%3Eindex.asc.nullslast&%22prices%22.order=unit_amount.asc.nullslast reason: Unexpected token < in JSON at position 0 at /Users/chrismendes/Documents/Projects/Stripe/node_modules/node-fetch/lib/index.js:272:32 at processTicksAndRejections (node:internal/process/task_queues:96:5) { type: 'invalid-json' }

Have followed the readme file to the letter. Stripe products/prices in. Webhooks ready. Keys and environment variables done. Even cleared all test data inside Stripe account. Same error when developing locally or deploying on Vercel.

I can't seem to find any presence of a schema or database configuration inside Supabase. Each page within the Supabase dashboard just renders the loading spinner without displaying anything, and then eventually showing, "Error connecting to API".

It was via the Vercel deploy process and the Supabase integration that produced our Supabase account for this project. But seemingly the setup has failed after trying twice, and I don't know how to force a successful Supabase configuration (if indeed relevant).

Anyone have any ideas? Many thanks in advance.

@shunki-github
Copy link
Author

This error is more likely to occur when variables are incorrect.

However, I don't think all the variables I set in Stripe are incorrect.
It is possible that the webhook URL is different, I guess.

@SaamuelBy
Copy link

Same. Anyone have any ideas to solve it ?

Many thanks

@JannaGilleland
Copy link

JannaGilleland commented Nov 7, 2021

I had the same issue, but when I followed the old instructions and configured supabase manually, it worked for me.
Here is a link to the old instructions:
https://github.com/vercel/nextjs-subscription-payments/blob/745fef89ff5b1c01115dd7161ddafd13ce330afd/README.md#setup

@shunki-github
Copy link
Author

shunki-github commented Nov 8, 2021

#88 (comment)

I adopted that method and it worked!
Thank you!

@chrismendes
Copy link

I had the same issue, but when I followed the old instructions and configured supabase manually, it worked for me. Here is a link to the old instructions: https://github.com/vercel/nextjs-subscription-payments/blob/745fef89ff5b1c01115dd7161ddafd13ce330afd/README.md#setup

Superstar! Worked for me too. Many thanks @JannaGilleland for taking the time to help. Very much appreciated, thank you.

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

4 participants