owntracks / android

OwnTracks Android App
http://owntracks.org
Eclipse Public License 1.0
1.28k stars 471 forks source link

V2.5.0 constantly crashing #1683

Closed syphernl closed 1 month ago

syphernl commented 1 month ago

I received the v2.5.0 update via the Google Play ~Beta~. At first it was working fine but then suddenly the app keeps crashing. If I open it manually, it immediately closes.

The only way to open the app now is in flight mode, but as soon as I turn on my wifi/5G the app crashes again immediately.

I tried to clear the cache but to no avail..

Android 14.0

--

Edit: I exited the beta program, removed and reinstalled the app (of which the config was kept?) and so far it seems to work..

Edit 2: for some reason OwnTracks doesn't show up in the battery optimization list, so I can't exclude it from that after reinstalling the app.

jpmens commented 1 month ago

Which device and android version?

Can you remove the app and reinstall from beta?

syphernl commented 1 month ago

Which device and android version?

Can you remove the app and reinstall from beta?

OnePlus 11, Android 14.0

Is there any difference between the v2.5.0 and the v2.5.0 beta?

growse commented 1 month ago

I'm seeing this on the play store telemetry. Should have a fix and a beta-2 tomorrow.

Exception java.lang.ClassNotFoundException:
  at java.lang.Class.classForName
  at java.lang.Class.forName (Class.java:536)
  at java.lang.Class.forName (Class.java:467)
  at org.owntracks.android.services.worker.BackgroundWorkerFactory.createWorker (BackgroundWorkerFactory.kt)
  at androidx.work.WorkerFactory.createWorkerWithDefaultFallback (WorkerFactory.java:1)
  at androidx.work.impl.WorkerWrapper.runWorker (WorkerWrapper.java:430)
  at androidx.work.impl.WorkerWrapper.run (WorkerWrapper.java:430)
  at androidx.work.impl.utils.SerialExecutorImpl$Task.run (SerialExecutorImpl.java:5)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:644)
  at java.lang.Thread.run (Thread.java:1012)

Thanks for helping with the testing!

compuguy commented 1 month ago

I'm seeing this on the play store telemetry. Should have a fix and a beta-2 tomorrow.

Exception java.lang.ClassNotFoundException:
  at java.lang.Class.classForName
  at java.lang.Class.forName (Class.java:536)
  at java.lang.Class.forName (Class.java:467)
  at org.owntracks.android.services.worker.BackgroundWorkerFactory.createWorker (BackgroundWorkerFactory.kt)
  at androidx.work.WorkerFactory.createWorkerWithDefaultFallback (WorkerFactory.java:1)
  at androidx.work.impl.WorkerWrapper.runWorker (WorkerWrapper.java:430)
  at androidx.work.impl.WorkerWrapper.run (WorkerWrapper.java:430)
  at androidx.work.impl.utils.SerialExecutorImpl$Task.run (SerialExecutorImpl.java:5)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:644)
  at java.lang.Thread.run (Thread.java:1012)

Thanks for helping with the testing!

Thank you for the update. Appreciate it and cant wait to test 2.5.0 beta 2. Been looking forward to be able to push location updates to phones/endpoints.

growse commented 1 month ago

Ended up removing BackgroundWorkerFactory altogether and replacing with HiltWorkerFactory.

compuguy commented 1 month ago

Ended up removing BackgroundWorkerFactory altogether and replacing with HiltWorkerFactory.

Great. Let us know when you push out the fixed build! 🎉

compuguy commented 1 month ago

Just wanted to check in @growse. Are you going to cut a new beta build for 2.5.0? It would be greatly appreciated, though I understand that life can be busy at times.

jpmens commented 1 month ago

It will be done when it's ready.

5iver commented 1 month ago

I updated to the 2.5.0 beta today (Android 13, TCL 40XL), and experienced the constant crashing. My wife (also on beta) had just experienced this and resolved it by clearing the app data, since clearing the app cache was not enough. We have Owntracks configured to access a mosquito server through a reverse proxy over web sockets, authenticating with self-signed client certificates. When I encountered the crashing after update, I:

  1. added my CA and client certs to Android (there was a notification for this),
  2. enabled Airplane mode (this prevented the app from crashing),
  3. exported Configuration management,
  4. cleared the app data,
  5. imported the config,
  6. disabled Airplane mode (the app was still not crashing),
  7. went into Preferences> Connection> Client certificate> and selected my cert

Hopefully, the CNFE fix will resolve the crashing issue, but I have not experienced the crashing issue since performing these steps. However, going back into Preferences> Connection, the UI shows Client certificate as Not Set, and Configuration management shows tlsClientCrt as an empty string. Owntracks still updates properly through MQTT, so this appears to just be a display issue, though the field is also empty in exports. This may deserve its own Issue, but I mention it here in case it is somehow related.

growse commented 1 month ago

beta2 published on the play store.

However, going back into Preferences> Connection, the UI shows Client certificate as Not Set, and Configuration management shows tlsClientCrt as an empty string. Owntracks still updates properly through MQTT, so this appears to just be a display issue, though the field is also empty in exports. This may deserve its own Issue, but I mention it here in case it is somehow related.

Might be a display issue, I'll look. But the configuration export now won't be able to include the certificates as they're part of the device config - OT doesn't even see them.

wir3z commented 1 month ago

@growse this seems to be happening on the tip of master in HTTP mode as well if no URL is present. For example:

I didn't dig further, but it looks like 2.5.0 adds a check to prevent a blank URL when editing the HTTP preferences, but maybe it's not handling an undefined one at startup?