BIDMCDigitalPsychiatry / LAMP-platform

The LAMP Platform (issues and documentation).
https://docs.lamp.digital/
Other
13 stars 10 forks source link

Unable to complete for first log in due to app error message and blank screen #476

Closed tlakhtak closed 2 years ago

tlakhtak commented 2 years ago

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

saranya-sajeev commented 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 ?

avaidyam commented 2 years ago

@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.

avaidyam commented 2 years ago

It looks like there are a significant number of ANR's and one NullPointerException crash.

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.

Screen Shot 2022-01-21 at 2 48 46 PM
saranya-sajeev commented 2 years ago

@avaidyam we will check the ANR's and crash reports and also will add the library and strict mode.

avaidyam commented 2 years ago

@saranya-sajeev Can you confirm that these two steps have been finished?

saranya-sajeev commented 2 years ago

@avaidyam could you check this post. https://stackoverflow.com/questions/53195068/crashlytics-with-strictmode-enabled-detect-all-gives-untagged-socket-detected

saranya-sajeev commented 2 years ago

@avaidyam We can set tags for our api calls. but for internal crashlytics calls it is not possible. We shall investigate on this.

saranya-sajeev commented 2 years ago

@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.

avaidyam commented 2 years ago

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.

saranya-sajeev commented 2 years ago

Ok we will disable the Crashlytics.

saranya-sajeev commented 2 years ago

@avaidyam As we are using Firebase for push notification even after disabling the crashlytics app throws UntaggedSocketViolation for firebase.

avaidyam commented 2 years ago

@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.

saranya-sajeev commented 2 years ago

@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)
avaidyam commented 2 years ago

Can you ensure all libraries being used by the codebase are up to date (in build.gradle).

avaidyam commented 2 years ago

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?

saranya-sajeev commented 2 years ago

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.

saranya-sajeev commented 2 years ago

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

saranya-sajeev commented 2 years ago

@avaidyam We have pushed the app to beta and it is live now.

avaidyam commented 2 years ago

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.

saranya-sajeev commented 2 years ago

Ok I will integrate.

avaidyam commented 2 years ago

@ZCOEngineer @saranya-sajeev Please let me know what the status is on the following:

saranya-sajeev commented 2 years ago

@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.

saranya-sajeev commented 2 years ago

@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?

avaidyam commented 2 years ago

@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.

ZCOEngineer commented 2 years ago

@avaidyam since the remaining items in this issue have new tasks, shall we close this item?

tlakhtak commented 2 years ago

Could not reproduce in staging account, so possible no longer an issue but cannot confirm since this was only affecting some users.