From 33265c7c2ed6b6d6b76750d31f315b0cc5b53f2f Mon Sep 17 00:00:00 2001 From: geeksville Date: Mon, 11 May 2020 11:44:24 -0700 Subject: [PATCH] fix autobug - if someone runs really old device code with buggy bluetooth just wait for them to fix their device... https://console.firebase.google.com/u/0/project/meshutil/crashlytics/app/android:com.geeksville.mesh/issues/1948d9ea376e223f34d7065d1aba39df?time=last-seven-days&sessionId=5EB4DF6800B900016F5DA5AAC26367BE_DNE_1_v2 --- .../main/java/com/geeksville/mesh/service/MeshService.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/geeksville/mesh/service/MeshService.kt b/app/src/main/java/com/geeksville/mesh/service/MeshService.kt index 039855c5..44705b96 100644 --- a/app/src/main/java/com/geeksville/mesh/service/MeshService.kt +++ b/app/src/main/java/com/geeksville/mesh/service/MeshService.kt @@ -28,6 +28,7 @@ import com.geeksville.util.* import com.google.android.gms.common.api.ResolvableApiException import com.google.android.gms.location.* import com.google.protobuf.ByteString +import com.google.protobuf.InvalidProtocolBufferException import kotlinx.coroutines.* import kotlinx.serialization.Serializable import kotlinx.serialization.json.Json @@ -976,9 +977,14 @@ class MeshService : Service(), Logging { startConfig() reportConnection() + } catch (ex: InvalidProtocolBufferException) { + errormsg( + "Invalid protocol buffer sent by device - update device software and try again", + ex + ) } catch (ex: RadioNotConnectedException) { // note: no need to call startDeviceSleep(), because this exception could only have reached us if it was already called - error("Lost connection to radio during init - waiting for reconnect") + errormsg("Lost connection to radio during init - waiting for reconnect") } catch (ex: RemoteException) { // It seems that when the ESP32 goes offline it can briefly come back for a 100ms ish which // causes the phone to try and reconnect. If we fail downloading our initial radio state we don't want to