firecamp-io / firecamp

VSCode for APIs, Postman Alternative.
https://firecamp.dev
317 stars 22 forks source link

[Socket.io] [RE Use-Case] Unable to use the polling transport, and websocket just quickly disconnects #126

Closed MasicoreLord closed 3 years ago

MasicoreLord commented 4 years ago

Describe the bug While attempting to establish a connection to a service's socket.io, I got errors like xhr polling error (which internally was an unknown transport), and for websocket, no output in devtools network tab, and just quick disconnect.

To Reproduce Steps to reproduce the behavior: Since there's no cookie setting support yet as referenced in #120, you are going to have to open devtools (which was ctrl+shift+3 in my case on linux)

image (ignore bottom bit, the browser embedded in that tool won't let you define those headers, they are unticked, so they don't do anything)

Expected behavior I expect both to work fine w/o errors and let me establish a connection

Screenshots 0r Video If applicable, add screenshots to help explain your problem.

quickly disconnects w/ websockets

unknown transport and xhr polling error when polling is enabled

Platform (please complete the following information):

welcome[bot] commented 4 years ago

Welcome to the Firecamp! Thanks and congrats for opening your very first issue in Firecamp. Join the Discord community here https://discord.gg/8hRaqhK Hope you have a great time here :)

Nishchit14 commented 4 years ago

@MasicoreLord Thanks for sharing this case, It seems CORS issue at first glance. Can you please allow CORS policy with * and then try?

ketanISM commented 3 years ago

Hi, I am getting the exact same issue in Firecamp v2.0.0-rc-1.

v 1.4.7 it is connected. image

v v2.0.0-rc-1 It disconnects and tries to reconnect and again disconnect. image

Nishchit14 commented 3 years ago

@ketanISM, Thanks for sharing the case, would you like to connect over screen share? if yes then please send me DM in discord. I'm curious to understand your use-case.

Here is the discord invite, https://discord.gg/8hRaqhK

awesomelike commented 3 years ago

This error happened to me with the socket.io@3.1.0 on my server. Then I downgraded it to version 2.4.0. Now everything works fine :)

Nishchit14 commented 3 years ago

@awesomelike It's because Firecamp supports SocketIO v2.x.x at this moment, we're building support for SocketIO v3. It'll be available soon in Firecamp v2. stay tuned here https://discord.gg/8hRaqhK

bayareacoder commented 3 years ago

is there a version now that supports socket.io v3? I stumbled upon this thread since Firecamp doesn't connect for me. If it doesn't support a default latest version of a spec it should be clearly stated in the docs. When using socket.io@2.4.1 it works. Thanks.

Nishchit14 commented 3 years ago

@bayareacoder The SocketIOv3 support is now released in the canary version 🚀 v2.0.1-rc-4. You can download them from the below links. Linux, Mac, Win

cc @awesomelike @ketanISM @MasicoreLord

Nishchit14 commented 3 years ago

shiped with v2.0.