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

electric-sql generate stuck while using Supabase #863

Open
marksteve opened this issue Jan 21, 2024 · 6 comments
Open

electric-sql generate stuck while using Supabase #863

marksteve opened this issue Jan 21, 2024 · 6 comments

Comments

@marksteve
Copy link

marksteve commented Jan 21, 2024

Logs

Generating Electric client...
Service URL: http://localhost:5133
Proxy URL: postgresql://prisma:@localhost:65432/electric

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\[!NOTE\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\]
ELECTRIC_PROXY wasn't being respected but I could at least do

export ELECTRIC_DATABASE_NAME=electric
export ELECTRIC_PG_PROXY_PASSWORD=$PG_PROXY_PASSWORD

electricsql/electric:0.9

02:35:17.962 pid=<0.3144.0> proxy_session_id=2 [warning] Unsupported SASL mechanism "SCRAM-SHA-256-PLUS"
02:35:18.192 pid=<0.3143.0> proxy_session_id=2 [info] Upstream connection is ready to accept queries
02:35:18.216 pid=<0.3143.0> proxy_session_id=2 [info] Matched prisma introspection query to Elixir.Electric.Postgres.Proxy.Prisma.Query.NamespaceV5_2
02:35:18.218 pid=<0.3143.0> proxy_session_id=2 [info] Matched prisma introspection query to Elixir.Electric.Postgres.Proxy.Prisma.Query.TableListV4_8
02:35:18.220 pid=<0.3143.0> proxy_session_id=2 [info] Matched prisma introspection query to Elixir.Electric.Postgres.Proxy.Prisma.Query.TypeV4_8
02:35:18.222 pid=<0.3143.0> proxy_session_id=2 [info] Matched prisma introspection query to Elixir.Electric.Postgres.Proxy.Prisma.Query.ColumnV4_8
02:35:18.225 pid=<0.3143.0> proxy_session_id=2 [info] Matched prisma introspection query to Elixir.Electric.Postgres.Proxy.Prisma.Query.ForeignKeyV4_8
02:35:18.227 pid=<0.3143.0> proxy_session_id=2 [info] Matched prisma introspection query to Elixir.Electric.Postgres.Proxy.Prisma.Query.IndexV4_8
02:35:18.229 pid=<0.3143.0> proxy_session_id=2 [info] Matched prisma introspection query to Elixir.Electric.Postgres.Proxy.Prisma.Query.ViewV4_8
02:35:18.230 pid=<0.3143.0> proxy_session_id=2 [info] Matched prisma introspection query to Elixir.Electric.Postgres.Proxy.Prisma.Query.FunctionV5_2
02:35:18.231 pid=<0.3143.0> proxy_session_id=2 [info] Matched prisma introspection query to Elixir.Electric.Postgres.Proxy.Prisma.Query.ExtensionV5_2
02:35:18.233 pid=<0.3143.0> proxy_session_id=2 [info] Matched prisma introspection query to Elixir.Electric.Postgres.Proxy.Prisma.Query.SequenceV5_2
Copy link

linear bot commented Jan 21, 2024

@alco
Copy link
Member

alco commented Jan 24, 2024

Hey @marksteve 👋

Looks like you're using the new client API but it's connecting to localhost. Are you working with self-hosted Supabase?

@marksteve
Copy link
Author

@alco Nope. The proxy is connected to hosted Supabase. Side note: Took me a while to notice but there were times my IP got blocked by Supabase. Something that might be useful to add in the documentation!

@alco
Copy link
Member

alco commented Jan 25, 2024

@marksteve So have you tracked the hanging of the proxy to Supabase blocking your IP? Did you managed to generate a client after rerunning npx electric-sql generate?

@marksteve
Copy link
Author

marksteve commented Jan 25, 2024

@alco Ah sorry that was a different issue. The proxy connects to Supabase properly to set up the electric schema and subscribe to the replication but it just hangs when I try to generate.

I'm try to replicate now but I'm encountering a different issue... I'll created a separate issue: #888

@alco
Copy link
Member

alco commented Feb 2, 2024

@alco Nope. The proxy is connected to hosted Supabase. Side note: Took me a while to notice but there were times my IP got blocked by Supabase. Something that might be useful to add in the documentation!

I believe this is caused by Supabase dropping IPv4 support for direct database connections recently. Make sure you can reach the DB with psql from your network. If that works, you'll need to enable IPv6 support for the Docker daemon as explained in this guide and recreate the Docker network that our CLI has created by running npm run backend:down.

If your home router or ISP does not support IPv6, you'll have to resort to using a VPN.

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