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

Supabase tutorial a little out of date #432

Open
finallyblueskies opened this issue Dec 5, 2024 · 3 comments
Open

Supabase tutorial a little out of date #432

finallyblueskies opened this issue Dec 5, 2024 · 3 comments

Comments

@finallyblueskies
Copy link

finallyblueskies commented Dec 5, 2024

I'm adding this here for the sake of others also following the Supabase tutorial having run into the same issues as I did. If you complete the basic steps of the tutorial and run the application you will run into some flavor of the client side error:

[PowerSyncRemote] Error: Closed. Original cause [Error: [AUTHORIZATION] Authorization failed
  Generate a new JWT secret on Supabase. Cause: unrecognized configuration parameter "app.settings.jwt_secret"
    (severity "ERROR", file "guc.c", line 5710, routine "find_option")].

This is because the tutorial is missing a step in light of recent Supabase changes. When setting up your instance connection and enabling Supabase auth, you must now specify the JWT token, which you can copy and paste from your Supabase API settings:

image

Having done that, if you'd previously run the test application you may notice that nothing is happening when you try and create todos - no errors, no logs, nothing. To fix this, make sure you terminate any workers spun up by the test application before refreshing the page. On a Chromium you can do this at chrome://inspect/#workers.

This will spin them up anew and dislodge whatever misconfiguration had occurred - you should then be able to test the app.

@benitav
Copy link
Contributor

benitav commented Dec 9, 2024

@finallyblueskies thanks a lot for sharing this!

This is because the tutorial is missing a step in light of recent Supabase changes. When setting up your instance connection and enabling Supabase auth, you must now specify the JWT token, which you can copy and paste from your Supabase API settings

We updated the tutorial towards the end of last week to mention this in step 1.3 here https://docs.powersync.com/integration-guides/supabase-+-powersync#connect-powersync-to-your-supabase - I wonder if the docs were perhaps cached on your side, or you were just too fast between the release and docs update ;-) Let me know if you think we can improve the docs more.

@finallyblueskies
Copy link
Author

@finallyblueskies thanks a lot for sharing this!

This is because the tutorial is missing a step in light of recent Supabase changes. When setting up your instance connection and enabling Supabase auth, you must now specify the JWT token, which you can copy and paste from your Supabase API settings

We updated the tutorial towards the end of last week to mention this in step 1.3 here https://docs.powersync.com/integration-guides/supabase-+-powersync#connect-powersync-to-your-supabase - I wonder if the docs were perhaps cached on your side, or you were just too fast between the release and docs update ;-) Let me know if you think we can improve the docs more.

Possibly cached, although most likely I just missed it while skimming - what I think really threw me off was the lack of that step in the Youtube video

@benitav
Copy link
Contributor

benitav commented Dec 9, 2024

Ah, thanks for the feedback 👍 we'll get the video updated, and are also planning to add some validation to the form soon.

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

2 participants