Skip to content
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

Error Domain=NSURLErrorDomain Code=-1011 "There was a bad response from the server." #16

Open
danhdevelop opened this issue Apr 14, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@danhdevelop
Copy link

Loop receiving NSURLErrorDomain error

Error Domain=NSURLErrorDomain Code=-1011 "There was a bad response from the server."

I am following the ReadMe.md and trying to init realtime connection, but only receive error as above. I checked the source code and look like there is no place to attach access_token to the connection. I believe that is the main reason of the error ( but not really sure yet)

To Reproduce

  1. Create an iOS sample project with Xcode
  2. Add package supabase realtime-swift
  3. Follow their ReadMe.md to declare the client instance and try to init the connection.

Screenshots

image

System information

  • Version of supabase realtime-swift: 0.0.2
@danhdevelop danhdevelop added the bug Something isn't working label Apr 14, 2023
@malachif-jpg
Copy link

I am having the same issue, were you able to figure this out?

@kurtguenther
Copy link

kurtguenther commented Jul 8, 2023

I ran into this issue when I incorrectly forgot to add the realtime/v1/ to the endpoint parameter.
From the logs you posted, it seems that you put /auth/v1 rather than realtime/v1

does NOT work:
RealtimeClient(endpoint: "http://myprojectname.supabase.co/")

works:
RealtimeClient(endpoint: "http://myprojectname.supabase.co/realtime/v1")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants