-
Notifications
You must be signed in to change notification settings - Fork 12
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
soccer io errors on init() #9
Comments
Resolved: Maybe this will help someone else who happens to face this issue. |
The problem is about your base url To enable websocket on nginx, use just this in your server block:
Your must have: https://www.mysite.xyz as baseUrl The "flutter: WebSocketException: Connection to 'https://www.mysite.xyz:0/socket.io/?EIO=3&transport=websocket#' was not upgraded to websocket" mean that flutter_feathersjs cannot reach out the socketio server because the baseUrl is incorrect. Let me known if this help |
Hi Team
I am having this issue when running the init with base url
my init looks like this
flutterFeathersjs.init(baseUrl: "https://www.mysite.xyz/api/");
I.m initialising the instance from an Oninit() hook in my GetxController
flutter logs this error :
flutter: WebSocketException: Connection to 'https://www.mysite.xyz:0/socket.io/?EIO=3&transport=websocket#' was not upgraded to websocket
Notice the https://www.mysite.xyz**:0** (colon zero at the end of the url...port being added to the url in the error message)
I don't know if this is the problem why ...I am testing my backend and all configs are fine on the backend.
this is my Nginx: (for that block - its all that that's required right?)
location /api {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:10123;
}
all my restful services work fine via postman only when I use this lib and run this init...I get the socket upgrade issue
can someone please assist (is there something that's appending the :0 at the end of the url?)
The text was updated successfully, but these errors were encountered: