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

Stuck on "Establishing Gateway connection" #12

Closed
Melonking906 opened this issue Apr 28, 2022 · 32 comments
Closed

Stuck on "Establishing Gateway connection" #12

Melonking906 opened this issue Apr 28, 2022 · 32 comments
Labels
bug Something isn't working

Comments

@Melonking906
Copy link

Trying this out as a native alternative to Ripcord (by cancel.fm)! Looks like a cool project!
When I open the app it seems to just sit on "Establishing Gateway connection" without progressing.

Looking at its network traffic in LittleSnitch, it sends a request to "discord.gg" when first launched but it never gets a reply and it does not make any more requests.

Swiftcord v0.2.2(3) - Pre-built provided on GitHub
MacOS v12.3.1
Macbook Pro M1 Pro

@cryptoAlgorithm
Copy link
Member

Ok, are you comfortable running the app in Xcode? That way I can get useful logs that might help with the issue. Alternatively, you can look into the console logs and filter by Swiftcord, but it tends to get drowned in the flood of logs.

@cryptoAlgorithm
Copy link
Member

@Melonking906 joining the discord server here would allow me to respond to you faster, important for debugging!

@cryptoAlgorithm cryptoAlgorithm added the bug Something isn't working label Apr 30, 2022
@cryptoAlgorithm
Copy link
Member

I'll close the issue in a few day's time if there's no more input from @Melonking906, with the assumption the issue is now resolved.

@cryptoAlgorithm
Copy link
Member

No more input was received from the OP - closing the issue.

@EvanLuo42
Copy link

Log:
Error when receiving: The operation couldn’t be completed. (kNWErrorDomainPOSIX error 57 - Socket is not connected)

Perhaps it is caused by proxy. Maybe add custom proxy address setting would solve this, because of the GFW. I think that the app network traffic default not through ClashX or other proxy app.

@cryptoAlgorithm
Copy link
Member

Yeah, this log happens all the time when the internet connection isn't available. Could you see if it works without your proxy enabled?

@EvanLuo42
Copy link

Yeah, this log happens all the time when the internet connection isn't available. Could you see if it works without your proxy enabled?

No, it couldn't work.

@EvanLuo42
Copy link

Yeah, this log happens all the time when the internet connection isn't available. Could you see if it works without your proxy enabled?

My location is in China, so I even couldn't connect to the Discord server by official client.

@EvanLuo42
Copy link

Yeah, this log happens all the time when the internet connection isn't available. Could you see if it works without your proxy enabled?

And I read the proxy log. It said it went through the proxy. (Now the proxy is enabled.) I think it shouldn't be proxy's wrong.

@cryptoAlgorithm
Copy link
Member

Ok, I see. What proxy are you using, and does it work if you use the discord client in a browser?

@EvanLuo42
Copy link

Ok, I see. What proxy are you using, and does it work if you use the discord client in a browser?

I'm using ClashX and the subscription is from cloud.faster.buzz. It works fine in discord client using Safari.

@cryptoAlgorithm
Copy link
Member

Screenshot 2022-05-27 at 2 58 16 PM

Could you use the built in proxy settings in macOS to connect to your proxy? It might work that way.

@EvanLuo42
Copy link

Ok, I see. What proxy are you using, and does it work if you use the discord client in a browser?

I have seen this kind of problem before while using Infuse. Perhaps it is caused by ClashX. Because it also worked fine if I turned off ClashX or using other proxy app.

@EvanLuo42
Copy link

Screenshot 2022-05-27 at 2 58 16 PM

Could you use the built in proxy settings in macOS to connect to your proxy? It might work that way.

My current macOS setting had enabled proxy.

@EvanLuo42
Copy link

Screenshot 2022-05-27 at 2 58 16 PM

Could you use the built in proxy settings in macOS to connect to your proxy? It might work that way.

Maybe I can try to use other proxy app.

@cryptoAlgorithm
Copy link
Member

Normally, native apps should follow the system proxy setting, but I might be wrong. I'll keep this issue open for input from other contributors.

@EvanLuo42
Copy link

Normally, native apps should follow the system proxy setting, but I might be wrong. I'll keep this issue open for input from other contributors.

Ok, thank you, and I'm going to try to use other proxy app. If it worked, I'll tell you.

@EvanLuo42
Copy link

Normally, native apps should follow the system proxy setting, but I might be wrong. I'll keep this issue open for input from other contributors.

I'm wrong, it was not the issue of ClashX. I changed another proxy app call QV2ray, it still stuck on Establishing Gateway connection.

@cryptoAlgorithm
Copy link
Member

Ok. Firstly what swiftcord version are you using? Next, are there any interesting thing in the log that might tell us why it can't open a web socket connection?

@EvanLuo42
Copy link

Ok. Firstly what swiftcord version are you using? Next, are there any interesting thing in the log that might tell us why it can't open a web socket connection?

It’s 0.4.0. And I only found the error I showed before. Let me check what is in front of that error.

@EvanLuo42
Copy link

Ok. Firstly what swiftcord version are you using? Next, are there any interesting thing in the log that might tell us why it can't open a web socket connection?

image

I don't know which log is useful

@cryptoAlgorithm
Copy link
Member

Could you run it from Xcode? That would give better logs. Also the logs that aren't errors are important too, so do not just filter by errors.

@EvanLuo42
Copy link

Could you run it from Xcode? That would give better logs. Also the logs that aren't errors are important too, so do not just filter by errors.

Ok, I'm fetching dependencies.

@EvanLuo42
Copy link

Could you run it from Xcode? That would give better logs. Also the logs that aren't errors are important too, so do not just filter by errors.

It's a little bit hard for me to fetch dependencies I think. I don't know why the package manager is that slow.

@cryptoAlgorithm
Copy link
Member

Could it be because of your proxy? It fetches in a few seconds for me

@EvanLuo42
Copy link

Could it be because of your proxy? It fetches in a few seconds for me

It should be the proxy problem. Never solved. The same when I was programming iOS app.

@0ihsan
Copy link

0ihsan commented May 28, 2022

I am proxying my macOS network through my iPhone and having the same issue.

@cryptoAlgorithm
Copy link
Member

@EvanLuo42 As I'm unable to reproduce both your situation and this bug, I can't work on a potential fix. I'll mark this won't fix for now, but if someone can provide more detailed logs on what's going on or tell me how I can reproduce it, I'll take a look at it.

@cryptoAlgorithm
Copy link
Member

@0ihsan Hi! can i get more details like the version of swiftcord youre using, as well as logs relevant to the issue?

@EvanLuo42
Copy link

EvanLuo42 commented May 28, 2022

Sorry, I didn’t explain in a clear way. I’m going to explain it more to help you setup my network environment. I’ll send you a email with my proxy address and how to connect.

@cryptoAlgorithm
Copy link
Member

@EvanLuo42 Ah no worries. You can send it to my GitHub email, or thru a Discord DM.

@cryptoAlgorithm
Copy link
Member

@EvanLuo42 Lets move this to a discussion so I can close this issue.

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

4 participants