Skip to content
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

[CLOSED] [iOS] Connection dies if no subscription value in settings #22

Closed
jpmens opened this issue Feb 4, 2014 · 8 comments
Closed
Labels

Comments

@jpmens
Copy link
Member

jpmens commented Feb 4, 2014

Issue by sumnerboy12 from Monday Jan 13, 2014 at 05:56 GMT
Originally opened as https://github.com/binarybucks/mqttitude/issues/263


I cleared the subscription config on my wife's iPhone since I only want Mqttitude to send enter/leave events and don't care about any other messages (also set to manual mode).

However once I did this all I saw on my broker were LWT messages from her phone. The connection details were ok, since the LWT publishes were coming through, but any time I entered or left a region or tried to manually publish I just got a LWT.

When attempting a manual publish the connection status icon flashed yellow and then went red. Checking the status page showed a 'NSOSStatusErrorDomain -9806' error.

I tried all sorts of different things and was about to log the bug, when I remembered removing the subscription settings. I added it back and voila - everything started working again!

So it seems with an empty subscription value, the app fails to send any location publishes, even though it can connect ok.

This is only on iOS, my Android phone seems fine with an empty subscription value.

@jpmens
Copy link
Member Author

jpmens commented Feb 4, 2014

Comment by jpmens from Monday Jan 13, 2014 at 07:23 GMT


my Android phone seems fine with an empty subscription value.

If you feel like starting your MQTT broker in debug mode, I think you'll see Android subscribes with a default of mqttitude/+/+ (the broker's debug log will show what the client is subscribing with).

@jpmens
Copy link
Member Author

jpmens commented Feb 4, 2014

Comment by jpmens from Monday Jan 13, 2014 at 07:25 GMT


If you want to work around the issue for the moment, you could set your wife's phone to subscribe to a topic branch you won't be using (e.g. "nothing/dear"); that way the phone won't be "pestered" :-)

@jpmens
Copy link
Member Author

jpmens commented Feb 4, 2014

Comment by sumnerboy12 from Monday Jan 13, 2014 at 07:26 GMT


Yep - noticed this just before actually - the field is empty but in light grey it shows mqttitude/+/+ - and I noticed my wife's location popping up. So yes, I can confirm the Android app still subscribes.

@jpmens
Copy link
Member Author

jpmens commented Feb 4, 2014

Comment by sumnerboy12 from Monday Jan 13, 2014 at 07:27 GMT


Yeah it is not a big issue for me - I am happy to have a subscription in there - but it took me a good hour of debugging to figure out what was going wrong so I figured it was worth noting here so Chris can have a look. Might cause others some headaches otherwise.

@jpmens
Copy link
Member Author

jpmens commented Feb 4, 2014

Comment by jpmens from Monday Jan 13, 2014 at 07:28 GMT


Yes, and that is good! We wanted it thusly. I think your use-case is rather special. :-)

@jpmens
Copy link
Member Author

jpmens commented Feb 4, 2014

Comment by sumnerboy12 from Monday Jan 13, 2014 at 07:32 GMT


Yep - happy with that, since I will disable auto-publishing on both apps once the geofence stuff is finished for Android.

@jpmens
Copy link
Member Author

jpmens commented Feb 4, 2014

Comment by ckrey from Monday Jan 13, 2014 at 08:42 GMT


Good you found that one!
I never thought of switching the subscription off...

The app tries to subscribe with a zero length Topic Filter and the server correctly reacts by closing the connection.

With 5.6, I will suppress the subscription if the the topic filter is specified as empty (zero length).

@jpmens
Copy link
Member Author

jpmens commented Feb 4, 2014

Comment by sumnerboy12 from Monday Jan 13, 2014 at 08:55 GMT


Happy to help!

@jpmens jpmens closed this as completed Feb 4, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant