TTN Mapper crashing on login

Trying to use TTN mapper for the first time with my existing TTN account and Android 8.0.0. Immediately after successful login it comes up with App Stopped.

I am having the same problem. TTN Mapper app stops immediately, but the TTN Remote app works fine.

I emailed the developer as his FAQ page suggests, and he replied with the following explanation. Iā€™m passing this along, hoping that this can be solved in the future.

From JP Meijers:

Iā€™m assuming that you are using a very new version of Android (>8.1). Android got very paranoid about background connections and started killing apps that has a background connection open. Currently TTN Mapper is compiled for an older version of Android to avoid this issue, as old apps were still allowed to have these background connections. From what you tell me this temporary exception by Android has stopped, and we are back at the original issue.

The background connection I am talking about is the MQTT connection to TTNā€™s servers. Google is trying to push us to use Google Cloud Messaging, their own push service which is more energy efficient. I havenā€™t found a way to get MQTT to work with these new Android policies, and I am waiting for the Paho MQTT library to be updated to hopefully work again.

So unfortunately this is bad news and I do not know of a workaround to get the app to work on your phone. Please keep an eye out to see if I publish an update to the TTN Mapper app.

Best regards

JP Meijers

1 Like

I have the same problem with TTN mapper, the application crashes every time I try to login into the TTN console (Android ver. 8.0.0).

One possible way to avoid that problem is instead of login and selecting device form the TTN console, just to manually copy/paste the corresponding parameters from the TTN console by choosing ā€œManually Configurateā€ option in the settings menu.

Yes, I tried adding the credentials manually, but when I try to start mapping, it canā€™t connect to the MQTT server. It tries 10 times then quits. JP Meijers reply above talks about the MQTT connection failing. I have carefully checked to make sure the credentials were entered correctly. The same credentials work fine from a command line session with mosquitto_sub on a Raspberry Pi system. Letā€™s hope for an update.

I connected a Bluetooth keyboard to my phone and copiwd the credentieals between console and the app. It is a acceptable workaround for now.

Iā€™m on Android 8.0 so cannot test, but: doesnā€™t 8.1 provide user settings to explicitly grant additional rights? Like for 8.0 on a Sony device I see the following; maybe 8.1 shows some more?

(Itā€™s running fine for me on Android 8.0, but it already has its account details configured so Iā€™m not going to experimentā€¦)

@dennyfmn, check configuration details once again, manual configuration should work. Be careful to add appropriate data in the fields like the example shown below:

PNG

I tried changing each of the configuration parameters (Application ID/Device ID/Access Key/MQTT broker) and every time I entered a wrong value the result was the same ā€“ an error message was displayed saying ā€˜MQTT reconnect retry 1/10ā€™ then counts to 10 and mapping stopped. When I enter back the correct configuration parameters, the mapping just started, and everything works fine.

Whereas logging in is not working for me, manual configuration, though inconvenient, seems to work OK.

1 Like

Ok, I uninstalled TTN Mapper and re-installed it. When I started it up, I went straight to manual configuration without trying to log in. Copying and pasting in the credentials from KeePassDroid and allowing all permissions now works. Mapping connected to the us-west.thethings.network:1883 server and is now showing packets received on the map. I was very careful to check the credentials on the initial install but I had tried to login several times first. My guess is that a fresh install going straight to manual configuration is what did the trick.
Thanks for your help!

1 Like