-
-
Notifications
You must be signed in to change notification settings - Fork 287
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 Realtime Subscript Fails With Undefined Error (Possibly: Auth error: tenant 'realtime-dev' not found
#746
Comments
More recent issues possibly related to this have been reported in supabase/supabase-js#679 |
Auth error: tenant
realtime-dev not found
Auth error: tenant
realtime-dev not found
Auth error: tenant 'realtime-dev' not found
Yes seems related 🤔 and that external id in the logs seems wrong ( Line 4 in edbd6a1
it's also still adding the public.tenant which was fixed on version 2.25.35 which is available with the CLI version in the brew beta channel related issue #745 |
Also facing the same thing, even the example on the supabase docs fail. It was working before updating the CLI. const channel = _supabaseClient
.channel("room1", {
config: {
broadcast: {
ack: true,
self: true,
},
},
})
.on("broadcast", { event: "cursor-pos" }, (payload) => {
console.log("Cursor position received!", payload);
})
.subscribe((status, error) => {
console.log("Channel status:", status, error);
if (status === "SUBSCRIBED") {
channel.send({
type: "broadcast",
event: "cursor-pos",
payload: { x: Math.random(), y: Math.random() },
});
}
}); This will always log Supabase CLI version: 1.112.0 |
Yeah same here I only began experiencing this after going to CLI version 1.112.0. |
the cli team will set 1.113.0 as stable to quickly fix this |
I went to
Solved the issue on my end, going to close this. |
Thanks for the help @filipecabaco !! |
no worries, sorry again for such a big inconvenient |
and above all thank you for reporting 🙏 |
this did not solve the issue for me. my supabase version is 1.113.2 running the above commands, and the version for my realtime container is notably, and similar to the issues here supabase/supabase#12544 both my when i run the output is: --
-- PostgreSQL database dump
--
-- Dumped from database version 15.1 (Ubuntu 15.1-1.pgdg20.04+1)
-- Dumped by pg_dump version 15.5 (Ubuntu 15.5-1.pgdg22.04+1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: realtime; Type: SCHEMA; Schema: -; Owner: postgres
--
CREATE SCHEMA realtime;
ALTER SCHEMA realtime OWNER TO postgres;
--
-- PostgreSQL database dump complete
-- and when i run: the output is: --
-- PostgreSQL database dump
--
-- Dumped from database version 15.1 (Ubuntu 15.1-1.pgdg20.04+1)
-- Dumped by pg_dump version 15.5 (Ubuntu 15.5-1.pgdg22.04+1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: _realtime; Type: SCHEMA; Schema: -; Owner: postgres
--
CREATE SCHEMA _realtime;
ALTER SCHEMA _realtime OWNER TO postgres;
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- Name: extensions; Type: TABLE; Schema: _realtime; Owner: supabase_admin
--
CREATE TABLE _realtime.extensions (
id uuid NOT NULL,
type text,
settings jsonb,
tenant_external_id text,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL
);
ALTER TABLE _realtime.extensions OWNER TO supabase_admin;
--
-- Name: schema_migrations; Type: TABLE; Schema: _realtime; Owner: supabase_admin
--
CREATE TABLE _realtime.schema_migrations (
version bigint NOT NULL,
inserted_at timestamp(0) without time zone
);
ALTER TABLE _realtime.schema_migrations OWNER TO supabase_admin;
--
-- Name: tenants; Type: TABLE; Schema: _realtime; Owner: supabase_admin
--
CREATE TABLE _realtime.tenants (
id uuid NOT NULL,
name text,
external_id text,
jwt_secret text,
max_concurrent_users integer DEFAULT 200 NOT NULL,
inserted_at timestamp(0) without time zone NOT NULL,
updated_at timestamp(0) without time zone NOT NULL,
max_events_per_second integer DEFAULT 100 NOT NULL,
postgres_cdc_default text DEFAULT 'postgres_cdc_rls'::text,
max_bytes_per_second integer DEFAULT 100000 NOT NULL,
max_channels_per_client integer DEFAULT 100 NOT NULL,
max_joins_per_second integer DEFAULT 500 NOT NULL,
suspend boolean DEFAULT false
);
ALTER TABLE _realtime.tenants OWNER TO supabase_admin;
--
-- Data for Name: extensions; Type: TABLE DATA; Schema: _realtime; Owner: supabase_admin
--
COPY _realtime.extensions (id, type, settings, tenant_external_id, inserted_at, updated_at) FROM stdin;
58130c7d-9e73-43ec-9e08-af7986875447 postgres_cdc_rls {"region": "us-east-1", "db_host": "+5JkR7EPoJsAtjz+cdk/ZPFhkdWGR4wQX4lYC4ulOel/kGxTTOC5bwX/RP2J3g7W", "db_name": "sWBpZNdjggEPTQVlI52Zfw==", "db_port": "+enMDFi1J/3IrrquHHwUmA==", "db_user": "uxbEq/zz8DXVD53TOI1zmw==", "slot_name": "supabase_realtime_replication_slot", "ip_version": 4, "db_password": "sWBpZNdjggEPTQVlI52Zfw==", "publication": "supabase_realtime", "ssl_enforced": false, "poll_interval_ms": 100, "poll_max_changes": 100, "poll_max_record_bytes": 1048576} realtime-dev 2023-11-21 16:47:58 2023-11-21 16:47:58
\.
--
-- Data for Name: schema_migrations; Type: TABLE DATA; Schema: _realtime; Owner: supabase_admin
--
COPY _realtime.schema_migrations (version, inserted_at) FROM stdin;
20210706140551 2023-11-21 16:43:32
20220329161857 2023-11-21 16:43:32
20220410212326 2023-11-21 16:43:32
20220506102948 2023-11-21 16:43:32
20220527210857 2023-11-21 16:43:32
20220815211129 2023-11-21 16:43:32
20220815215024 2023-11-21 16:43:32
20220818141501 2023-11-21 16:43:32
20221018173709 2023-11-21 16:43:32
20221102172703 2023-11-21 16:43:32
20221223010058 2023-11-21 16:43:32
20230110180046 2023-11-21 16:43:32
20230810220907 2023-11-21 16:43:32
20230810220924 2023-11-21 16:43:32
20231024094642 2023-11-21 16:43:32
\.
--
-- Data for Name: tenants; Type: TABLE DATA; Schema: _realtime; Owner: supabase_admin
--
COPY _realtime.tenants (id, name, external_id, jwt_secret, max_concurrent_users, inserted_at, updated_at, max_events_per_second, postgres_cdc_default, max_bytes_per_second, max_channels_per_client, max_joins_per_second, suspend) FROM stdin;
0af72a10-ac6b-40cf-a6b9-620440405dae realtime-dev realtime-dev iNjicxc4+llvc9wovDvqymwfnj9teWMlyOIbJ8Fh6j2WNU8CIJ2ZgjR6MUIKqSmeDmvpsKLsZ9jgXJmQPpwL8w== 200 2023-11-21 16:47:58 2023-11-21 16:47:58 100 postgres_cdc_rls 100000 100 100 f
\.
--
-- Name: extensions extensions_pkey; Type: CONSTRAINT; Schema: _realtime; Owner: supabase_admin
--
ALTER TABLE ONLY _realtime.extensions
ADD CONSTRAINT extensions_pkey PRIMARY KEY (id);
--
-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: _realtime; Owner: supabase_admin
--
ALTER TABLE ONLY _realtime.schema_migrations
ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
--
-- Name: tenants tenants_pkey; Type: CONSTRAINT; Schema: _realtime; Owner: supabase_admin
--
ALTER TABLE ONLY _realtime.tenants
ADD CONSTRAINT tenants_pkey PRIMARY KEY (id);
--
-- Name: extensions_tenant_external_id_type_index; Type: INDEX; Schema: _realtime; Owner: supabase_admin
--
CREATE UNIQUE INDEX extensions_tenant_external_id_type_index ON _realtime.extensions USING btree (tenant_external_id, type);
--
-- Name: tenants_external_id_index; Type: INDEX; Schema: _realtime; Owner: supabase_admin
--
CREATE UNIQUE INDEX tenants_external_id_index ON _realtime.tenants USING btree (external_id);
--
-- Name: extensions extensions_tenant_external_id_fkey; Type: FK CONSTRAINT; Schema: _realtime; Owner: supabase_admin
--
ALTER TABLE ONLY _realtime.extensions
ADD CONSTRAINT extensions_tenant_external_id_fkey FOREIGN KEY (tenant_external_id) REFERENCES _realtime.tenants(external_id) ON DELETE CASCADE;
--
-- PostgreSQL database dump complete
--
|
I have same issue with supabase@1.115.4 |
@JunsikChoi can you confirm the solution was the one you shared in #748 ? |
Yes, it resolved completely for now. Realtime works great in local dev. |
😌 glad it worked! again big thank you for finding the solution 🙏 |
Bug report
Describe the bug
On the latest Supabase CLI (
1.112.0
) with the latest Supabase.js (2.38.4
) (albeit, which is not using the latest realtime, since the latest CLI is only usingpublic.ecr.aws/supabase/realtime:v2.25.27
, but a PR is already there to bump this) when attempting to create a realtime subscription, I get the following error:Sample Code
Detailed Logs
Subscription Error Logs
These logs appear as soon as I attempt to create a realtime subscription (omitting the startup logs in the next section):
Start-up Logs
These are the logs before attempting to create a realtime subscription (I'll omit these in the previous section of logs for brevity):
To Reproduce
Not entirely sure. We can give temporary repo access to someone at supabase (just don't want it public). Here are the project details:
"use client"
at the top of the file)Expected behavior
Screenshots
See above.
System information
13.3 (22E252)
Version 119.0.6045.159 (Official Build) (arm64)
2.38.4
(with CLI version1.112.0
)18.17.1
Additional context
As I mention above, I'll happily give the Supabase team access to our repo if you have trouble reproducing, it's not super sensitive, but enough so that I don't want to make the repo public.
The text was updated successfully, but these errors were encountered: