Skip to content
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

Crash on Android 6.0 after release on PlayStore #36822

Open
bayuramadeza opened this issue Jul 24, 2019 · 31 comments

Comments

@bayuramadeza
Copy link

commented Jul 24, 2019

I have launched my app in playstore, but i have found so many crash after the app is opened.
And according my data on playstore, all crash happened in android 6.0.
I have tried to testing in debug and released mode and everything is work. So this is strange for me.
So this crash decreases my rating on playstore. Flutter team please help me.

This is my data

Screen Shot 2019-07-24 at 16 24 59

This is error messages:
Screen Shot 2019-07-24 at 16 25 14

And this is the log while app crash

07-24 15:58:02.066 377-386/? E/cutils: Failed to openat(/storage/0403-0201): Permission denied
07-24 15:58:02.071 377-386/? E/cutils: Failed to openat(/storage/0403-0201): Permission denied
07-24 15:58:02.161 11382-11382/? A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 11382 (pkarir.topkarir)
07-24 15:58:02.214 520-520/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-24 15:58:02.215 520-520/? A/DEBUG: Build fingerprint: 'Xiaomi/helium/helium:6.0.1/MMB29M/V7.3.14.0.MBDCNDE:user/release-keys'
07-24 15:58:02.215 520-520/? A/DEBUG: Revision: '0'
07-24 15:58:02.215 520-520/? A/DEBUG: ABI: 'arm64'
07-24 15:58:02.215 520-520/? A/DEBUG: pid: 11382, tid: 11382, name: pkarir.topkarir >>> com.topkarir.topkarir <<<
07-24 15:58:02.215 520-520/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8
07-24 15:58:02.224 520-520/? A/DEBUG: x0 0000007fed6aefd8 x1 0000007f7a03453f x2 0000000000000006 x3 0000000000007472
07-24 15:58:02.224 520-520/? A/DEBUG: x4 0000000000000000 x5 0000000000000001 x6 00000055b4fca658 x7 0000007f7a034539
07-24 15:58:02.224 520-520/? A/DEBUG: x8 0000000000000021 x9 00000055b4fca640 x10 0000000051511100 x11 0000000000000033
07-24 15:58:02.224 520-520/? A/DEBUG: x12 0000007f94d5ba70 x13 00000055b4fca660 x14 00000055b4fca650 x15 000000000000af60
07-24 15:58:02.224 520-520/? A/DEBUG: x16 0000007f7a7afa78 x17 0000007f94cc5c08 x18 c000000000000000 x19 0000007fed6af178
07-24 15:58:02.224 520-520/? A/DEBUG: x20 0000007fed6af180 x21 0000007fed6af190 x22 0000000000000000 x23 0000007fed6aefd8
07-24 15:58:02.224 520-520/? A/DEBUG: x24 0000007f7a7c00d0 x25 0000000000000008 x26 0000000012c59080 x27 0000000071584b40
07-24 15:58:02.224 520-520/? A/DEBUG: x28 00000000724b5dd4 x29 0000000012caeca0 x30 0000007f7a229320
07-24 15:58:02.224 520-520/? A/DEBUG: sp 0000007fed6aefd0 pc 0000007f7a229320 pstate 0000000080000000
07-24 15:58:02.225 520-520/? A/DEBUG: backtrace:
07-24 15:58:02.225 520-520/? A/DEBUG: #00 pc 000000000004d320 /data/app/com.topkarir.topkarir-1/split_config.arm64_v8a.apk (offset 0x715000)
07-24 15:58:02.560 520-520/? A/DEBUG: Tombstone written to: /data/tombstones/tombstone_07
07-24 15:58:02.560 520-520/? E/DEBUG: AM write failed: Broken pipe
07-24 15:58:02.578 1287-11433/? E/ActivityManager: Invalid thumbnail dimensions: 0x0

@bayuramadeza

This comment has been minimized.

Copy link
Author

commented Jul 24, 2019

@jason-simmons

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2019

The device codenames in the third graph are Xiaomi devices

@tvolkert

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2019

The top device (santoni), for instance, is the Xiaomi Redmi 4X

@bayuramadeza

This comment has been minimized.

Copy link
Author

commented Jul 25, 2019

yeah, it happens in every xiaomi devices who used android 6.0, and the most of my user use xiaomi devices

@Hixie Hixie added this to the Goals milestone Jul 30, 2019
@Hixie Hixie added the engine label Jul 30, 2019
@timsneath

This comment has been minimized.

Copy link
Member

commented Jul 31, 2019

Sorry to hear about the crashes.

Couple of questions, @bayuramadeza -- is this a regression from previous versions, or can you reproduce it on older builds?

And are you able to narrow this down to a reproducible crash with a small sample? I'm not aware that we're seeing general issues with these devices, so it would be nice to know the source of this (could be Flutter itself, a plug-in, or something else, of course).

@bayuramadeza

This comment has been minimized.

Copy link
Author

commented Jul 31, 2019

@timsneath yes this regression happened since i used appbundle in playstore. when i tried to remove any plugin and all code, then i uploaded it to playstore it's still happened. So, i rechecked anything but there is no something wrong.
i just confused, why it's running in release mode with apk, but it crashed after internal teesting with appbundle?

@timsneath

This comment has been minimized.

Copy link
Member

commented Jul 31, 2019

Hmm, that's interesting. And you're using Flutter 1.7.4+hotfix.4? (Check with flutter doctor -v, if you wouldn't mind -- I want to make sure you're running the very latest hotfix revision.)

So to confirm:

  • Uploaded as an APK with Flutter 1.7.4+hotfix.4, the app does not crash on these devices
  • Uploaded as an APPBUNDLE with Flutter 1.7.4+hotfix.4, the app crashes on the same devices?
@bayuramadeza

This comment has been minimized.

Copy link
Author

commented Jul 31, 2019

i used the latest beta.

[✓] Flutter (Channel beta, v1.7.8+hotfix.4, on Mac OS X 10.14.5 18F132, locale en-ID)
• Flutter version 1.7.8+hotfix.4 at /Users/topkarir/Documents/developments/flutter
• Framework revision 20e5931 (12 days ago), 2019-07-18 20:04:33 -0700
• Engine revision fee001c93f
• Dart version 2.4.0

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/topkarir/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.2.1, Build version 10E1001
• CocoaPods version 1.6.1

[✓] iOS tools - develop for iOS devices
• ios-deploy 1.9.4

[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 37.1.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] VS Code (version 1.36.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.2.0

[!] Connected device
! No devices available

! Doctor found issues in 1 category.

And when i uploaded only apk in playstore it's running well in android 6.0 but when i uploaded appbundle the crash appears

@blasten

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2019

We have requested a device to test this issue. It's expected to arrive between Aug 19 and Sep 30.

In the meanwhile, would it be possible to access the app's source code? If yes, feel free to send the link via Gitter.

@blasten blasten modified the milestones: Goals, September 2019 Jul 31, 2019
@tvolkert

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2019

Please sign the CLA at https://cla.developers.google.com/ before sending us any source code, or we can't look at it 🙂

@bayuramadeza

This comment has been minimized.

Copy link
Author

commented Aug 2, 2019

i'm sorry, i didn't get permission to share my code,

@ajinasokan

This comment has been minimized.

Copy link

commented Aug 3, 2019

@tvolkert @timsneath Is it possible to expedite fix for this issue? Around 30% of our users are on these devices and we already reached 2,500 crashes.

@bpillon

This comment has been minimized.

Copy link

commented Aug 3, 2019

Same for me. Have crash on redmi 4 since 1.2, 1.0 is working so I have to keep using it.

@tvolkert

This comment has been minimized.

Copy link
Contributor

commented Aug 8, 2019

@ajinasokan see #36822 (comment) -- once we receive devices to try to reproduce the crashes on, we will have a look. In the meantime, if you can send us symbolicated stack traces, that would be helpful.

@gofur

This comment has been minimized.

Copy link

commented Aug 9, 2019

i got the same problem... any solutions??? @bayuramadeza ?

@ajinasokan

This comment has been minimized.

Copy link

commented Aug 9, 2019

We had to upload APKs with split ABIs to solve this issue.

@tvolkert I tried to reproduce this issue in a Redmi Note 4 (mido). But it is only causing in Android 6.0 and I'm unable to find the stock images for it because it is too old.

@GeorgeKhrushch

This comment has been minimized.

Copy link

commented Aug 12, 2019

same problem here, tested release build on Xiaomi Redmi Note4, android 6.0, my logs:

08-12 16:20:30.419 2297-2438/com.miui.whetstone E/Whetstone-JNI: set process [index 0](addres 0x7f6f9c55c0), pid(24518), uid(0), processName(<MY_PACKAGE_NAME>), property(0)
08-12 16:20:30.586 24518-24518/? A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 24518 (<MY_PACKAGE_NAME>)
08-12 16:20:30.670 2297-2438/com.miui.whetstone E/Whetstone-JNI: set process [index 0](addres 0x7f6f9c55c0), pid(24606), uid(0), processName(<MY_PACKAGE_NAME>), property(0)
08-12 16:20:30.863 24606-24606/? A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 24606 (<MY_PACKAGE_NAME>)
08-12 16:20:30.954 2297-2438/com.miui.whetstone E/Whetstone-JNI: set process [index 0](addres 0x7f6f9c55c0), pid(24677), uid(0), processName(<MY_PACKAGE_NAME>), property(0)
08-12 16:20:31.110 24677-24677/? A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 24677 (<MY_PACKAGE_NAME>)

[✓] Flutter (Channel stable, v1.7.8+hotfix.4, on Mac OS X 10.14.6 18G84, locale en-UA)
• Flutter version 1.7.8+hotfix.4 at /Users/admin908/flutter
• Framework revision 20e5931 (3 weeks ago), 2019-07-18 20:04:33 -0700
• Engine revision fee001c93f
• Dart version 2.4.0

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/admin908/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /Users/admin908/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.3, Build version 10G8
• CocoaPods version 1.6.1

[✓] iOS tools - develop for iOS devices
• ios-deploy 1.9.4

[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 37.1.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] VS Code (version 1.36.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.3.0

[✓] Connected device (1 available)
• Redmi Note 4 • UOK7GY89LNSOSWEI • android-arm64 • Android 6.0 (API 23)

Building app using 'flutter build appbundle', installing using bundletool.

@psovit

This comment has been minimized.

Copy link

commented Aug 28, 2019

@ajinasokan did you solve the issue by splitting apk:
flutter build apk --target-platform android-arm,android-arm64 --split-per-abi
or by splitting bundle:
flutter build appbundle --target-platform android-arm,android-arm64 ?

@psovit

This comment has been minimized.

Copy link

commented Aug 30, 2019

--removing my comment here as it was a different issue which was specific to Redmi developer options configuration...

@ajinasokan

This comment has been minimized.

Copy link

commented Aug 30, 2019

@psovit Second approach doesn't work. I'm not sure about the first approach. We are building APKs separately like this

flutter build apk --target-platform android-arm --build-name=$(BUILD_NAME) --build-number $(BUILD_NUMBER_32)
@codxse

This comment has been minimized.

Copy link

commented Aug 30, 2019

Guys, I am following this issue too. We have major incident after release appbundle. A lot of android 6 device crash.

Well, after move to split-apk approach (described here), I finally can install the app on Android 6.0. Still I need more tests to ensure not happening on other device.

@GeorgeKhrushch

This comment has been minimized.

Copy link

commented Aug 30, 2019

@codxse I'm now using same approach (split-per-abi)

Noticing, in case of building using appbundle, the device i'm using (Redmi Note 4 • android-arm64 • Android 6.0 (API 23)) gets strange apk of bundletool. Installed app is much smaller (installed app normal size is about 20Mb, while this app - about 3Mb), definitely missing native libs!
device-2019-08-30-122337

@blasten blasten modified the milestones: September 2019, Goals Sep 17, 2019
@bayuramadeza

This comment has been minimized.

Copy link
Author

commented Sep 23, 2019

Hai @tvolkert , is there a new update for this issue? because i used to build apk command rather than build appbundle since this issue makes problem to my users. Thanks

@blasten

This comment has been minimized.

Copy link
Contributor

commented Sep 23, 2019

@bayuramadeza I received the phone, but it came with Android 7.0 instead of 6.0. The crash doesn’t occur on 7.0. To install 6.0, the phone needs to be rooted first... I will try that when I get a chance.

@blasten

This comment has been minimized.

Copy link
Contributor

commented Oct 3, 2019

The stacktrace you posted is very similar to this one #37234 (comment).

The Android App Bundle team is looking into this issue and I will update as I find out more. In the meanwhile, have you tried to upload two APKs to the Play Store instead of an app bundle?

You can use flutter build apk --split-per-abi to generate two APKs for 32 and 64bit.

@blasten

This comment has been minimized.

Copy link
Contributor

commented Oct 3, 2019

The workaround is to use flutter build apk --split-per-abi to generate two APKs for 32 and 64bit.

I'm closing the issue, but feel free to reopen if the problem persists after uploading the two APKs.

@blasten blasten closed this Oct 3, 2019
@bayuramadeza

This comment has been minimized.

Copy link
Author

commented Oct 4, 2019

Yeah since this issue was opened, i have built apk --split, not appbundle anymore. I hope the issue can fix in appbundle, to optimize the app like playstore recommendation

@sroddy

This comment has been minimized.

Copy link
Contributor

commented Oct 4, 2019

@blasten as appbundle is the Play Store recommendation, I think this issue should be kept open until a proper fix is found and if it not found, it should be underlined extremely well in the docs (or even by the tool during a build) that appbundle builds are currently unstable and not recommended by Flutter

@blasten

This comment has been minimized.

Copy link
Contributor

commented Oct 4, 2019

Just to clarify. This isn’t a Flutter bug. I forwarded this issue to the Android team, and they are currently looking into ways to mitigate the problem at the Play Store level.

I can keep the issue open and close once the upstream issue is fixed.

@blasten blasten reopened this Oct 4, 2019
@sroddy

This comment has been minimized.

Copy link
Contributor

commented Oct 4, 2019

Thank you for the clarification.
If I understood correctly splitting per ABI with the current flutter build script is done by adding 1000/2000/3000/4000/5000 to the base build number.
This means it would start causing potential issues with a base build number above 1000. Even if it seems a relatively high number, it is currently not that high (we are already at build number 200 after 18 months of release cycles).
It's also important to pay attention when switching back to appbundle, as the build number needs to go above the highest build number already released.
Switching back and forth multiple times between these two modes is not trivial.
For this reason we have currently decided to release fat apks with binary code for both architectures, accepting a 8MB overhead in the size, hoping to see this bug solved soon.

@iqbalmineraltown

This comment has been minimized.

Copy link

commented Oct 7, 2019

@sroddy I have the same concerns with build number
In my build pipeline (using Fastlane), I create flavors to build per architectures.
On every build run, I retrieve the latest live apk number from playstore, then increment it by using these scheme:

  • +1 for fat apk
  • +2 for arm32 apk
  • +3 for arm64 apk

this would slow down the build number increment and way more controllable

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.