ungoogled-software / ungoogled-chromium-android

Android build for ungoogled-chromium
GNU General Public License v3.0
491 stars 43 forks source link

Crash when opening the app for the first time #30

Closed wanlyg closed 4 years ago

wanlyg commented 4 years ago

Please at least answer all questions marked with * below. Issues without answering these questions will be closed.

*Device info (please complete the following information):

*Is the bug related to extensions? No

*If not related to extensions, can the bug be reproduced with corresponding Chromium version? Yes

*Describe the bug A clear and concise description of what the bug is. Crash when opening the app for the first time

*To Reproduce Steps to reproduce the behavior:

  1. Clear or uninstall the existing application (may need to back up your data)
  2. Reinstall version 84.0.x
  3. Open the app and see the crash

*Expected behavior A clear and concise description of what you expected to happen. Fix crash

Screenshots If applicable, add screenshots to help explain your problem. No

Additional context Add any other context about the problem here.

This problem exists in 84.0.x in beta and stable versions, but I have found a solution

Add <boolean name="first_run_flow" value="true" /> in /data/data/package name/shared_prefs/package name_preferences.xml to avoid crash

Note that this problem does not exist for upgrades from before 83.0

wanlyg commented 4 years ago

I forgot, the complete preferences.xml should be `<?xml version='1.0' encoding='utf-8' standalone='yes' ?>

`,(Note the line break) other configurations will be completed after the application is started, and then you need to pay attention to configuring user groups and permissions
wchen342 commented 4 years ago

What you did there is bypassing the first run screen, which I shall do in the future. But I think the underlying problem is something else. Can you post your adb log when the crash happens?

wanlyg commented 4 years ago

Yes this is my log

08-20 18:14:28.641 2363 3027 I ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.ungoogled.chromium.extensions/com.google.android.apps.chrome.Main bnds=[43,1152][242,1416]} from uid 10176 08-20 18:14:28.705 2363 2528 I ActivityManager: Start proc 29263:org.ungoogled.chromium.extensions/u0a416 for activity {org.ungoogled.chromium.extensions/com.google.android.apps.chrome.Main} 08-20 18:14:28.815 29263 29263 I MiPushFakeForRiru: inject android.os.Build for org.ungoogled.chromium.extensions 08-20 18:14:28.816 29263 29263 I MiPushFakeForRiru: install hook for 0:org.ungoogled.chromium.extensions 08-20 18:14:29.101 2363 14094 I ActivityTaskManager: START u0 {cmp=org.ungoogled.chromium.extensions/org.chromium.chrome.browser.firstrun.FirstRunActivity (has extras)} from uid 10416 08-20 18:14:29.118 29263 29263 V XCore : beforeCreate: sendActivity: org.ungoogled.chromium.extensions/class org.chromium.chrome.browser.ChromeTabbedActivity 08-20 18:14:29.130 2363 2533 I ActivityManager: Force stopping org.ungoogled.chromium.extensions appid=10416 user=0: from pid 2363 08-20 18:14:29.135 2363 2533 I ActivityManager: Killing 29263:org.ungoogled.chromium.extensions/u0a416 (adj 0): stop org.ungoogled.chromium.extensions 08-20 18:14:29.141 2363 2533 W ActivityTaskManager: Force removing ActivityRecord{c1f2c91 u0 org.ungoogled.chromium.extensions/com.google.android.apps.chrome.Main t8349 f}: app died, no saved state 08-20 18:14:29.148 2363 2533 I ActivityTaskManager: Force finishing activity ActivityRecord{c6a4771 u0 org.ungoogled.chromium.extensions/org.chromium.chrome.browser.firstrun.FirstRunActivity t8350} 08-20 18:14:29.155 2363 2533 I ActivityTaskManager: Force finishing activity ActivityRecord{c6a4771 u0 org.ungoogled.chromium.extensions/org.chromium.chrome.browser.firstrun.FirstRunActivity t8350 f} 08-20 18:14:29.155 2363 2533 W ActivityTaskManager: Duplicate finish request for ActivityRecord{c6a4771 u0 org.ungoogled.chromium.extensions/org.chromium.chrome.browser.firstrun.FirstRunActivity t8350 f} 08-20 18:14:29.172 642 642 E Layer : [Surface(name=AppWindowToken{33697f7 token=Token{20057f6 ActivityRecord{c1f2c91 u0 org.ungoogled.chromium.extensions/com.google.android.apps.chrome.Main t8349}}})/@0x3f4687e - animation-leash#0] No local sync point found 08-20 18:14:29.186 2363 2528 I ActivityManager: Start proc 29287:org.ungoogled.chromium.extensions/u0a416 for activity {org.ungoogled.chromium.extensions/org.chromium.chrome.browser.firstrun.FirstRunActivity} 08-20 18:14:29.188 642 642 E Layer : [Surface(name=AppWindowToken{33697f7 token=Token{20057f6 ActivityRecord{c1f2c91 u0 org.ungoogled.chromium.extensions/com.google.android.apps.chrome.Main t8349}}})/@0x3f4687e - animation-leash#0] No local sync point found 08-20 18:14:29.205 642 642 E Layer : [Surface(name=AppWindowToken{33697f7 token=Token{20057f6 ActivityRecord{c1f2c91 u0 org.ungoogled.chromium.extensions/com.google.android.apps.chrome.Main t8349}}})/@0x3f4687e - animation-leash#0] No local sync point found 08-20 18:14:29.213 29287 29287 I MiPushFakeForRiru: inject android.os.Build for org.ungoogled.chromium.extensions 08-20 18:14:29.214 29287 29287 I MiPushFakeForRiru: install hook for 0:org.ungoogled.chromium.extensions 08-20 18:14:29.222 642 642 E Layer : [Surface(name=AppWindowToken{33697f7 token=Token{20057f6 ActivityRecord{c1f2c91 u0 org.ungoogled.chromium.extensions/com.google.android.apps.chrome.Main t8349}}})/@0x3f4687e - animation-leash#0] No local sync point found 08-20 18:14:29.238 642 642 E Layer : [Surface(name=AppWindowToken{33697f7 token=Token{20057f6 ActivityRecord{c1f2c91 u0 org.ungoogled.chromium.extensions/com.google.android.apps.chrome.Main t8349}}})/@0x3f4687e - animation-leash#0] No local sync point found 08-20 18:14:29.255 642 642 E Layer : [Surface(name=AppWindowToken{33697f7 token=Token{20057f6 ActivityRecord{c1f2c91 u0 org.ungoogled.chromium.extensions/com.google.android.apps.chrome.Main t8349}}})/@0x3f4687e - animation-leash#0] No local sync point found 08-20 18:14:29.272 642 642 E Layer : [Surface(name=AppWindowToken{33697f7 token=Token{20057f6 ActivityRecord{c1f2c91 u0 org.ungoogled.chromium.extensions/com.google.android.apps.chrome.Main t8349}}})/@0x3f4687e - animation-leash#0] No local sync point found 08-20 18:14:29.289 642 642 E Layer : [Surface(name=AppWindowToken{33697f7 token=Token{20057f6 ActivityRecord{c1f2c91 u0 org.ungoogled.chromium.extensions/com.google.android.apps.chrome.Main t8349}}})/@0x3f4687e - animation-leash#0] No local sync point found 08-20 18:14:29.305 642 642 E Layer : [Surface(name=AppWindowToken{33697f7 token=Token{20057f6 ActivityRecord{c1f2c91 u0 org.ungoogled.chromium.extensions/com.google.android.apps.chrome.Main t8349}}})/@0x3f4687e - animation-leash#0] No local sync point found 08-20 18:14:29.322 642 642 E Layer : [Surface(name=AppWindowToken{33697f7 token=Token{20057f6 ActivityRecord{c1f2c91 u0 org.ungoogled.chromium.extensions/com.google.android.apps.chrome.Main t8349}}})/@0x3f4687e - animation-leash#0] No local sync point found 08-20 18:14:29.339 642 642 E Layer : [Surface(name=AppWindowToken{33697f7 token=Token{20057f6 ActivityRecord{c1f2c91 u0 org.ungoogled.chromium.extensions/com.google.android.apps.chrome.Main t8349}}})/@0x3f4687e - animation-leash#0] No local sync point found 08-20 18:14:29.355 642 642 E Layer : [Surface(name=AppWindowToken{33697f7 token=Token{20057f6 ActivityRecord{c1f2c91 u0 org.ungoogled.chromium.extensions/com.google.android.apps.chrome.Main t8349}}})/@0x3f4687e - animation-leash#0] No local sync point found 08-20 18:14:29.372 642 642 E Layer : [Surface(name=AppWindowToken{33697f7 token=Token{20057f6 ActivityRecord{c1f2c91 u0 org.ungoogled.chromium.extensions/com.google.android.apps.chrome.Main t8349}}})/@0x3f4687e - animation-leash#0] No local sync point found 08-20 18:14:29.389 642 642 E Layer : [Surface(name=AppWindowToken{33697f7 token=Token{20057f6 ActivityRecord{c1f2c91 u0 org.ungoogled.chromium.extensions/com.google.android.apps.chrome.Main t8349}}})/@0x3f4687e - animation-leash#0] No local sync point found 08-20 18:14:29.606 2363 2521 W ActivityTaskManager: Activity top resumed state loss timeout for ActivityRecord{c1f2c91 u0 org.ungoogled.chromium.extensions/com.google.android.apps.chrome.Main t-1 f}

wchen342 commented 4 years ago

No useful information there. It seems the process just got killed for no reason. This sometimes happens but will be very hard to determine the cause in this case.

Also the package name seems to be an old one? Is this .125?

wchen342 commented 4 years ago

Anyway I will just remove the first run screen in the coming versions.

wanlyg commented 4 years ago

I'm sorry, I seem to be mistaken, I have found the cause of the problem. You may not need to modify your code. An xposed-based application caused a crash. It was used to limit the background activity of the application. Some of his configurations caused the crash, but this crash only appeared in 84.0.x

wchen342 commented 4 years ago

I wonder how did you figure that out?

wanlyg commented 4 years ago

I tested the compatibility of the latest .125 version on the Xiaomi developer website, and the test results are all normal. So I closed Edxposed (xposed derivative), and the same problem was solved. After investigation, it was Thanox's "Task Cleanup" (this function will kill the app when the app is crossed in the background) that caused the first startup crash. The problem of closing this function was solved, so adb did not have a valid log. And it only appears in all versions of 84.0.x. I don’t know how to resolve the conflict, but the problem has been resolved. Thanox It is not open source, this link seems to be used only to collect questions

wchen342 commented 4 years ago

I see. Closing.