RealtimeClient does not connect but SupabaseClient does
Omarzipan opened this issue · comments
Bug report
Describe the bug
When initializing the RealtimeClient with my project URL, I cannot connect to a channel, I instantly receive an error status. When using the exact same configuration with SupabaseClient (from the normal supabase client lib), I can connect.
To Reproduce
Initialize my client library like so:
const realtimeClient = new RealtimeClient('wss://<my-project-id>.supabase.co/realtime/v1', {
params: {
apiKey: supabaseAnonKey,
eventsPerSecond: MAX_EVENTS_PER_SECOND,
},
})
Expected behavior
I can connect as I would with the SupabaseClient
Screenshots
If applicable, add screenshots to help explain your problem.
System information
- OS: macOS
- Browser: Chrome
- Version of supabase-js: ^2.0.2 for supabase-js, ^2.1.0 for realtime-js
- Version of Node.js: 16.15.1
Additional context
Any help is appreciated :)
closing this as the issue was because I had initialized the client with apiKey
and not apikey
(capitalization!)
some stronger types here would help :)