Supabase tutorial a little out of date
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:
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.
@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 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
Ah, thanks for the feedback 👍 we'll get the video updated, and are also planning to add some validation to the form soon.