-
Notifications
You must be signed in to change notification settings - Fork 179
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
Error when running with flutter #22
Comments
OK, I think I've seen this before, your disconnecting from the broker, try it again with logging on, client.logging(true); |
Bit more on this, I've fixed the exception, it actually means the broker has not accepted the connection request for on of the following if (ackMsg.variableHeader.returnCode == or the incoming ack message cannot be decoded at all. |
Thank you, I will try the new version soon... |
Republished version 1.9.1 |
Maybe the names should be changed?
One ChangeNotifier is in the |
Flutter doesn't really play nice with this. It looses connection to my test device. It could be my fault but idk. |
Try prefixing your import of the mqtt_client, import 'package:mqtt_client/mqtt_client.dart' as mqtt; then anywhere where you use ant of it prefix it with 'mqtt.' this should stop name clashes. You can do this with any packages. |
Yes, I never used flutter but this looks wrong, 'uri = http://127.0.0.1:8106/', mqtt_client just connects to its broker over a socket as shown in the example e.g test.mosquito.org on port 1883(default), there's no HTTP involved, also its logging as 127.0.0.1 which is localhost. I'm sure there are other flutter users that are using the client, maybe ask on flutter list. |
I'm not really sure what the problem is here, but I got it all working with this fork and the example (located in readme.md). If you want to dig further I'd be happy to help although my experience with flutter and dart is pretty minimal. Otherwise you can close this issue. |
Ok, thanks |
Built build/app/outputs/apk/debug/app-debug.apk. |
So I get this error when trying to run the example as a flutter (0.5.1) app. Any ideas on what could be wrong?
The text was updated successfully, but these errors were encountered: