You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a similar-sounding and possibly related bug here: #786
But the workaround appears to be React-specific and doesn't seem to address the underlying problem.
Describe the bug
I wrote a Deno-based server that is attempting to use Supabase. Upon attempting to insantiate the Supabase client, the application stops with an assertion thrown from GoTrueClient.js, _isImplicitGrantFlow():
In GoTrueClient.js, _isImplicitGrantFlow()
Exception has occurred: ReferenceError: window is not defined
at SupabaseAuthClient._isImplicitGrantFlow (file:///Users/stokestack/Library/Caches/deno/npm/registry.npmjs.org/@supabase/auth-js/2.64.2/dist/main/GoTrueClient.js:1138:62)
at SupabaseAuthClient._initialize (file:///Users/stokestack/Library/Caches/deno/npm/registry.npmjs.org/@supabase/auth-js/2.64.2/dist/main/GoTrueClient.js:170:64)
at file:///Users/stokestack/Library/Caches/deno/npm/registry.npmjs.org/@supabase/auth-js/2.64.2/dist/main/GoTrueClient.js:155:35
at file:///Users/stokestack/Library/Caches/deno/npm/registry.npmjs.org/@supabase/auth-js/2.64.2/dist/main/GoTrueClient.js:749:36
at SupabaseAuthClient.lockNoOp [as lock] (file:///Users/stokestack/Library/Caches/deno/npm/registry.npmjs.org/@supabase/auth-js/2.64.2/dist/main/GoTrueClient.js:33:18)
at SupabaseAuthClient._acquireLock (file:///Users/stokestack/Library/Caches/deno/npm/registry.npmjs.org/@supabase/auth-js/2.64.2/dist/main/GoTrueClient.js:745:31)
at file:///Users/stokestack/Library/Caches/deno/npm/registry.npmjs.org/@supabase/auth-js/2.64.2/dist/main/GoTrueClient.js:154:31
at SupabaseAuthClient.initialize (file:///Users/stokestack/Library/Caches/deno/npm/registry.npmjs.org/@supabase/auth-js/2.64.2/dist/main/GoTrueClient.js:157:11)
at new GoTrueClient (file:///Users/stokestack/Library/Caches/deno/npm/registry.npmjs.org/@supabase/auth-js/2.64.2/dist/main/GoTrueClient.js:136:14)
at new SupabaseAuthClient (https://jsr.io/@supabase/supabase-js/2.44.3/src/lib/SupabaseAuthClient.ts:6:5)
To Reproduce
Set up a local-development environment for Supabase, and populate its public DB schema with a few tables. Run the Supabase TypeScript type generation on it and direct the output to DBTypes.ts in the source directory struture of any Deno project.
I'm not familiar with how you're using Deno, but if you add this option to your client, you shouldn't see the error. It's implying that you aren't doing implicit auth (and maybe you don't need auth anyway), and therefore won't call the _isImplictGrantFlow code.
Thanks. I wouldn't say it's resolved, though, because this outcome isn't documented (as far as I've seen). If you invoke the client as documented, it fails.
Bug report
There is a similar-sounding and possibly related bug here: #786
But the workaround appears to be React-specific and doesn't seem to address the underlying problem.
Describe the bug
I wrote a Deno-based server that is attempting to use Supabase. Upon attempting to insantiate the Supabase client, the application stops with an assertion thrown from GoTrueClient.js, _isImplicitGrantFlow():
In GoTrueClient.js, _isImplicitGrantFlow()
To Reproduce
Set up a local-development environment for Supabase, and populate its public DB schema with a few tables. Run the Supabase TypeScript type generation on it and direct the output to DBTypes.ts in the source directory struture of any Deno project.
In that Deno project, try this:
Expected behavior
The client is created and I can start executing queries with it.
Screenshots
System information
OS: [e.g. macOS, Windows]
Mac OS version 14.5
Browser (if applies) [e.g. chrome, safari]
N.A.
Version of supabase-js: [e.g. 6.0.2]
I guess version 2, based on the import statement I'm using.
Version of Node.js: [e.g. 10.10.0]
N.A.
Additional context
Obviously this is a show-stopper.
The text was updated successfully, but these errors were encountered: