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

Managing Subscription Throws a PSE Error #55

Closed
MaxBroome opened this issue Mar 30, 2024 · 8 comments
Closed

Managing Subscription Throws a PSE Error #55

MaxBroome opened this issue Mar 30, 2024 · 8 comments

Comments

@MaxBroome
Copy link

When logged in and clicking on "Manage Subscription" the user gets thrown an error page instead of going to the Stripe page.

Console log shows:

Preloading data for /account/billing/manage failed with the following error: Unknown error (PSE). If issue persists, please contact us. If this error is transient, you can ignore it. Otherwise, consider disabling preloading for this route. This route was preloaded due to a data-sveltekit-preload-data attribute. See https://kit.svelte.dev/docs/link-options for more info

and

GET http://localhost:5173/account/billing/manage 500 (Internal Server Error)

Screenshot:

image

@scosman
Copy link
Contributor

scosman commented Mar 30, 2024

Can you share config?

saasstarter.work runs on main and this issue doesn’t repo, so likely a config issue.

@scosman
Copy link
Contributor

scosman commented Mar 31, 2024

This is working fine on saasstarter.work so it looks like an issue with your config. Did you set PRIVATE_STRIPE_API_KEY?

Closing for no repo. You can always log the error (search "PSE" for location), which will give you exception details.

@scosman scosman closed this as completed Mar 31, 2024
@MaxBroome
Copy link
Author

Fixed! There was just an error in Stripe after I deleted all of my test data, I didn't re-setup the Customer Portal page.

Logs
Customer ID obtained, creating billing portal session Error creating billing portal session: StripeInvalidRequestError: You can’t create a portal session in test mode until you save your customer portal settings in test mode at https://dashboard.stripe.com/test/settings/billing/portal. at StripeError.generate (file:///C:/Users/broom/Documents/VSCode/ScoreScrape.io/Testing/Website/node_modules/stripe/esm/Error.js:7:20) at res.toJSON.then.StripeAPIError.message (file:///C:/Users/broom/Documents/VSCode/ScoreScrape.io/Testing/Website/node_modules/stripe/esm/RequestSender.js:102:43) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { type: 'StripeInvalidRequestError', raw: { message: 'You can’t create a portal session in test mode until you save your customer portal settings in test mode at https://dashboard.stripe.com/test/settings/billing/portal.', request_log_url: 'https://dashboard.stripe.com/test/logs/req_qZCTIr5ArM73Bp?t=1712812495', type: 'invalid_request_error',

@zamakowany
Copy link

I have the same problem, if you still remember where you got the logs from I would be very grateful for the answer.

@scosman
Copy link
Contributor

scosman commented Jul 21, 2024

@zamakowany Search "PSE" in the code, and add a console.log(e) there to see the stripe error in more detail. Prob a setup issue.

@zamakowany
Copy link

Thanks, I'll give it a try

@zamakowany
Copy link

Which file to look in?

@evlim
Copy link
Contributor

evlim commented Oct 24, 2024

Which file to look in?

\src\routes(admin)\account(menu)\billing\manage+page.server.ts

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