Hassan Iyan
Hassan Iyan

Reputation: 11

TypeError: undefined is not an object (evaluating 'window.location.href')

i have been creating a app with supabase and expo and before it worked correctly... but now it keeps getting this error...

TypeError: undefined is not an object (evaluating 'window.location.href')

at node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException

at node_modules/react-native/Libraries/Core/ExceptionsManager.js:172:19 in handleException

at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError

at node_modules/@react-native/polyfills/error-guard.js:49:36 in ErrorUtils.reportFatalError

at node_modules/metro-runtime/src/polyfills/require.js:204:6 in guardedLoadModule

at http://192.168.100.31:19000/node_modules/expo/AppEntry.bundle?platform=android&dev=true&hot=false&minify=false:122163:3 in global code

my code for database.js is:

import { createClient } from '@supabase/supabase-js'

const supabaseUrl = process.env.SUPABASE_APIURL

const supabaseKey = process.env.SUPABASE_KEY

export default supabase = createClient(supabaseUrl, supabaseKey)

Upvotes: 1

Views: 2151

Answers (1)

Daan
Daan

Reputation: 11

I encoutered the same bug and created an issue for it on their gh repo. It should be fixed once they merge it and release it. https://github.com/supabase/supabase/issues/3790

Upvotes: 1

Related Questions