Giter Site home page Giter Site logo

Comments (26)

JunsikChoi avatar JunsikChoi commented on May 18, 2024 7

@Deelaw97 @filipecabaco
This issue resolves when I change supabase URL for supabaseClient from http://localhost:54321 to http://127.0.0.1:54321

from realtime.

calonzolg avatar calonzolg commented on May 18, 2024 2

Hello @filipecabaco,

I'm having a issue enabling the realtime for some tables in the supabase studio.

When go to replication section get the following screen.
CleanShot 2023-11-22 at 22 48 49@2x

If I try enable from table the realtime getting another issue.
CleanShot 2023-11-22 at 22 49 28@2x

Here is the log of the container realtime-dev.supabase_realtime - public.ecr.aws/supabase/realtime:v2.25.35

2023-11-22 22:36:15 04:36:15.062 [info] create table tenants
2023-11-22 22:36:15 04:36:15.066 [info] create index tenants_external_id_index
2023-11-22 22:36:15 04:36:15.069 [info] == Migrated 20210706140551 in 0.0s
2023-11-22 22:36:15 04:36:15.082 [info] == Running 20220329161857 Realtime.Repo.Migrations.AddExtensionsTable.change/0 forward
2023-11-22 22:36:15 04:36:15.082 [info] create table extensions
2023-11-22 22:36:15 04:36:15.085 [info] create index extensions_tenant_external_id_type_index
2023-11-22 22:36:15 04:36:15.085 [info] == Migrated 20220329161857 in 0.0s
2023-11-22 22:36:15 04:36:15.086 [info] == Running 20220410212326 Realtime.Repo.Migrations.AddTenantMaxEps.up/0 forward
2023-11-22 22:36:15 04:36:15.086 [info] alter table tenants
2023-11-22 22:36:15 04:36:15.092 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.092 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.092 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.092 [info] == Migrated 20220410212326 in 0.0s
2023-11-22 22:36:15 04:36:15.093 [info] == Running 20220506102948 Realtime.Repo.Migrations.RenamePollIntervalToPollIntervalMs.up/0 forward
2023-11-22 22:36:15 04:36:15.094 [warning] Replica region not found, defaulting to Realtime.Repo
2023-11-22 22:36:15 04:36:15.099 [debug] QUERY OK source="extensions" db=0.1ms
2023-11-22 22:36:15 SELECT e0."id", e0."type", e0."settings", e0."tenant_external_id", e0."inserted_at", e0."updated_at" FROM "extensions" AS e0 WHERE (e0."type" = $1) ["postgres_cdc_rls"]
2023-11-22 22:36:15 04:36:15.099 [info] == Migrated 20220506102948 in 0.0s
2023-11-22 22:36:15 04:36:15.100 [info] == Running 20220527210857 Realtime.Repo.Migrations.AddExternalIdUniqIndex.change/0 forward
2023-11-22 22:36:15 04:36:15.100 [info] execute "alter table tenants add constraint uniq_external_id unique (external_id)"
2023-11-22 22:36:15 04:36:15.104 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.104 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.104 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.104 [info] == Migrated 20220527210857 in 0.0s
2023-11-22 22:36:15 04:36:15.104 [info] == Running 20220815211129 Realtime.Repo.Migrations.NewMaxEventsPerSecondDefault.change/0 forward
2023-11-22 22:36:15 04:36:15.104 [info] alter table tenants
2023-11-22 22:36:15 04:36:15.110 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.110 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.110 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.110 [info] == Migrated 20220815211129 in 0.0s
2023-11-22 22:36:15 04:36:15.111 [info] == Running 20220815215024 Realtime.Repo.Migrations.SetCurrentMaxEventsPerSecond.change/0 forward
2023-11-22 22:36:15 04:36:15.111 [info] execute "update tenants set max_events_per_second = 1000"
2023-11-22 22:36:15 04:36:15.111 [info] == Migrated 20220815215024 in 0.0s
2023-11-22 22:36:15 04:36:15.112 [info] == Running 20220818141501 Realtime.Repo.Migrations.ChangeLimitsDefaults.change/0 forward
2023-11-22 22:36:15 04:36:15.112 [info] alter table tenants
2023-11-22 22:36:15 04:36:15.115 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.115 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.115 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.115 [info] == Migrated 20220818141501 in 0.0s
2023-11-22 22:36:15 04:36:15.116 [info] == Running 20221018173709 Realtime.Repo.Migrations.AddCdcDefault.up/0 forward
2023-11-22 22:36:15 04:36:15.116 [info] alter table tenants
2023-11-22 22:36:15 04:36:15.119 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.119 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.119 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.119 [info] == Migrated 20221018173709 in 0.0s
2023-11-22 22:36:15 04:36:15.120 [info] == Running 20221102172703 Realtime.Repo.Migrations.RenamePgType.up/0 forward
2023-11-22 22:36:15 04:36:15.120 [info] execute "update extensions set type = 'postgres_cdc_rls'"
2023-11-22 22:36:15 04:36:15.120 [info] == Migrated 20221102172703 in 0.0s
2023-11-22 22:36:15 04:36:15.121 [info] == Running 20221223010058 Realtime.Repo.Migrations.DropTenantsUniqExternalIdIndex.change/0 forward
2023-11-22 22:36:15 04:36:15.121 [info] execute "ALTER TABLE IF EXISTS tenants DROP CONSTRAINT IF EXISTS uniq_external_id"
2023-11-22 22:36:15 04:36:15.124 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.124 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.124 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.124 [info] == Migrated 20221223010058 in 0.0s
2023-11-22 22:36:15 04:36:15.125 [info] == Running 20230110180046 Realtime.Repo.Migrations.AddLimitsFieldsToTenants.change/0 forward
2023-11-22 22:36:15 04:36:15.125 [info] alter table tenants
2023-11-22 22:36:15 04:36:15.128 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.128 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.128 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.128 [info] == Migrated 20230110180046 in 0.0s
2023-11-22 22:36:15 04:36:15.129 [info] == Running 20230810220907 Realtime.Repo.Migrations.AlterTenantsTableColumnsToText.change/0 forward
2023-11-22 22:36:15 04:36:15.129 [info] alter table tenants
2023-11-22 22:36:15 04:36:15.133 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.133 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.133 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.133 [info] == Migrated 20230810220907 in 0.0s
2023-11-22 22:36:15 04:36:15.133 [info] == Running 20230810220924 Realtime.Repo.Migrations.AlterExtensionsTableColumnsToText.change/0 forward
2023-11-22 22:36:15 04:36:15.133 [info] alter table extensions
2023-11-22 22:36:15 04:36:15.137 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.137 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.137 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.137 [info] == Migrated 20230810220924 in 0.0s
2023-11-22 22:36:15 04:36:15.138 [info] == Running 20231024094642 :"Elixir.Realtime.Repo.Migrations.Add-tenant-suspend-flag".change/0 forward
2023-11-22 22:36:15 04:36:15.138 [info] alter table tenants
2023-11-22 22:36:15 04:36:15.141 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.141 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.141 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.141 [info] == Migrated 20231024094642 in 0.0s
2023-11-22 22:36:15 04:36:15.422 [debug] QUERY OK db=0.5ms queue=60.8ms idle=0.0ms
2023-11-22 22:36:15 begin []
2023-11-22 22:36:15 04:36:15.430 [debug] QUERY OK source="tenants" db=0.2ms
2023-11-22 22:36:15 SELECT t0."id", t0."name", t0."external_id", t0."jwt_secret", t0."postgres_cdc_default", t0."max_concurrent_users", t0."max_events_per_second", t0."max_bytes_per_second", t0."max_channels_per_client", t0."max_joins_per_second", t0."suspend", t0."inserted_at", t0."updated_at" FROM "tenants" AS t0 WHERE (t0."external_id" = $1) ["realtime-dev"]
2023-11-22 22:36:15 04:36:15.451 [debug] QUERY OK db=0.8ms
2023-11-22 22:36:15 INSERT INTO "tenants" ("external_id","jwt_secret","max_bytes_per_second","max_channels_per_client","max_concurrent_users","max_events_per_second","max_joins_per_second","name","suspend","inserted_at","updated_at","id") VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12) ["realtime-dev", "iNjicxc4+llvc9wovDvqymwfnj9teWMlyOIbJ8Fh6j2WNU8CIJ2ZgjR6MUIKqSmeDmvpsKLsZ9jgXJmQPpwL8w==", 100000, 100, 200, 100, 100, "realtime-dev", false, ~N[2023-11-23 04:36:15], ~N[2023-11-23 04:36:15], <<170, 107, 4, 168, 98, 247, 75, 111, 167, 183, 8, 138, 72, 196, 95, 145>>]
2023-11-22 22:36:15 04:36:15.455 [debug] QUERY OK db=2.7ms
2023-11-22 22:36:15 INSERT INTO "extensions" ("settings","tenant_external_id","type","inserted_at","updated_at","id") VALUES ($1,$2,$3,$4,$5,$6) [%{"db_host" => "dcYFpB9IQD8+XVW8Neunyw==", "db_name" => "sWBpZNdjggEPTQVlI52Zfw==", "db_password" => "sWBpZNdjggEPTQVlI52Zfw==", "db_port" => "+enMDFi1J/3IrrquHHwUmA==", "db_user" => "uxbEq/zz8DXVD53TOI1zmw==", "ip_version" => 4, "poll_interval_ms" => 100, "poll_max_changes" => 100, "poll_max_record_bytes" => 1048576, "publication" => "supabase_realtime", "region" => "us-east-1", "slot_name" => "supabase_realtime_replication_slot", "ssl_enforced" => false}, "realtime-dev", "postgres_cdc_rls", ~N[2023-11-23 04:36:15], ~N[2023-11-23 04:36:15], <<223, 158, 248, 22, 108, 48, 72, 63, 136, 250, 167, 186, 130, 37, 109, 7>>]
2023-11-22 22:36:15 04:36:15.455 [debug] QUERY OK db=0.6ms
2023-11-22 22:36:15 commit []
2023-11-22 22:36:16 04:36:16.032 [notice]     :alarm_handler: {:set, {:system_memory_high_watermark, []}}
2023-11-22 22:36:16 04:36:16.068 [info] Elixir.Realtime.SignalHandler is being initialized...
2023-11-22 22:36:16 04:36:16.068 [notice] SYN[[email protected]] Adding node to scope <Elixir.Realtime.Tenants.Connect>
2023-11-22 22:36:16 04:36:16.068 [notice] SYN[[email protected]] Creating tables for scope <Elixir.Realtime.Tenants.Connect>
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]|registry<Elixir.Realtime.Tenants.Connect>] Discovering the cluster
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]|pg<Elixir.Realtime.Tenants.Connect>] Discovering the cluster
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]] Adding node to scope <users>
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]] Creating tables for scope <users>
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]|registry<users>] Discovering the cluster
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]|pg<users>] Discovering the cluster
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]] Adding node to scope <Elixir.RegionNodes>
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]] Creating tables for scope <Elixir.RegionNodes>
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]|registry<Elixir.RegionNodes>] Discovering the cluster
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]|pg<Elixir.RegionNodes>] Discovering the cluster
2023-11-22 22:36:16 04:36:16.069 [warning] Replica region not found, defaulting to Realtime.Repo
2023-11-22 22:36:16 04:36:16.215 [info] Running RealtimeWeb.Endpoint with cowboy 2.10.0 at :::4000 (http)
2023-11-22 22:36:16 04:36:16.222 [info] Access RealtimeWeb.Endpoint at http://realtime.fly.dev
2023-11-22 22:36:16 04:36:16.222 [notice] SYN[[email protected]] Adding node to scope <Elixir.PostgresCdcStream>
2023-11-22 22:36:16 04:36:16.222 [notice] SYN[[email protected]] Creating tables for scope <Elixir.PostgresCdcStream>
2023-11-22 22:36:16 04:36:16.222 [notice] SYN[[email protected]|registry<Elixir.PostgresCdcStream>] Discovering the cluster
2023-11-22 22:36:16 04:36:16.222 [notice] SYN[[email protected]|pg<Elixir.PostgresCdcStream>] Discovering the cluster
2023-11-22 22:36:16 04:36:16.223 [notice] SYN[[email protected]] Adding node to scope <Elixir.Extensions.PostgresCdcRls>
2023-11-22 22:36:16 04:36:16.223 [notice] SYN[[email protected]] Creating tables for scope <Elixir.Extensions.PostgresCdcRls>
2023-11-22 22:36:16 04:36:16.223 [notice] SYN[[email protected]|registry<Elixir.Extensions.PostgresCdcRls>] Discovering the cluster
2023-11-22 22:36:16 04:36:16.223 [notice] SYN[[email protected]|pg<Elixir.Extensions.PostgresCdcRls>] Discovering the cluster
2023-11-22 22:36:19 04:36:19.069 [debug] Tzdata polling for update.
2023-11-22 22:36:19 04:36:19.815 [info] tzdata release in place is from a file last modified Fri, 22 Oct 2021 02:20:47 GMT. Release file on server was last modified Tue, 28 Mar 2023 20:25:39 GMT.
2023-11-22 22:36:19 04:36:19.815 [debug] Tzdata downloading new data from https://data.iana.org/time-zones/tzdata-latest.tar.gz
2023-11-22 22:36:20 04:36:20.366 [debug] Tzdata data downloaded. Release version 2023c.
2023-11-22 22:36:20 04:36:20.678 [info] Tzdata has updated the release from 2021e to 2023c
2023-11-22 22:36:20 04:36:20.678 [debug] Tzdata deleting ETS table for version 2021e
2023-11-22 22:36:20 04:36:20.679 [debug] Tzdata deleting ETS table file for version 2021e

from realtime.

Deelaw97 avatar Deelaw97 commented on May 18, 2024 2

THAT DID IT!! Realtime wokrs locally!!! @JunsikChoi Thanks for the tip! Cc: @filipecabaco

from realtime.

filipecabaco avatar filipecabaco commented on May 18, 2024 2

awesome!!! thank you @JunsikChoi 🙏

that is quite an interesting weird thing still 🤔 I wonder if this would be better to set in the docs in some way

will close the issue for now

thank you all for the report, help and patience ❤️

from realtime.

Deelaw97 avatar Deelaw97 commented on May 18, 2024 2

@filipecabaco Thank you for taking the time to investigate it!!!! Really appreciate it!

from realtime.

Deelaw97 avatar Deelaw97 commented on May 18, 2024 1

Yeah this feels like it was from Studio UI. CC @semics-tech @calonzolg .

The logs themselves look ok for initialisation of the Realtime tenant information 🤔

What is the error you are seeing in the websocket connection @Deelaw97 ?

image
err is undefined but status shows as channel error

from realtime.

ismael-su avatar ismael-su commented on May 18, 2024 1

@Deelaw97 have you managed to fix it ?
I am having the same error, CHANNEL_ERROR.

from realtime.

filipecabaco avatar filipecabaco commented on May 18, 2024 1

I think that it might also be connected with some issues we had on our side where the tenant data was not being set properly so the only fix for that was deletion / modification of the tenant data 😞

But glad to know it worked @ismael-su!

If you have further issues do ping

from realtime.

bigbizze avatar bigbizze commented on May 18, 2024

When i do

psql "postgresql://supabase_admin:postgres@localhost:54322/postgres" <<EOF
  SELECT * FROM _realtime.schema_migrations;
EOF

i can see that the table exists and get data back, so it seems like at least the permissions for supabase studio are off

from realtime.

bigbizze avatar bigbizze commented on May 18, 2024

Upon more investigation, it appears like it's unrelated to the above, and seems to happen when supabase.auth.refreshSession is called on the createBrowserClient client from the "@supabase/ssr" library

Steps to reproduce (using what is basically a copy and paste of your SSR auth tutorial):

  1. User logs in using Google (everything works fine)
  2. Refresh page, call supabase.auth.refreshToken in a useEffect
  3. Regular queries and requests against DB work as expected, but realtime fails to connect

from realtime.

filipecabaco avatar filipecabaco commented on May 18, 2024

from what I understood in the pg dump you don't have all migrations in the table (should have been 31) so something broke which could be the reason for this weirdness.

are you able to provide the realtime container logs?

from realtime.

semics-tech avatar semics-tech commented on May 18, 2024

I'm also getting this issue after deleting all containers and running supabase start. Is there a workaround? Container logs are below:

2023-11-23 07:42:05 07:42:05.747 [info] Migrations already up
2023-11-23 07:42:06 07:42:06.355 [debug] QUERY OK db=1.7ms queue=96.8ms idle=0.0ms
2023-11-23 07:42:06 begin []
2023-11-23 07:42:06 07:42:06.381 [debug] QUERY OK source="tenants" db=6.9ms
2023-11-23 07:42:06 SELECT t0."id", t0."name", t0."external_id", t0."jwt_secret", t0."postgres_cdc_default", t0."max_concurrent_users", t0."max_events_per_second", t0."max_bytes_per_second", t0."max_channels_per_client", t0."max_joins_per_second", t0."suspend", t0."inserted_at", t0."updated_at" FROM "tenants" AS t0 WHERE (t0."external_id" = $1) ["realtime-dev-tenant"]
2023-11-23 07:42:06 07:42:06.406 [debug] QUERY OK source="extensions" db=0.4ms
2023-11-23 07:42:06 DELETE FROM "extensions" AS e0 WHERE (e0."tenant_external_id" = $1) ["realtime-dev-tenant"]
2023-11-23 07:42:06 07:42:06.409 [debug] QUERY OK db=0.4ms
2023-11-23 07:42:06 DELETE FROM "tenants" WHERE "id" = $1 [<<169, 56, 97, 15, 147, 116, 74, 187, 187, 104, 204, 81, 212, 40, 140, 210>>]
2023-11-23 07:42:06 07:42:06.427 [debug] QUERY OK db=0.2ms
2023-11-23 07:42:06 INSERT INTO "tenants" ("external_id","jwt_secret","max_bytes_per_second","max_channels_per_client","max_concurrent_users","max_events_per_second","max_joins_per_second","name","suspend","inserted_at","updated_at","id") VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12) ["realtime-dev-tenant", "iNjicxc4+llvc9wovDvqymwfnj9teWMlyOIbJ8Fh6j2WNU8CIJ2ZgjR6MUIKqSmeDmvpsKLsZ9jgXJmQPpwL8w==", 100000, 100, 200, 100, 100, "realtime-dev-tenant", false, ~N[2023-11-23 07:42:06], ~N[2023-11-23 07:42:06], <<41, 4, 138, 237, 58, 62, 79, 209, 132, 6, 194, 128, 9, 135, 19, 35>>]
2023-11-23 07:42:06 07:42:06.435 [debug] QUERY OK db=5.1ms
2023-11-23 07:42:06 INSERT INTO "extensions" ("settings","tenant_external_id","type","inserted_at","updated_at","id") VALUES ($1,$2,$3,$4,$5,$6) [%{"db_host" => "WduM1JTp+Ah9s/HVBIpbqg==", "db_name" => "sWBpZNdjggEPTQVlI52Zfw==", "db_password" => "sWBpZNdjggEPTQVlI52Zfw==", "db_port" => "+enMDFi1J/3IrrquHHwUmA==", "db_user" => "sWBpZNdjggEPTQVlI52Zfw==", "ip_version" => 4, "poll_interval_ms" => 100, "poll_max_changes" => 100, "poll_max_record_bytes" => 1048576, "publication" => "supabase_realtime", "region" => "us-east-1", "slot_name" => "supabase_realtime_replication_slot"}, "realtime-dev-tenant", "postgres_cdc_rls", ~N[2023-11-23 07:42:06], ~N[2023-11-23 07:42:06], <<48, 119, 219, 235, 156, 163, 76, 28, 158, 71, 26, 16, 252, 160, 111, 170>>]
2023-11-23 07:42:06 07:42:06.441 [debug] QUERY OK db=6.1ms
2023-11-23 07:42:06 commit []
2023-11-23 07:42:06 07:42:06.441 [debug] QUERY OK db=0.3ms idle=96.1ms
2023-11-23 07:42:06 begin []
2023-11-23 07:42:06 07:42:06.445 [debug] QUERY OK db=1.1ms
2023-11-23 07:42:06 drop publication if exists supabase_realtime []
2023-11-23 07:42:06 07:42:06.446 [debug] QUERY OK db=0.9ms
2023-11-23 07:42:06 drop table if exists public.test_tenant; []
2023-11-23 07:42:06 07:42:06.451 [debug] QUERY OK db=5.3ms
2023-11-23 07:42:06 create table public.test_tenant (
2023-11-23 07:42:06         id SERIAL PRIMARY KEY,
2023-11-23 07:42:06         details text
2023-11-23 07:42:06         ); []
2023-11-23 07:42:06 07:42:06.452 [debug] QUERY OK db=0.2ms
2023-11-23 07:42:06 grant all on table public.test_tenant to anon; []
2023-11-23 07:42:06 07:42:06.452 [debug] QUERY OK db=0.3ms
2023-11-23 07:42:06 grant all on table public.test_tenant to postgres; []
2023-11-23 07:42:06 07:42:06.453 [debug] QUERY OK db=0.3ms
2023-11-23 07:42:06 grant all on table public.test_tenant to authenticated; []
2023-11-23 07:42:06 07:42:06.453 [debug] QUERY OK db=0.3ms
2023-11-23 07:42:06 create publication supabase_realtime for table public.test_tenant []
2023-11-23 07:42:06 07:42:06.455 [debug] QUERY OK db=1.5ms
2023-11-23 07:42:06 commit []
2023-11-23 07:42:07 07:42:07.756 [info] Elixir.Realtime.SignalHandler is being initialized...
2023-11-23 07:42:07 07:42:07.757 [notice] SYN[[email protected]] Adding node to scope <Elixir.Realtime.Tenants.Connect>
2023-11-23 07:42:07 07:42:07.757 [notice] SYN[[email protected]] Creating tables for scope <Elixir.Realtime.Tenants.Connect>
2023-11-23 07:42:07 07:42:07.757 [notice] SYN[[email protected]|registry<Elixir.Realtime.Tenants.Connect>] Discovering the cluster
2023-11-23 07:42:07 07:42:07.757 [notice] SYN[[email protected]|pg<Elixir.Realtime.Tenants.Connect>] Discovering the cluster
2023-11-23 07:42:07 07:42:07.757 [notice] SYN[[email protected]] Adding node to scope <users>
2023-11-23 07:42:07 07:42:07.757 [notice] SYN[[email protected]] Creating tables for scope <users>
2023-11-23 07:42:07 07:42:07.757 [notice] SYN[[email protected]|registry<users>] Discovering the cluster
2023-11-23 07:42:07 07:42:07.758 [notice] SYN[[email protected]|pg<users>] Discovering the cluster
2023-11-23 07:42:07 07:42:07.758 [notice] SYN[[email protected]] Adding node to scope <Elixir.RegionNodes>
2023-11-23 07:42:07 07:42:07.758 [notice] SYN[[email protected]] Creating tables for scope <Elixir.RegionNodes>
2023-11-23 07:42:07 07:42:07.758 [notice] SYN[[email protected]|registry<Elixir.RegionNodes>] Discovering the cluster
2023-11-23 07:42:07 07:42:07.758 [notice] SYN[[email protected]|pg<Elixir.RegionNodes>] Discovering the cluster
2023-11-23 07:42:07 07:42:07.759 [warning] Replica region not found, defaulting to Realtime.Repo
2023-11-23 07:42:07 07:42:07.792 [info] Running RealtimeWeb.Endpoint with cowboy 2.10.0 at :::4000 (http)
2023-11-23 07:42:07 07:42:07.799 [info] Access RealtimeWeb.Endpoint at http://realtime.fly.dev
2023-11-23 07:42:07 07:42:07.800 [notice] SYN[[email protected]] Adding node to scope <Elixir.PostgresCdcStream>
2023-11-23 07:42:07 07:42:07.800 [notice] SYN[[email protected]] Creating tables for scope <Elixir.PostgresCdcStream>
2023-11-23 07:42:07 07:42:07.800 [notice] SYN[[email protected]|registry<Elixir.PostgresCdcStream>] Discovering the cluster
2023-11-23 07:42:07 07:42:07.800 [notice] SYN[[email protected]|pg<Elixir.PostgresCdcStream>] Discovering the cluster
2023-11-23 07:42:07 07:42:07.801 [notice] SYN[[email protected]] Adding node to scope <Elixir.Extensions.PostgresCdcRls>
2023-11-23 07:42:07 07:42:07.802 [notice] SYN[[email protected]] Creating tables for scope <Elixir.Extensions.PostgresCdcRls>
2023-11-23 07:42:07 07:42:07.802 [notice] SYN[[email protected]|registry<Elixir.Extensions.PostgresCdcRls>] Discovering the cluster
2023-11-23 07:42:07 07:42:07.802 [notice] SYN[[email protected]|pg<Elixir.Extensions.PostgresCdcRls>] Discovering the cluster
2023-11-23 07:42:07 07:42:07.919 [warning] Replica region not found, defaulting to Realtime.Repo
2023-11-23 07:42:07 07:42:07.922 [debug] QUERY OK source="tenants" db=1.2ms queue=1.7ms idle=120.6ms
2023-11-23 07:42:07 SELECT t0."id", t0."name", t0."external_id", t0."jwt_secret", t0."postgres_cdc_default", t0."max_concurrent_users", t0."max_events_per_second", t0."max_bytes_per_second", t0."max_channels_per_client", t0."max_joins_per_second", t0."suspend", t0."inserted_at", t0."updated_at" FROM "tenants" AS t0 WHERE (t0."external_id" = $1) ["realtime-dev"]
2023-11-23 07:42:07 07:42:07.923 project=realtime-dev external_id=realtime-dev [error] Auth error: tenant `realtime-dev` not found
2023-11-23 07:42:09 07:42:09.920 project=realtime-dev external_id=realtime-dev [error] Auth error: tenant `realtime-dev` not found
2023-11-23 07:42:11 07:42:11.914 project=realtime-dev external_id=realtime-dev [error] Auth error: tenant `realtime-dev` not found
2023-11-23 07:42:13 07:42:13.916 project=realtime-dev external_id=realtime-dev [error] Auth error: tenant `realtime-dev` not found
2023-11-23 07:42:15 07:42:15.935 project=realtime-dev external_id=realtime-dev [error] Auth error: tenant `realtime-dev` not found
2023-11-23 07:42:17 07:42:17.954 project=realtime-dev external_id=realtime-dev [error] Auth error: tenant `realtime-dev` not found
2023-11-23 07:42:20 07:42:20.016 project=realtime-dev external_id=realtime-dev [error] Auth error: tenant `realtime-dev` not found
2023-11-23 07:42:22 07:42:22.178 project=realtime-dev external_id=realtime-dev [error] Auth error: tenant `realtime-dev` not found

from realtime.

Deelaw97 avatar Deelaw97 commented on May 18, 2024

Hello @filipecabaco,

I'm having a issue enabling the realtime for some tables in the supabase studio.

When go to replication section get the following screen. CleanShot 2023-11-22 at 22 48 49@2x

If I try enable from table the realtime getting another issue. CleanShot 2023-11-22 at 22 49 28@2x

Here is the log of the container realtime-dev.supabase_realtime - public.ecr.aws/supabase/realtime:v2.25.35

2023-11-22 22:36:15 04:36:15.062 [info] create table tenants
2023-11-22 22:36:15 04:36:15.066 [info] create index tenants_external_id_index
2023-11-22 22:36:15 04:36:15.069 [info] == Migrated 20210706140551 in 0.0s
2023-11-22 22:36:15 04:36:15.082 [info] == Running 20220329161857 Realtime.Repo.Migrations.AddExtensionsTable.change/0 forward
2023-11-22 22:36:15 04:36:15.082 [info] create table extensions
2023-11-22 22:36:15 04:36:15.085 [info] create index extensions_tenant_external_id_type_index
2023-11-22 22:36:15 04:36:15.085 [info] == Migrated 20220329161857 in 0.0s
2023-11-22 22:36:15 04:36:15.086 [info] == Running 20220410212326 Realtime.Repo.Migrations.AddTenantMaxEps.up/0 forward
2023-11-22 22:36:15 04:36:15.086 [info] alter table tenants
2023-11-22 22:36:15 04:36:15.092 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.092 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.092 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.092 [info] == Migrated 20220410212326 in 0.0s
2023-11-22 22:36:15 04:36:15.093 [info] == Running 20220506102948 Realtime.Repo.Migrations.RenamePollIntervalToPollIntervalMs.up/0 forward
2023-11-22 22:36:15 04:36:15.094 [warning] Replica region not found, defaulting to Realtime.Repo
2023-11-22 22:36:15 04:36:15.099 [debug] QUERY OK source="extensions" db=0.1ms
2023-11-22 22:36:15 SELECT e0."id", e0."type", e0."settings", e0."tenant_external_id", e0."inserted_at", e0."updated_at" FROM "extensions" AS e0 WHERE (e0."type" = $1) ["postgres_cdc_rls"]
2023-11-22 22:36:15 04:36:15.099 [info] == Migrated 20220506102948 in 0.0s
2023-11-22 22:36:15 04:36:15.100 [info] == Running 20220527210857 Realtime.Repo.Migrations.AddExternalIdUniqIndex.change/0 forward
2023-11-22 22:36:15 04:36:15.100 [info] execute "alter table tenants add constraint uniq_external_id unique (external_id)"
2023-11-22 22:36:15 04:36:15.104 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.104 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.104 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.104 [info] == Migrated 20220527210857 in 0.0s
2023-11-22 22:36:15 04:36:15.104 [info] == Running 20220815211129 Realtime.Repo.Migrations.NewMaxEventsPerSecondDefault.change/0 forward
2023-11-22 22:36:15 04:36:15.104 [info] alter table tenants
2023-11-22 22:36:15 04:36:15.110 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.110 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.110 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.110 [info] == Migrated 20220815211129 in 0.0s
2023-11-22 22:36:15 04:36:15.111 [info] == Running 20220815215024 Realtime.Repo.Migrations.SetCurrentMaxEventsPerSecond.change/0 forward
2023-11-22 22:36:15 04:36:15.111 [info] execute "update tenants set max_events_per_second = 1000"
2023-11-22 22:36:15 04:36:15.111 [info] == Migrated 20220815215024 in 0.0s
2023-11-22 22:36:15 04:36:15.112 [info] == Running 20220818141501 Realtime.Repo.Migrations.ChangeLimitsDefaults.change/0 forward
2023-11-22 22:36:15 04:36:15.112 [info] alter table tenants
2023-11-22 22:36:15 04:36:15.115 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.115 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.115 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.115 [info] == Migrated 20220818141501 in 0.0s
2023-11-22 22:36:15 04:36:15.116 [info] == Running 20221018173709 Realtime.Repo.Migrations.AddCdcDefault.up/0 forward
2023-11-22 22:36:15 04:36:15.116 [info] alter table tenants
2023-11-22 22:36:15 04:36:15.119 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.119 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.119 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.119 [info] == Migrated 20221018173709 in 0.0s
2023-11-22 22:36:15 04:36:15.120 [info] == Running 20221102172703 Realtime.Repo.Migrations.RenamePgType.up/0 forward
2023-11-22 22:36:15 04:36:15.120 [info] execute "update extensions set type = 'postgres_cdc_rls'"
2023-11-22 22:36:15 04:36:15.120 [info] == Migrated 20221102172703 in 0.0s
2023-11-22 22:36:15 04:36:15.121 [info] == Running 20221223010058 Realtime.Repo.Migrations.DropTenantsUniqExternalIdIndex.change/0 forward
2023-11-22 22:36:15 04:36:15.121 [info] execute "ALTER TABLE IF EXISTS tenants DROP CONSTRAINT IF EXISTS uniq_external_id"
2023-11-22 22:36:15 04:36:15.124 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.124 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.124 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.124 [info] == Migrated 20221223010058 in 0.0s
2023-11-22 22:36:15 04:36:15.125 [info] == Running 20230110180046 Realtime.Repo.Migrations.AddLimitsFieldsToTenants.change/0 forward
2023-11-22 22:36:15 04:36:15.125 [info] alter table tenants
2023-11-22 22:36:15 04:36:15.128 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.128 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.128 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.128 [info] == Migrated 20230110180046 in 0.0s
2023-11-22 22:36:15 04:36:15.129 [info] == Running 20230810220907 Realtime.Repo.Migrations.AlterTenantsTableColumnsToText.change/0 forward
2023-11-22 22:36:15 04:36:15.129 [info] alter table tenants
2023-11-22 22:36:15 04:36:15.133 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.133 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.133 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.133 [info] == Migrated 20230810220907 in 0.0s
2023-11-22 22:36:15 04:36:15.133 [info] == Running 20230810220924 Realtime.Repo.Migrations.AlterExtensionsTableColumnsToText.change/0 forward
2023-11-22 22:36:15 04:36:15.133 [info] alter table extensions
2023-11-22 22:36:15 04:36:15.137 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.137 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.137 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.137 [info] == Migrated 20230810220924 in 0.0s
2023-11-22 22:36:15 04:36:15.138 [info] == Running 20231024094642 :"Elixir.Realtime.Repo.Migrations.Add-tenant-suspend-flag".change/0 forward
2023-11-22 22:36:15 04:36:15.138 [info] alter table tenants
2023-11-22 22:36:15 04:36:15.141 [info] about to masking role vault.secrets vault.decrypted_secrets
2023-11-22 22:36:15 04:36:15.141 [info] trigger "secrets_encrypt_secret_trigger_secret" for relation "vault.secrets" does not exist, skipping
2023-11-22 22:36:15 04:36:15.141 [info] drop cascades to trigger secrets_encrypt_secret_trigger_secret on table vault.secrets
2023-11-22 22:36:15 04:36:15.141 [info] == Migrated 20231024094642 in 0.0s
2023-11-22 22:36:15 04:36:15.422 [debug] QUERY OK db=0.5ms queue=60.8ms idle=0.0ms
2023-11-22 22:36:15 begin []
2023-11-22 22:36:15 04:36:15.430 [debug] QUERY OK source="tenants" db=0.2ms
2023-11-22 22:36:15 SELECT t0."id", t0."name", t0."external_id", t0."jwt_secret", t0."postgres_cdc_default", t0."max_concurrent_users", t0."max_events_per_second", t0."max_bytes_per_second", t0."max_channels_per_client", t0."max_joins_per_second", t0."suspend", t0."inserted_at", t0."updated_at" FROM "tenants" AS t0 WHERE (t0."external_id" = $1) ["realtime-dev"]
2023-11-22 22:36:15 04:36:15.451 [debug] QUERY OK db=0.8ms
2023-11-22 22:36:15 INSERT INTO "tenants" ("external_id","jwt_secret","max_bytes_per_second","max_channels_per_client","max_concurrent_users","max_events_per_second","max_joins_per_second","name","suspend","inserted_at","updated_at","id") VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12) ["realtime-dev", "iNjicxc4+llvc9wovDvqymwfnj9teWMlyOIbJ8Fh6j2WNU8CIJ2ZgjR6MUIKqSmeDmvpsKLsZ9jgXJmQPpwL8w==", 100000, 100, 200, 100, 100, "realtime-dev", false, ~N[2023-11-23 04:36:15], ~N[2023-11-23 04:36:15], <<170, 107, 4, 168, 98, 247, 75, 111, 167, 183, 8, 138, 72, 196, 95, 145>>]
2023-11-22 22:36:15 04:36:15.455 [debug] QUERY OK db=2.7ms
2023-11-22 22:36:15 INSERT INTO "extensions" ("settings","tenant_external_id","type","inserted_at","updated_at","id") VALUES ($1,$2,$3,$4,$5,$6) [%{"db_host" => "dcYFpB9IQD8+XVW8Neunyw==", "db_name" => "sWBpZNdjggEPTQVlI52Zfw==", "db_password" => "sWBpZNdjggEPTQVlI52Zfw==", "db_port" => "+enMDFi1J/3IrrquHHwUmA==", "db_user" => "uxbEq/zz8DXVD53TOI1zmw==", "ip_version" => 4, "poll_interval_ms" => 100, "poll_max_changes" => 100, "poll_max_record_bytes" => 1048576, "publication" => "supabase_realtime", "region" => "us-east-1", "slot_name" => "supabase_realtime_replication_slot", "ssl_enforced" => false}, "realtime-dev", "postgres_cdc_rls", ~N[2023-11-23 04:36:15], ~N[2023-11-23 04:36:15], <<223, 158, 248, 22, 108, 48, 72, 63, 136, 250, 167, 186, 130, 37, 109, 7>>]
2023-11-22 22:36:15 04:36:15.455 [debug] QUERY OK db=0.6ms
2023-11-22 22:36:15 commit []
2023-11-22 22:36:16 04:36:16.032 [notice]     :alarm_handler: {:set, {:system_memory_high_watermark, []}}
2023-11-22 22:36:16 04:36:16.068 [info] Elixir.Realtime.SignalHandler is being initialized...
2023-11-22 22:36:16 04:36:16.068 [notice] SYN[[email protected]] Adding node to scope <Elixir.Realtime.Tenants.Connect>
2023-11-22 22:36:16 04:36:16.068 [notice] SYN[[email protected]] Creating tables for scope <Elixir.Realtime.Tenants.Connect>
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]|registry<Elixir.Realtime.Tenants.Connect>] Discovering the cluster
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]|pg<Elixir.Realtime.Tenants.Connect>] Discovering the cluster
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]] Adding node to scope <users>
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]] Creating tables for scope <users>
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]|registry<users>] Discovering the cluster
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]|pg<users>] Discovering the cluster
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]] Adding node to scope <Elixir.RegionNodes>
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]] Creating tables for scope <Elixir.RegionNodes>
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]|registry<Elixir.RegionNodes>] Discovering the cluster
2023-11-22 22:36:16 04:36:16.069 [notice] SYN[[email protected]|pg<Elixir.RegionNodes>] Discovering the cluster
2023-11-22 22:36:16 04:36:16.069 [warning] Replica region not found, defaulting to Realtime.Repo
2023-11-22 22:36:16 04:36:16.215 [info] Running RealtimeWeb.Endpoint with cowboy 2.10.0 at :::4000 (http)
2023-11-22 22:36:16 04:36:16.222 [info] Access RealtimeWeb.Endpoint at http://realtime.fly.dev
2023-11-22 22:36:16 04:36:16.222 [notice] SYN[[email protected]] Adding node to scope <Elixir.PostgresCdcStream>
2023-11-22 22:36:16 04:36:16.222 [notice] SYN[[email protected]] Creating tables for scope <Elixir.PostgresCdcStream>
2023-11-22 22:36:16 04:36:16.222 [notice] SYN[[email protected]|registry<Elixir.PostgresCdcStream>] Discovering the cluster
2023-11-22 22:36:16 04:36:16.222 [notice] SYN[[email protected]|pg<Elixir.PostgresCdcStream>] Discovering the cluster
2023-11-22 22:36:16 04:36:16.223 [notice] SYN[[email protected]] Adding node to scope <Elixir.Extensions.PostgresCdcRls>
2023-11-22 22:36:16 04:36:16.223 [notice] SYN[[email protected]] Creating tables for scope <Elixir.Extensions.PostgresCdcRls>
2023-11-22 22:36:16 04:36:16.223 [notice] SYN[[email protected]|registry<Elixir.Extensions.PostgresCdcRls>] Discovering the cluster
2023-11-22 22:36:16 04:36:16.223 [notice] SYN[[email protected]|pg<Elixir.Extensions.PostgresCdcRls>] Discovering the cluster
2023-11-22 22:36:19 04:36:19.069 [debug] Tzdata polling for update.
2023-11-22 22:36:19 04:36:19.815 [info] tzdata release in place is from a file last modified Fri, 22 Oct 2021 02:20:47 GMT. Release file on server was last modified Tue, 28 Mar 2023 20:25:39 GMT.
2023-11-22 22:36:19 04:36:19.815 [debug] Tzdata downloading new data from https://data.iana.org/time-zones/tzdata-latest.tar.gz
2023-11-22 22:36:20 04:36:20.366 [debug] Tzdata data downloaded. Release version 2023c.
2023-11-22 22:36:20 04:36:20.678 [info] Tzdata has updated the release from 2021e to 2023c
2023-11-22 22:36:20 04:36:20.678 [debug] Tzdata deleting ETS table for version 2021e
2023-11-22 22:36:20 04:36:20.679 [debug] Tzdata deleting ETS table file for version 2021e

Thie studio UI is fixed for me once i upgraded to the latest cli version (1.115.4), purged my containers and images. Lastly did a clean supabase start download.

I am still having the same logs for my realtime server and i am still getting the websocket connection failed even with the new cli. Would appreciate any help with this!

from realtime.

filipecabaco avatar filipecabaco commented on May 18, 2024

Yeah this feels like it was from Studio UI. CC @semics-tech @calonzolg .

The logs themselves look ok for initialisation of the Realtime tenant information 🤔

What is the error you are seeing in the websocket connection @Deelaw97 ?

from realtime.

mrolafsson avatar mrolafsson commented on May 18, 2024

I am seeing this too; 431 Request Header Fields Too Large when trying to connect.

from realtime.

filipecabaco avatar filipecabaco commented on May 18, 2024

what version of cli are you using?

cc @ismael-su @Deelaw97

from realtime.

filipecabaco avatar filipecabaco commented on May 18, 2024

@mrolafsson can you show the request header when you try to upgrade the websocket?

from realtime.

ismael-su avatar ismael-su commented on May 18, 2024

@filipecabaco I'm using self hosted docker. I pull yesterday and restarted the compose stack, now it works.
I also suspect it had something to do with my nginx configuration.
To add more context, I use nginx as reverse proxy for SSL certificate purpose, then I redirect from nginx to kong.
Anyway it works fine now

from realtime.

Deelaw97 avatar Deelaw97 commented on May 18, 2024

@filipecabaco

supabase --version
1.115.4

from realtime.

filipecabaco avatar filipecabaco commented on May 18, 2024

@Deelaw97 and what appears in the studio logs?

from realtime.

Deelaw97 avatar Deelaw97 commented on May 18, 2024

Would you like my studio logs when I start the websocket connection, or at another time?
@filipecabaco

from realtime.

filipecabaco avatar filipecabaco commented on May 18, 2024

when the socket tries to start please

from realtime.

Deelaw97 avatar Deelaw97 commented on May 18, 2024

image
Above is the kong docker logs (im assuming you meant kong logs)
image
Above is the realtime logs
image
Above is studio logs

@filipecabaco The realtime container doesn't seem to be connected

from realtime.

filipecabaco avatar filipecabaco commented on May 18, 2024

just tried locally with fresh install and worked 🤔 what code are you using to connect?

here's my code using deno:

import {
  createClient,
  RealtimeChannel,
} from "npm:@supabase/[email protected]";

const url = "http://127.0.0.1:54321";
const apikey = "<api_key>";

const supabase = createClient(url, apikey);
const config = { broadcast: { self: true } };
const channel = supabase.channel("test", { config });

const event = "test";
const payload = { message: "msg" };

const n_messages = 1;
const interval = 1000;

const send = () => {
  [...Array(n_messages).keys()].map(() =>
    channel
      .send({ event, payload, type: "broadcast" })
      .then(console.log)
      .catch(console.error)
  );
};

function connect(channel: RealtimeChannel, interval: number) {
  channel.subscribe((status: string) => {
    console.log(status);
    if (status !== "SUBSCRIBED") throw new Error("not subscribed");
    setInterval(() => send(), interval);
  });
}

connect(channel, interval);

from realtime.

JunsikChoi avatar JunsikChoi commented on May 18, 2024

Same for me with [email protected]
status Channel Error with error undefined.

const channel = supabase
  .channel(`public:room_log:record_id=eq.${current_record.id}`)
  .on(
  'postgres_changes',
  {
	  event: '*',
	  schema: 'public',
	  table: 'room_log',
	  filter: `record_id=eq.${current_record.id}`
  },
  (payload) => {
	  console.log(payload);
  }
  )
  .subscribe((status, error) => {
  console.log(status);
  console.log(error);
	});

from realtime.

Deelaw97 avatar Deelaw97 commented on May 18, 2024
  useEffect(() => {
    const channel = supabase
      .channel("realtime_activities")
      .on(
        "postgres_changes",
        {
          event: "INSERT",
          schema: "public",
          table: "event",
        },
        payload => {
          console.log(payload);
        }
      )
      .subscribe();

    return () => {
      supabase.removeChannel(channel);
    };
  }, [queryClient]);

@filipecabaco One of my usecases. This is based on how supabase docs says to use realtime connections in https://supabase.com/docs/guides/realtime

from realtime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.