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

Google Play Store: Native Crash for Flutter Sample Counter Project #105903

Closed
marcchiu opened this issue Jun 13, 2022 · 73 comments
Closed

Google Play Store: Native Crash for Flutter Sample Counter Project #105903

marcchiu opened this issue Jun 13, 2022 · 73 comments
Labels
a: production Issues experienced in live production apps a: release Challenges faced when attempting to productionize an app c: crash Stack traces logged to the console customer: crowd Affects or could affect many people, though not necessarily a specific customer. P0 Critical issues such as a build break or regression platform-android Android applications specifically r: duplicate Issue is closed as a duplicate of an existing issue t: gradle "flutter build" and "flutter run" on Android tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@marcchiu
Copy link

marcchiu commented Jun 13, 2022

I am uploading my App to Google Play Store. I signed and had an app bundle built as shown in the flutter doc. I have included the following lines in the app/build.gradle stating that the ndk should only covers the following 'armeabi-v7a', 'arm64-v8a', 'x86_64', but when I upload the appbundle to Google Play Store, it always shows there is a Native Crash on the 'GCE x86 phone'. No matter I choose to release as any kind of testing or Production. The app is then put to 'reviewing' forever and not proceeding or launching publicly:

`
android {
compileSdkVersion 32
ndkPath = "/Users/xxx/Library/Android/sdk/ndk/24.0.8215888"
defaultConfig {

    applicationId "com.blablabla.my_app"
    minSdkVersion 21
    targetSdkVersion 32
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName

    ndk {
        abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64'
    }
}

buildTypes {
    release {
        // TODO: Add your own signing config for the release build.
        // Signing with the debug keys for now, so `flutter run --release` works.
        signingConfig signingConfigs.release

        shrinkResources false
        minifyEnabled false
    }
}

}

android.buildTypes.release.ndk.debugSymbolLevel = 'symbol_table'`

or even not supporting 'x86_64

ndk { abiFilters 'armeabi-v7a', 'arm64-v8a' }

Steps to Reproduce

Environments(tried on both, same problem happens):

  • Macbook Pro M1 2020, Flutter 3.0.2 stable, Dart 2.17.3
  • Macbook Pro M1 2021, Flutter 2.10.4 stable, Dart 2.12
  1. Create a new Flutter Project in Android Studio
  2. Sign the app for Release as shown in the doc
  3. Change the app/build.gradle with ndkPath and abiFilters as shown above
  4. Run flutter build appbundle
  5. Sign in with a developer account() to Google Play Store Console
  6. Goto 'Testing' -> 'Internal Testing'
  7. Create a new track, then Create a new Release, specify country/region and the testers
  8. Upload the appbundle -> 'Save' -> 'Review Release' -> 'Start rollout to Internal testing'
  9. Wait for 1.5 hours for the testing to complete, go to 'Testing' -> 'Pre-launch report' -> 'Overview'

Actual results:
image

Both Native Crash and ANR would occur

image

Code sample

Nothing has changed to the codes in the new flutter starter project

Logs

Native Crash Log

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'generic/gce_x86_phone/gce_x86:9/PGR1.190916.001/5877764:userdebug/test-keys'
Revision: '0'
ABI: 'x86'
pid: 6506, tid: 7444, name: 1.raster  >>> com.XXXXXXX.plain_flutter_project <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'vendor/unbundled_google/libs/ndk_translation/ndk_translation/ir/include/ndk_translation/ir/ir.h:685: CHECK failed: IsAligned(offset, GetFormatSize(format))'
    eax 00000000  ebx 0000196a  ecx 00001d14  edx 00000006
    edi 0000196a  esi c7506b5c
    ebp c7506b28  esp c7506ab8  eip ee2a2be9
backtrace:
    #00 pc 00000be9  [vdso:ee2a2000] (__kernel_vsyscall+9)
    #01 pc 0001fdf8  /system/lib/libc.so (syscall+40)
    #02 pc 00022e73  /system/lib/libc.so (abort+115)
    #03 pc 00006c84  /system/lib/liblog.so (__android_log_assert+292)
    #04 pc 0009f2b4  /system/lib/libndk_translation.so (ndk_translation::GetInsn::GetInsn(ndk_translation::IR*, ndk_translation::Format, unsigned int)+276)
    #05 pc 0009f100  /system/lib/libndk_translation.so (ndk_translation::IRBuilder::Get(ndk_translation::Format, unsigned int)+144)
    #06 pc 0009dd2e  /system/lib/libndk_translation.so (ndk_translation::(anonymous namespace)::InsnBuilder::Get(ndk_translation::Format, unsigned int)+46)
    #07 pc 000d0b4b  /system/lib/libndk_translation.so (ndk_translation::SemanticsDecoder::VTBL(ndk_translation::VTBL_Args const&)+363)
    #08 pc 00100568  /system/lib/libndk_translation.so (ndk_translation::ArmDecoder::TranslateThumbInsn(unsigned short const*)+86104)
    #09 pc 0009c2b6  /system/lib/libndk_translation.so (ndk_translation::(anonymous namespace)::GenerateIRHelper(ndk_translation::CompilerHooks*, unsigned int, unsigned int, ndk_translation::IR*)+1142)
    #10 pc 0009be1f  /system/lib/libndk_translation.so (ndk_translation::GenerateIR(ndk_translation::CompilerHooks*, unsigned int, ndk_translation::IR*, unsigned int*)+47)
    #11 pc 0009bbdf  /system/lib/libndk_translation.so (ndk_translation::Compile(ndk_translation::CompilerHooks*, unsigned int, ndk_translation::GuestCodeEntry*, unsigned int*, ndk_translation::MachineCode*)+143)
    #12 pc 0007a0da  /system/lib/libndk_translation.so (ndk_translation::(anonymous namespace)::Translate(ndk_translation::TranslationCache*, unsigned int, ndk_translation::GuestCodeEntry*)+378)
    #13 pc 00079f1c  /system/lib/libndk_translation.so (ndk_translation_HandleNotTranslated+300)
    #14 pc 0018db57  /system/lib/libndk_translation.so

image

@Mamun361054
Copy link

im going reproduce the error, will back to you soon, i think it flutter bug(not sure)

@maheshj01 maheshj01 added the in triage Presently being triaged by the triage team label Jun 14, 2022
@maheshj01
Copy link
Member

@flutter-symbolizer-bot #105903 (comment) force flutter#v3.0.2 android release arm64

@flutter-symbolizer-bot
Copy link

crash from #105903 (comment) symbolized using symbols for f15f824b57476e369b5e656f53d4c431c5b04b9a android-arm64-release

#00 0000000000000be9 [vdso:ee2a2000] (__kernel_vsyscall+9)
#01 000000000001fdf8 /system/lib/libc.so (syscall+40)
#02 0000000000022e73 /system/lib/libc.so (abort+115)
#03 0000000000006c84 /system/lib/liblog.so (__android_log_assert+292)
#04 000000000009f2b4 /system/lib/libndk_translation.so (ndk_translation::GetInsn::GetInsn(ndk_translation::IR*, ndk_translation::Format, unsigned int)+276)
#05 000000000009f100 /system/lib/libndk_translation.so (ndk_translation::IRBuilder::Get(ndk_translation::Format, unsigned int)+144)
#06 000000000009dd2e /system/lib/libndk_translation.so (ndk_translation::(anonymous namespace)::InsnBuilder::Get(ndk_translation::Format, unsigned int)+46)
#07 00000000000d0b4b /system/lib/libndk_translation.so (ndk_translation::SemanticsDecoder::VTBL(ndk_translation::VTBL_Args const&)+363)
#08 0000000000100568 /system/lib/libndk_translation.so (ndk_translation::ArmDecoder::TranslateThumbInsn(unsigned short const*)+86104)
#09 000000000009c2b6 /system/lib/libndk_translation.so (ndk_translation::(anonymous namespace)::GenerateIRHelper(ndk_translation::CompilerHooks*, unsigned int, unsigned int, ndk_translation::IR*)+1142)
#10 000000000009be1f /system/lib/libndk_translation.so (ndk_translation::GenerateIR(ndk_translation::CompilerHooks*, unsigned int, ndk_translation::IR*, unsigned int*)+47)
#11 000000000009bbdf /system/lib/libndk_translation.so (ndk_translation::Compile(ndk_translation::CompilerHooks*, unsigned int, ndk_translation::GuestCodeEntry*, unsigned int*, ndk_translation::MachineCode*)+143)
#12 000000000007a0da /system/lib/libndk_translation.so (ndk_translation::(anonymous namespace)::Translate(ndk_translation::TranslationCache*, unsigned int, ndk_translation::GuestCodeEntry*)+378)
#13 0000000000079f1c /system/lib/libndk_translation.so (ndk_translation_HandleNotTranslated+300)
#14 000000000018db57 /system/lib/libndk_translation.so 

@maheshj01
Copy link
Member

Hi @marcchiu, Thanks for filing the issue. Labeling this issue for further investigation from the team.

cc: @blasten

@maheshj01 maheshj01 added c: crash Stack traces logged to the console platform-android Android applications specifically tool Affects the "flutter" command-line tool. See also t: labels. a: release Challenges faced when attempting to productionize an app a: production Issues experienced in live production apps t: gradle "flutter build" and "flutter run" on Android and removed in triage Presently being triaged by the triage team labels Jun 14, 2022
@ruhul38
Copy link

ruhul38 commented Jun 14, 2022

I am facing the same issue with my project.

@swatantra109
Copy link

swatantra109 commented Jul 4, 2022

I am also facing the same issue, any workaround for this.

Build fingerprint: 'generic/gce_x86_phone/gce_x86:9/PGR1.190916.001/5877764:userdebug/test-keys'
Revision: '0'
ABI: 'x86'
pid: 8467, tid: 9414, name: 1.raster >>> <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'vendor/unbundled_google/libs/ndk_translation/ndk_translation/ir/include/ndk_translation/ir/ir.h:685: CHECK failed: IsAligned(offset, GetFormatSize(format))'
eax 00000000 ebx 00002113 ecx 000024c6 edx 00000006
edi 00002113 esi c8e9fb5c
ebp c8e9fb28 esp c8e9fab8 eip ef8a9be9
backtrace:
#00 pc 00000be9 [vdso:ef8a9000] (__kernel_vsyscall+9)
#1 pc 0001fdf8 /system/lib/libc.so (syscall+40)
#2 pc 00022e73 /system/lib/libc.so (abort+115)
#3 pc 00006c84 /system/lib/liblog.so (__android_log_assert+292)
#4 pc 0009f2b4 /system/lib/libndk_translation.so (ndk_translation::GetInsn::GetInsn(ndk_translation::IR*, ndk_translation::Format, unsigned int)+276)
#5 pc 0009f100 /system/lib/libndk_translation.so (ndk_translation::IRBuilder::Get(ndk_translation::Format, unsigned int)+144)
#6 pc 0009dd2e /system/lib/libndk_translation.so (ndk_translation::(anonymous namespace)::InsnBuilder::Get(ndk_translation::Format, unsigned int)+46)
#7 pc 000d0b4b /system/lib/libndk_translation.so (ndk_translation::SemanticsDecoder::VTBL(ndk_translation::VTBL_Args const&)+363)
#8 pc 00100568 /system/lib/libndk_translation.so (ndk_translation::ArmDecoder::TranslateThumbInsn(unsigned short const*)+86104)
#9 pc 0009c2b6 /system/lib/libndk_translation.so (ndk_translation::(anonymous namespace)::GenerateIRHelper(ndk_translation::CompilerHooks*, unsigned int, unsigned int, ndk_translation::IR*)+1142)
#10 pc 0009be1f /system/lib/libndk_translation.so (ndk_translation::GenerateIR(ndk_translation::CompilerHooks*, unsigned int, ndk_translation::IR*, unsigned int*)+47)
#11 pc 0009bbdf /system/lib/libndk_translation.so (ndk_translation::Compile(ndk_translation::CompilerHooks*, unsigned int, ndk_translation::GuestCodeEntry*, unsigned int*, ndk_translation::MachineCode*)+143)
#12 pc 0007a0da /system/lib/libndk_translation.so (ndk_translation::(anonymous namespace)::Translate(ndk_translation::TranslationCache*, unsigned int, ndk_translation::GuestCodeEntry*)+378)
#13 pc 00079f1c /system/lib/libndk_translation.so (ndk_translation_HandleNotTranslated+300)
#14 pc 0018db57 /system/lib/libndk_translation.so

@RedFox64
Copy link

RedFox64 commented Jul 8, 2022

I have the same issue


Build fingerprint: 'generic/gce_x86_phone/gce_x86:9/PGR1.190916.001/5877764:userdebug/test-keys'
Revision: '0'
ABI: 'x86'
pid: 7712, tid: 8683, name: 1.raster >>> <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'vendor/unbundled_google/libs/ndk_translation/ndk_translation/ir/include/ndk_translation/ir/ir.h:685: CHECK failed: IsAligned(offset, GetFormatSize(format))'
eax 00000000 ebx 00001e20 ecx 000021eb edx 00000006
edi 00001e20 esi cf04db5c
ebp cf04db28 esp cf04dab8 eip f5283be9
backtrace:
#00 pc 00000be9 [vdso:f5283000] (__kernel_vsyscall+9)
#1 pc 0001fdf8 /system/lib/libc.so (syscall+40)
#2 pc 00022e73 /system/lib/libc.so (abort+115)
#3 pc 00006c84 /system/lib/liblog.so (__android_log_assert+292)
#4 pc 0009f2b4 /system/lib/libndk_translation.so (ndk_translation::GetInsn::GetInsn(ndk_translation::IR*, ndk_translation::Format, unsigned int)+276)
#5 pc 0009f100 /system/lib/libndk_translation.so (ndk_translation::IRBuilder::Get(ndk_translation::Format, unsigned int)+144)
#6 pc 0009dd2e /system/lib/libndk_translation.so (ndk_translation::(anonymous namespace)::InsnBuilder::Get(ndk_translation::Format, unsigned int)+46)
#7 pc 000d0b4b /system/lib/libndk_translation.so (ndk_translation::SemanticsDecoder::VTBL(ndk_translation::VTBL_Args const&)+363)
#8 pc 00100568 /system/lib/libndk_translation.so (ndk_translation::ArmDecoder::TranslateThumbInsn(unsigned short const*)+86104)
#9 pc 0009c2b6 /system/lib/libndk_translation.so (ndk_translation::(anonymous namespace)::GenerateIRHelper(ndk_translation::CompilerHooks*, unsigned int, unsigned int, ndk_translation::IR*)+1142)
#10 pc 0009be1f /system/lib/libndk_translation.so (ndk_translation::GenerateIR(ndk_translation::CompilerHooks*, unsigned int, ndk_translation::IR*, unsigned int*)+47)
#11 pc 0009bbdf /system/lib/libndk_translation.so (ndk_translation::Compile(ndk_translation::CompilerHooks*, unsigned int, ndk_translation::GuestCodeEntry*, unsigned int*, ndk_translation::MachineCode*)+143)
#12 pc 0007a0da /system/lib/libndk_translation.so (ndk_translation::(anonymous namespace)::Translate(ndk_translation::TranslationCache*, unsigned int, ndk_translation::GuestCodeEntry*)+378)
#13 pc 00079f1c /system/lib/libndk_translation.so (ndk_translation_HandleNotTranslated+300)
#14 pc 0018db57 /system/lib/libndk_translation.so

@prgtrdr
Copy link

prgtrdr commented Jul 12, 2022

I have the same issue.

As a temporary hack, If I set minSdkVersion to 29 it prevents Play Store from checking against the Pixel 2 (API 28) and allows “reviewing” to complete. Unfortunately this prevents my app from working on any device earlier than Android 10.

@NdegwaJulius
Copy link

This might be a flutter version issue and you can Try deploying with flutter 3.1.0 and dart version 2.18.0 although it's a beta version but I think the problem might be solved.

@yasburg
Copy link

yasburg commented Jul 12, 2022

@NdegwaJulius Thank you. This fixed my issue! You don't even have to add ndk filter.
Do the following in order:
flutter channel beta
flutter upgrade 3.1.0
flutter clean
flutter build appbundle --release

@prgtrdr
Copy link

prgtrdr commented Jul 12, 2022

@NdegwaJulius @yasburg Would you please verify that using the 3.1.0 beta with minSdkVersion set to 28 (or earlier) passes the Play Store review?

@yasburg
Copy link

yasburg commented Jul 12, 2022

I am currently working on publishing on the playstore so I can only confirm that it passes the google play review. You can also use TestLab in firebase to check which takes a shorter time to verify (for google play).
I was using minSdkVersion 21. Here is my app\build.gradle default config settings:

    defaultConfig {
        applicationId "com.company.name"
        minSdkVersion 21
        targetSdkVersion 31
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        multiDexEnabled true
    }

@prgtrdr
Copy link

prgtrdr commented Jul 12, 2022

Okay, thanks. I'll give it a try with the Play Store.

@NdegwaJulius
Copy link

@prgtrdr Yes it does

@GaryQian GaryQian added the P2 Important issues not at the top of the work list label Jul 12, 2022
@GaryQian
Copy link
Contributor

This may be a documentation issue. We should investigate more to see if we simply need to mark certain ABIs as unavailable.

@prgtrdr
Copy link

prgtrdr commented Jul 12, 2022

@NdegwaJulius @yasburg Confirmed, using beta 3.1.0 solved the problem for me as well. Do you know what is in the beta that fixes it (so we can make sure it's in the eventual release)?

@NdegwaJulius Thank you. This fixed my issue! You don't even have to add ndk filter.
Do the following in order:
flutter channel beta
flutter upgrade 3.1.0
flutter clean
flutter build appbundle --release

defaultConfig {
applicationId "com.company.name"
minSdkVersion 21
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}

@incon
Copy link
Contributor

incon commented Jul 13, 2022

Created a new build today using Flutter 3.0.4 and I have the same issue. My previous build using Flutter 3.0.1 did not have this issue.

@NdegwaJulius
Copy link

@incon Use flutter 3.1.0(Beta)

@incon
Copy link
Contributor

incon commented Jul 13, 2022

@NdegwaJulius When do the fixes land in stable?

@GaryQian GaryQian added the P1 High-priority issues at the top of the work list label Aug 2, 2022
@GaryQian
Copy link
Contributor

GaryQian commented Aug 2, 2022

We are aware of this issue. Raising priority due to a large number of people experiencing this.

@GaryQian GaryQian added P2 and removed P1 High-priority issues at the top of the work list labels Aug 2, 2022
@giancarloerra
Copy link

Same problem here.

@MarikIshtar007
Copy link

Though the pre-crash report shows a native crash, I was able to release the app to production.

@prgtrdr
Copy link

prgtrdr commented Aug 2, 2022

@MarikIshtar007 What version of Flutter are you using, and what is minSdkVersion set to?

@PhpCable

This comment was marked as off-topic.

@venkatasubramanyam

This comment was marked as off-topic.

@PhpCable

This comment was marked as off-topic.

@prgtrdr

This comment was marked as off-topic.

@PhpCable

This comment was marked as off-topic.

@PhpCable

This comment was marked as off-topic.

@venkatasubramanyam

This comment was marked as off-topic.

@PhpCable

This comment was marked as off-topic.

@venkatasubramanyam
Copy link

also please share the steps to upgrade from flutter 2.8.0 and dart 2.13.0 to newer versions?
Can you please share your pubspec versions for these configurations?

@venkatasubramanyam

This comment was marked as off-topic.

@ElNovi

This comment was marked as off-topic.

@PhpCable

This comment was marked as off-topic.

@MarikIshtar007
Copy link

MarikIshtar007 commented Aug 2, 2022

@prgtrdr I'm on flutter channel stable v2.10.3, dart version 2.16.1

flutter doctor -v output

[√] Flutter (Channel stable, 2.10.3, on Microsoft Windows [Version 10.0.22000.795], locale en-IN)
    • Flutter version 2.10.3 at D:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7e9793dee1 (5 months ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at C:\Users\Haany\AppData\Local\Android\sdk
    • Platform android-33, build-tools 32.1.0-rc1
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.14)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
    • Visual Studio Build Tools 2019 version 16.11.32428.217
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2021.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)

[√] VS Code, 64-bit edition (version 1.60.0)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.27.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22000.795]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 103.0.5060.134
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 103.0.1264.77

[√] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

And for the minSdkVersion, this is what I have in my gradle file..


    defaultConfig {
        applicationId "com.company.name"
        minSdkVersion flutter.minSdkVersion
        targetSdkVersion flutter.targetSdkVersion
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }

@PhpCable

This comment was marked as off-topic.

@christopherfujino
Copy link
Member

christopherfujino commented Aug 2, 2022

@GaryQian I'm guessing that this is the same as #37396 ?

@stuartmorgan
Copy link
Contributor

Yes, it's the same issue. I'm going to close this as a duplicate to consolidate discussion there. I'll add a summary of status there.

@maheshj01 maheshj01 added the r: duplicate Issue is closed as a duplicate of an existing issue label Aug 3, 2022
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2022
@flutter-triage-bot flutter-triage-bot bot added P0 Critical issues such as a build break or regression and removed P2 labels Jun 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: production Issues experienced in live production apps a: release Challenges faced when attempting to productionize an app c: crash Stack traces logged to the console customer: crowd Affects or could affect many people, though not necessarily a specific customer. P0 Critical issues such as a build break or regression platform-android Android applications specifically r: duplicate Issue is closed as a duplicate of an existing issue t: gradle "flutter build" and "flutter run" on Android tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests