-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Flutter: Not working on some devices #1613
Comments
Can you try reproducing with the |
Seems to be someting with the sockets. Same beaviour when using the Websocket class. After flashing a newer Android, it won't connect on the XT1092 either. |
Should this then be moved to dart-sdk? Or flutter? I don't know what might be different under the hood on different android versions/emulator/real devices... |
I am having problem to: I can't connect using local network ip such as ws://192.168.1.22:1024 (or with our : ). Also Seems I cannot find any good documentation to connect my Flutter mobile app using my local wireless network to connect to my local network socket services. |
I have to clarify this: After latest flutter updates, it works when the device is connected via WiFI but it is sending the wrong headers when using LTE. In my opinion there shouldn't be a difference in how a device is connecting to a websocket server. And again, this might be the wrong place for the issue. It would be nice if it could be moved to the proper location, if this is the case. |
Any news for this ? Is is stable enought for a production application with flutter ? |
My websocket app work on debug mode but doesn't on release mode |
It sounds like this issue is related strictly to networking in flutter - please follow or reply on https://github.com/flutter/flutter/issues/29688 There isn't anything we can do in this package to work around flutter emulator, device, or permission issues. |
In addition to the permission, some cases might have issue with the websocket upgrade. I originally had the same issue as others when I was using Golang's default net/http websocket but I could solve with Gorilla package's websocket with the upgrader. https://github.com/gorilla/websocket/tree/master/examples/echo I suspect that the server should have a websocket upgraded already to serve the websocket client of dart:io and web_socket_channel so that the code in the link may help somebody. (Sorry for being late to the discussion) |
I am having the same issue as well. A simple websocket app works perfectly fine on a Samsung A10 device and iPhone 6, but does not work on Xiaomi pocophone f1. I am using piesocket.com (Free tier) |
OK, the issue was about adding: |
While testing out https://flutter.io/cookbook/networking/web-sockets/ example, I found some strange behaviour I cannot explane to myself.
When connecting to a websocket server with an old Android device (Moto XT1092, Android 6.0.1) or the Android emulator (Android P) everything works fine.
When connecting with a Pixel 2 I get an 'Connection not upgraded' exception. Some debugging on the server side shows that the incoming request does not have the 'Upgrade' header. Looking at source codes I could not find any clue, why the code should be different on different devices.
Am I missing something?
The text was updated successfully, but these errors were encountered: