URL.hostname is not implemented

See original GitHub issue

Bug report

Describe the bug

Just upgraded to supabase v2.0.0-rc.1 and getting a URL.hostname is not implemented error.

This is a React Native/Expo app.

To Reproduce

Do the following in an expo app:

export const supabase = createClient<Database>(SUPABASE_URL, SUPABASE_ANON_KEY, {
  auth: {
    persistSession: true,
    autoRefreshToken: true,
    detectSessionInUrl: true,
  },
})

Screenshot

image

Additional context

Never had problems in v1, so this is related to the latest update.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

10reactions
vbylencommented, Aug 21, 2022

error disappeared after importing this polyfill in the same file where I was importing the client:

import 'react-native-url-polyfill/auto'

import { createClient } from '@supabase/supabase-js'
4reactions
javierguzmancommented, Nov 28, 2022

Hello! I just got this error as well and I do not understand why this was closed @monicakh; The solution by @vbylen is more a workaround than anything else

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error "URL.hostname is not implemented", AWS SNS in React ...
When I try to create an endpoint (or execute really any command through AWS) I'm getting this error URL.hostname is not implemented.
Read more >
Error "URL.hostname is not implemented", AWS SNS in React ...
Coding example for the question Error "URL.hostname is not implemented", AWS SNS in React Native Android-React Native.
Read more >
React Native URLSearchParams - Error: Not Implemented
The problem stems from the Supabase PostgREST-js library using the URLSearchParams Web API to convert this Supabase query into a URL.
Read more >
react-native-url-polyfill - npm
react-native-url-polyfill is a full implementation of the WHATWG URL Standard optimized for React Native. Lightweight.
Read more >
URL.protocol is not implemented error? Anyone familiar with ...
So i just got back into building things using react-native and I'm hitting a snag trying to access an API. I'm trying to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found