New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Letting phone go to sleep while any non-home screen is open crashes Status when relaunched #7198

Closed
Swader opened this Issue Dec 29, 2018 · 7 comments

Comments

Projects
None yet
5 participants
@Swader
Copy link
Contributor

Swader commented Dec 29, 2018

User Story

As a user, I want to be able to keep using the app after it goes to sleep and wakes.

Description

Type: Bug

Summary:
When an Android device running Status goes to sleep with a dapp or chat open, reopening it crashes the app.

screenshot_20181229-120732

Expected behavior

The app does not crash.

Actual behavior

The app crashes.

Reproduction

  • Open Status on Android
  • Open any dapp
  • Sleep your phone (either via timeout or just press the power button)
  • If you wake it within 5 or so minutes, everything is fine.
  • If you wake it after 5 or so minutes, it crashes from limbo (a state when an app is neither killed off due to non-usage, nor has active cache due to several minutes of inactivity).

Solution

Summary: N/A

Additional Information

  • Status version: 0.9.33 (2018122003)
    comment: # (Android or iOS.)
  • Operating System: Android
@jeluard

This comment has been minimized.

Copy link
Member

jeluard commented Jan 2, 2019

@asemiankevich Do you mind taking a look at this and see if you can reproduce?

@asemiankevich

This comment has been minimized.

Copy link
Member

asemiankevich commented Jan 2, 2019

@asemiankevich Do you mind taking a look at this and see if you can reproduce?

@jeluard can't reproduce it yet. Tried Android 7 and 8, both released version and nightly build.

@Swader

This comment has been minimized.

Copy link
Contributor Author

Swader commented Jan 4, 2019

This happens for me on 9, so it might not be present on older operating systems.

@annadanchenko

This comment has been minimized.

Copy link
Member

annadanchenko commented Jan 8, 2019

@jeluard just got similar crash on Android 9 (real pixel xl device) today's nightly build after returning from sleep while Status was running (can't find exact steps to reproduce yet but maybe log would be helpful)

--------- beginning of crash
01-08 12:25:06.386 7342 7342 E AndroidRuntime: FATAL EXCEPTION: main
01-08 12:25:06.386 7342 7342 E AndroidRuntime: Process: im.status.ethereum, PID: 7342
01-08 12:25:06.386 7342 7342 E AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {im.status.ethereum/im.status.ethereum.MainActivity}: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=im.status.ethereum/.module.StatusService }: app is in background uid UidRecord{a8e518a u0a712 TPSL bg:+29m53s279ms idle change:cached procs:1 seq(71,71,71)}
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3785)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3817)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1809)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at android.os.Looper.loop(Looper.java:193)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6680)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=im.status.ethereum/.module.StatusService }: app is in background uid UidRecord{a8e518a u0a712 TPSL bg:+29m53s279ms idle change:cached procs:1 seq(71,71,71)}
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1577)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at android.app.ContextImpl.startService(ContextImpl.java:1532)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at android.content.ContextWrapper.startService(ContextWrapper.java:664)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at im.status.ethereum.module.ServiceConnector.bindService(ServiceConnector.java:110)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at im.status.ethereum.module.StatusModule.onHostResume(StatusModule.java:81)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at com.facebook.react.bridge.ReactContext.onHostResume(ReactContext.java:184)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at com.facebook.react.ReactInstanceManager.moveToResumedLifecycleState(ReactInstanceManager.java:649)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at com.facebook.react.ReactInstanceManager.onHostResume(ReactInstanceManager.java:568)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at com.facebook.react.ReactInstanceManager.onHostResume(ReactInstanceManager.java:524)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at com.facebook.react.ReactActivityDelegate.onResume(ReactActivityDelegate.java:105)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at com.facebook.react.ReactActivity.onResume(ReactActivity.java:64)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1412)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at android.app.Activity.performResume(Activity.java:7300)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3777)
01-08 12:25:06.386 7342 7342 E AndroidRuntime: ... 11 more
01-08 12:25:06.393 1420 1420 D StatusBar: disable<e i a s b h!r!c s > disable2

full logcat:
crash8.log

@annadanchenko annadanchenko added the bug label Jan 8, 2019

@annadanchenko

This comment has been minimized.

Copy link
Member

annadanchenko commented Jan 10, 2019

for now the best steps to reproduce I can find is:

  1. Install Status
  2. Run it (so start screen with create new account/recover account is shown)
  3. Leave a phone for a night with this and turn the phone on in the morning
@Swader

This comment has been minimized.

Copy link
Contributor Author

Swader commented Jan 10, 2019

No need for overnight. I can reproduce with 100% accuracy within 3 minutes on any Android 9+ device.

  1. Open any non-chatlist screen
  2. Wait for phone sleep or sleep manually
  3. Unlock after 3 minutes

@mandrigin mandrigin self-assigned this Jan 24, 2019

@mandrigin

This comment has been minimized.

Copy link
Member

mandrigin commented Jan 24, 2019

@Swader @annadanchenko okay, it looks native and I happen to have Android 9 nearby, so I will take a glance on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment