Closed tlakhtak closed 2 years ago
@avaidyam We have checked in 8,9,10 and 11 os devices and the issue is not reproduced. If possible could you please ask them to share the log file ?
@saranya-sajeev We're not able to ask patients to share debugging info or system logs. These kinds of logs should be visible from Android Studio/Google Play Console.
It looks like there are a significant number of ANR's and one NullPointerException
crash.
sensor_core.Screen
which is primarily Android 10. LampForegroundService.onStartCommand
crashes are happening on Realme 7 Pro devices running Android 11 with build 213 (released 10/05/21) of the app.
java.lang.RuntimeException:
at android.app.ActivityThread.handleServiceArgs (ActivityThread.java:4658)
at android.app.ActivityThread.access$1900 (ActivityThread.java:289)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2183)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:254)
at android.app.ActivityThread.main (ActivityThread.java:8231)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:612)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1006)
Caused by: java.lang.NullPointerException:
at digital.lamp.mindlamp.repository.LampForegroundService.onStartCommand (LampForegroundService.kt:86)
at android.app.ActivityThread.handleServiceArgs (ActivityThread.java:4640)
StrictMode
to convert all ANRs to crashes to produce stack traces that can be debugged.
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
.detectAll()
.penaltyLog()
.penaltyDeath()
.build());
Going forward, please be sure to check the Google Play Console regularly to see what crashes/ANRs occur and please be sure to QA test on these specific devices + Android version combinations.
@avaidyam we will check the ANR's and crash reports and also will add the library and strict mode.
@saranya-sajeev Can you confirm that these two steps have been finished?
StrictMode
to convert all ANRs to crashes to produce stack traces that can be debugged.
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
.detectAll()
.penaltyLog()
.penaltyDeath()
.build());
WhatTheStack
to the Android app to visually display the crash issue on the device itself so patients can report screenshots to our team directly.@avaidyam could you check this post. https://stackoverflow.com/questions/53195068/crashlytics-with-strictmode-enabled-detect-all-gives-untagged-socket-detected
@avaidyam We can set tags for our api calls. but for internal crashlytics calls it is not possible. We shall investigate on this.
@avaidyam When we checked the app after enabling strict mode, three violations found. Two of them are occurred with Firebase crashlytics apis and the log for third one doesn't contain any app related info. So either we have to avoid those violations when enabling strict mode or we have to disable strict mode in production build.
Let's disable Crashlytics for now. We should be able to receive the same info directly from the Google Play Console and screenshots that patients provide us now.
Ok we will disable the Crashlytics.
@avaidyam As we are using Firebase for push notification even after disabling the crashlytics app throws UntaggedSocketViolation for firebase.
@saranya-sajeev Can you share the offending code? This issue should only affect RemoteConfig which we shouldn't be using, and was fixed as of November 2020 according to Firebase release notes.
@avaidyam this is log we got and it is from firebase internal call.
StrictMode policy violation: android.os.strictmode.UntaggedSocketViolation: Untagged socket detected; use TrafficStats.setThreadSocketTag() to track all network usage
at android.os.StrictMode.onUntaggedSocket(StrictMode.java:2182)
at com.android.server.NetworkManagementSocketTagger.tag(NetworkManagementSocketTagger.java:82)
at libcore.io.BlockGuardOs.tagSocket(BlockGuardOs.java:54)
at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:374)
at libcore.io.ForwardingOs.socket(ForwardingOs.java:216)
at libcore.io.IoBridge.socket(IoBridge.java:654)
at java.net.PlainSocketImpl.socketCreate(PlainSocketImpl.java:128)
at java.net.AbstractPlainSocketImpl.create(AbstractPlainSocketImpl.java:128)
at java.net.Socket.createImpl(Socket.java:489)
at java.net.Socket.getImpl(Socket.java:552)
at java.net.Socket.setSoTimeout(Socket.java:1180)
at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:1389)
at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:1343)
at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:221)
at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:144)
at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:106)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:400)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:333)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:262)
at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:219)
at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:30)
at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.writeRequestBodyToOutputStream(FirebaseInstallationServiceClient.java:226)
at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.writeFIDCreateRequestBodyToOutputStream(FirebaseInstallationServiceClient.java:208)
at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.createFirebaseInstallation(FirebaseInstallationServiceClient.java:167)
at com.google.firebase.installations.FirebaseInstallations.registerFidWithServer(FirebaseInstallations.java:490)
at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:361)
at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$2(FirebaseInstallations.java:351)
at com.google.firebase.installations.FirebaseInstallations$$Lambda$4.run(Unknown Source:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
Can you ensure all libraries being used by the codebase are up to date (in build.gradle
).
Another question - as I'm looking in the LAMP-core-android
repo, the wearable app seems to be entirely missing? Where is the source code for the wearable app located now?
Can you ensure all libraries being used by the codebase are up to date (in
build.gradle
).
Firebase library was little bit older after updating it is working fine. Usually build.gradle file will show the warning if the dependency is not latest. but it is not shown for firebase.
Another question - as I'm looking in the
LAMP-core-android
repo, the wearable app seems to be entirely missing? Where is the source code for the wearable app located now?
It is available in in watch interation brach of LAMP-core-android repo: https://github.com/BIDMCDigitalPsychiatry/LAMP-core-android/tree/watch_integration
@avaidyam We have pushed the app to beta and it is live now.
Can you please integrate this out of date branch into the master branch? The master branch should have both the wearable app and smartphone app code side by side.
Ok I will integrate.
@ZCOEngineer @saranya-sajeev Please let me know what the status is on the following:
@avaidyam ANR steict mode and stack library integration is completed and it is already pushed to beta. I will integrate wearos code to main brach soon.
@avaidyam Could you please create a separate issue for integrating WearOs code to main branch? Wear os app and phone app are separate code bases. So we have to create two folders under Lamp- core repository, one for WearOs app and other for Phone app. Shall we proceed with this?
@saranya-sajeev The WearOS codebase should NOT be separate. It is a module within the same Gradle project as the mobile app. It will have a separate folder under the LAMP-core-android
repository, yes, just like how the Apple Watch app has its own folder in the LAMP-core-ios
repository. The new issue is #532 - let's move discussion there.
@avaidyam since the remaining items in this issue have new tasks, shall we close this item?
Could not reproduce in staging account, so possible no longer an issue but cannot confirm since this was only affecting some users.
A study tried setting up an Android user on the app and couldn't finalize the process due to bugs - their OS is up to date and they have a Moto G 7 play - Android Version 10.
When the user opened the app and clicked the feed tab, they got a message saying the app was not responding; tried to x out and go back in, still got same thing. Uninstalled and reinstalled, saw a screen with quarter wheel frozen, and then ultimately a blank screen