-
Notifications
You must be signed in to change notification settings - Fork 30
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
No details or reasons given for connection failed #78
Comments
I've seen this recently myself, it will say could not connect and post the next retry time, which was oddly a few seconds before when i went to look at the connection. If i disable and re-enable it then it connects perfectly fine. |
I started poking at this a little, I'm not the best at java code but looks like paho might have some updates, or the code on the github here is old. there were some updates to paho in february but the last update in the play store was from january. I compiled from where the branch for multiple brokers was merged in and its showing me v4.2.1b after i installed the app, wheras the app on the play store shows 4.5.1, i might be doing something wrong though. I tried to add the implementation lines for paho to the project on my local code that i pulled down but getting a little stuck with that and what looks like some build conflicts after I added paho dependencies which look to be newer than what is in the code here. |
Hey, I have customized paho code so as to achieve some functionalities that were not available in paho. Let me look into what can be done to show a reason for connection failure. |
Anything new on this? I haven't had a chance to rip out the other stuff and add an updated paho to see if it helps, anyone else? |
disgustipated <[email protected]> writes:
Anything new on this? I haven't had a chance to rip out the other
stuff and add an updated paho to see if it helps, anyone else?
No, sorry, I haven't had a chance to look at this again.
Possibly the issue I was having was because I mistyped in my mqtt
credentials. However the error presented to the user doesn't give any
level of information as to what stage it reached before it failed.
--
Brian May <[email protected]>
https://linuxpenguins.xyz/brian/
|
@brianmay @disgustipated |
I think my issue for the need to see why the disconnect happened was more it simply wont reconnect. It says that its going to try again but the next time its going to try is in the past. I'll log another one for that issue, perhaps the paho update would fix that... |
@disgustipated If we don't have anything in the logs for why the reconnect fails, I don't think Paho or the Application code is to be blamed. I believe it's Android/Phone manufacturer's strict battery saving policy. These days, most apps use FCM to notify that a new event has occured. But, this is not possible in our case because we don't have a server that could integrate FCM for us. |
Ideally it would display the reason. However, I understand this requires somebody to actually implement that, which might be the difficulty :-) I would suggest instead that the documentation refer to logcat as a way to debug failures. Then would be happy to close this ticket. |
If the connection fails for any reason, there is no details given what went wrong. This makes it particularly difficult to troubleshoot SSL connections, which could be failing for any number of reasons. Looking at the server logs, all it says is that the connection has been disconnected, and other clients can connect fine.
The text was updated successfully, but these errors were encountered: