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

Connection Lost #186

Closed
aayushdesai opened this issue Sep 25, 2024 · 9 comments · May be fixed by #192
Closed

Connection Lost #186

aayushdesai opened this issue Sep 25, 2024 · 9 comments · May be fixed by #192
Labels
bug Something isn't working

Comments

@aayushdesai
Copy link

I am trying to log into an Overleaf Community server hosted by my institute. I can login both via password and via cookies. I know it has logged in, because I can see the listed projects. But I cannot open any of them as VS Code keeps reporting connection lost.

I see that this issue was raised late last year and resolved. But I seem to have hit the same snag.

The exact error pop up is:

Unable to read file 'overleaf-workshop://overleaf.xxx/Project?user=66f414971c496299c1f6a6ccasdfa&project=66f414c51c496299c1f6a6fcadsf' (Error: Connection lost)

What should I do?

@aayushdesai aayushdesai added the bug Something isn't working label Sep 25, 2024
@iamhyc
Copy link
Owner

iamhyc commented Sep 26, 2024

Hi @aayushdesai , the mentioned issue may not be related.

Please firstly check if the full URL entered of the hosted server is correct:

  • Is it http or strictly https website? If you are not sure, please try both the cases.
  • Is the full access name www.overleaf.xxx or not? (in such case www could not be ignored)

@aayushdesai
Copy link
Author

Hello, I tried http and https, and got the same problem.

The full access name is https://overleaf.servername.

@iamhyc
Copy link
Owner

iamhyc commented Sep 28, 2024

Hello, I tried http and https, and got the same problem.

The full access name is https://overleaf.servername.

@aayushdesai Hi, the "connection lost" is the failure of socket.io (websocket) connection, and the extension should work correctly with recent commercial and community version. I suggest you check the URL again and check the network proxy following the guidance here. If you find "connect lost" happened after waiting some time, it is more likely a network issue.

If possible, please let us know which version of socket.io the server used. You can open the project in webpage, and check the full URL via the developer console as follows (the hostname is not necessary and you can occlude it)

图片

@aayushdesai
Copy link
Author

@iamhyc, thanks. Here is the version of socket.io the server is using:
Screenshot 2024-09-30 at 10 54 15 AM

Moreover as I mentioned, the server is reachable, as I am able to see my projects. The disconnection only arises when I try to open any of my projects. I tried to enable/disable network proxy, but still face the same issue. I am a bit skeptical about using invisible mode as I would have to manually commit my changes, which sort of beats the point.
But if there seems to be no other solution, I might give it a go as well.

Thanks

@iamhyc
Copy link
Owner

iamhyc commented Sep 30, 2024

@iamhyc, thanks. Here is the version of socket.io the server is using:

Moreover as I mentioned, the server is reachable, as I am able to see my projects. The disconnection only arises when I try to open any of my projects. I tried to enable/disable network proxy, but still face the same issue. I am a bit skeptical about using invisible mode as I would have to manually commit my changes, which sort of beats the point. But if there seems to be no other solution, I might give it a go as well.

Thanks

Thanks for the feedback. However, as the address /socket.io/1/... implied, the socketio connection process should be handled correctly in our code.

I still doubt the domain name is wrong. Can you show us more information of the socketio connection address above? E.g. is it
https://www.xxx.com/..., http://xxx.com/..., https://xxx.com/yyy/..., or something else. It would be helpful.
Then, please remove the previous server in the extension list, and re-create with the correct URL once again.

Besides, please also try to attach the developer logs of "Overleaf-Workshop" extension in VS Code when open the project.
Please find it via Title bar "Help" > "Toggle Developer Tools" > "Console".
The socketio connection logs will be look like below for a success connection.

@aayushdesai
Copy link
Author

Screenshot 2024-09-30 at 11 27 20 AM
Screenshot 2024-09-30 at 11 31 03 AM
PFA the requested logs

@iamhyc
Copy link
Owner

iamhyc commented Sep 30, 2024

So the connection lost is due to 404, quite weird. The web address used for socketio must be wrong.

@aayushdesai
Copy link
Author

So is there anything I can do to address that?

@iamhyc iamhyc linked a pull request Oct 1, 2024 that will close this issue
@iamhyc
Copy link
Owner

iamhyc commented Oct 1, 2024

So is there anything I can do to address that?

I got no idea. For now, I can create a debug version for you, which will print out the full URL used by socketio in developer console.
You can download the temporary extension here: https://github.com/iamhyc/Overleaf-Workshop/actions/runs/11120227744?pr=192

If you find the printed "Internal Socket URL" is exactly what you see in the browser, then it should be the network problem of VS Code, for some reason.

@iamhyc iamhyc closed this as completed Dec 27, 2024
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

Successfully merging a pull request may close this issue.

2 participants