Closed mcmah309 closed 2 months ago
Are there any errors in the Browser dev tool logs when inspecting the blank page?
In the browser:
Error: supabaseKey is required.
at new RD (index-GDK5liyz.js:45:97845)
at _D (index-GDK5liyz.js:45:100523)
at new OD (index-GDK5liyz.js:45:100769)
at $ee (index-GDK5liyz.js:197:12728)
at I7 (index-GDK5liyz.js:6:19539)
at ay (index-GDK5liyz.js:8:44058)
at ly (index-GDK5liyz.js:8:39790)
at ZI (index-GDK5liyz.js:8:39718)
at p5 (index-GDK5liyz.js:8:39570)
at ec (index-GDK5liyz.js:8:35934)
Here are the full logs, I am noticing this morning that mongo-rs-init-1
may to be failing? I see ECONNREFUSED
but the exit code is 0.
The supabaseKey is required
error is probably due to the SUPBABASE_ANON_KEY
environment variable not being available when the demo-client
service container was built. This environment variable is used as a build argument which is embedded into the Vite front-end at build time.
Could you try docker compose up --build
with the environment variable set?
It is normal for the mongo-rs-init
service to fail if the mongo
service has not started yet. The rs-init
service should restart until it succeeds due to the restart: on-failure
setting. I'm not sure why it has printed exited with code 0
since I can see in the attached log above that it did retry later without an error.
@mcmah309 were you able to retry booting the stack after setting the SUPBABASE_ANON_KEY
env var?
Closing due to inactivity
This is related to https://github.com/powersync-ja/self-host-demo/issues/24 . I attempted to get around that issue by self hosting Supabase. Which did help, but I still run into the issue of http://localhost:4170/ serving a black screen.
I followed: https://supabase.com/docs/guides/self-hosting/docker
Here are my steps:
Setup Supabase With Docker For Powersync
https://supabase.com/docs/guides/self-hosting/docker
Fix
container supabase-vector exited (0)
error for rootless and allow setup to continue.Start
check it is running (should see all pulled)
Go to dashboard at
http://localhost:8000
Username: supabase
Password: this_password_is_insecure_and_should_be_updated
Run this sql
Powersync
https://github.com/powersync-ja/self-host-demo/tree/main/demos/supabase
Go to dashboard at
http://localhost:4170
Make sure powersync .env is correct e.g these need to change
Run
At this point the logs have no errors (even those like in https://github.com/powersync-ja/self-host-demo/issues/24 are gone) and all the other log messages look correct, but http://localhost:4170 still serves a blank screen.