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

[Android release] Release build crashes #7829

Closed
clemtfvr opened this issue Apr 13, 2020 · 6 comments
Closed

[Android release] Release build crashes #7829

clemtfvr opened this issue Apr 13, 2020 · 6 comments

Comments

@clemtfvr
Copy link

🐛 Bug Report

Hello everyone!

I'm having issue generating a signed .apk that will work on Android. I come from the managed workflow under SDK37 and just ran the expo eject command to switch to bare workflow (necessary because I want to use the ApplePay feature of expo-payments-stripe).
When I install the app on the Android device, it crashes instantly or 2 or 3 seconds after launch.

Environment

Expo CLI 3.17.23 environment info:
System:
OS: macOS 10.15.4
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node
Yarn: 1.22.4 - ~/.yarn/bin/yarn
npm: 6.14.4 - ~/.nvm/versions/node/v10.13.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6308749
Xcode: 11.4/11E146 - /usr/bin/xcodebuild
npmPackages:
expo: ^37.0.7 => 37.0.7
react: ~16.9.0 => 16.9.0
react-native: ~0.61.5 => 0.61.5
react-navigation: ^3.13.0 => 3.13.0
npmGlobalPackages:
expo-cli: 3.17.23

And Java JDK14 installed.

Steps to Reproduce

Trying to reproduce this on a new project but still no success.

Expected Behavior

I build the app in release mode (after expo publish), the apk runs well in Android emulator and I would expect the same on my physical Android phone. Huawei Mya-L41

Actual Behavior

When I install the signed apk on the Android device, it crashes instantly or 2 or 3 seconds after launch. Here are the log outputs of logcat when the crash occurs:

--------- beginning of crash

04-13 21:39:19.600 3740-3801/? A/libc: Fatal signal 11 (SIGSEGV), code 2, fault addr 0x7f7f740000 in tid 3801 (FrescoDecodeExe)
04-13 21:39:19.601 348-348/? D/AEE/AED: $===AEE===AEE===AEE===$
04-13 21:39:19.601 348-348/? D/AEE/AED: p 0 poll events 1 revents 0
04-13 21:39:19.601 348-348/? D/AEE/AED: not know revents:0
04-13 21:39:19.601 348-348/? D/AEE/AED: p 1 poll events 1 revents 0
04-13 21:39:19.601 348-348/? D/AEE/AED: not know revents:0
04-13 21:39:19.601 348-348/? D/AEE/AED: p 2 poll events 1 revents 1
04-13 21:39:19.601 348-348/? D/AEE/AED: aed_main_fork_worker: generator 0x7f7a6d2080, worker 0x7ff4706ec0, recv_fd 12
04-13 21:39:19.602 348-348/? D/AEE/AED: aee handle:-1, cpu cores:4, online:4
04-13 21:39:19.602 348-348/? D/AEE/AED: p 3 poll events 1 revents 0
04-13 21:39:19.602 348-348/? D/AEE/AED: not know revents:0
04-13 21:39:19.604 3802-3802/? I/AEE/AED: handle_request(12)
04-13 21:39:19.605 3802-3802/? I/AEE/AED: check process 3740 name:myapp
04-13 21:39:19.605 3802-3802/? I/AEE/AED: tid 3801 abort msg address is:0x0000000000000000 si_code is:2 (request from 3740:10163)
04-13 21:39:19.605 3802-3802/? I/AEE/AED: BOOM: pid=3740 uid=10163 gid=10163 tid=3801
04-13 21:39:19.606 3802-3802/? I/AEE/AED: [OnPurpose Redunant in void preset_info(aed_report_record*, int, int)] pid: 3740, tid: 3801, name: FrescoDecodeExe >>> com.myapp.myapp <<<
04-13 21:39:19.618 3740-3803/? W/ExifInterface: Invalid image.
java.io.IOException: Invalid marker: 89
at android.media.ExifInterface.getJpegAttributes(ExifInterface.java:1654)
at android.media.ExifInterface.loadAttributes(ExifInterface.java:1360)
at android.media.ExifInterface.(ExifInterface.java:1063)
at com.facebook.imagepipeline.producers.LocalExifThumbnailProducer.getExifInterface(LocalExifThumbnailProducer.java:128)
at com.facebook.imagepipeline.producers.LocalExifThumbnailProducer$1.getResult(LocalExifThumbnailProducer.java:94)
at com.facebook.imagepipeline.producers.LocalExifThumbnailProducer$1.getResult(LocalExifThumbnailProducer.java:89)
at com.facebook.common.executors.StatefulRunnable.run(StatefulRunnable.java:43)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(PriorityThreadFactory.java:51)
at java.lang.Thread.run(Thread.java:833)
04-13 21:39:19.633 1080-1764/? I/SendBroadcastPermission: action:android.intent.action.SIG_STR, mPermissionType:0
04-13 21:39:19.633 1080-1764/? V/ActivityManager: Broadcast sticky: Intent { act=android.intent.action.SIG_STR flg=0x20000010 (has extras) } ordered=false userid=-1 callerApp=ProcessRecord{1f06f9e 1080:system/1000}
04-13 21:39:19.657 3802-3802/? E/AEE/AED: unexpected waitpid response: n=3801, status=0000000b
04-13 21:39:19.657 3802-3802/? E/AEE/AED: tid exited before attach completed: tid 3801
04-13 21:39:19.657 3802-3802/? E/AEE/AED: request.action: 0

Reproducible Demo

I'll update this post when I have one.

@brentvatne
Copy link
Member

based on the error message it looks like there is an issue with an image file that you are using in the app

@clemtfvr
Copy link
Author

Yes that's true. But I used the same images in production in managed workflow and it still works now in bare workflow in debug and in release on simulator. I only have the problem in release on the physical device (which is not the greatest but runs the app in debug mode flawlessly).

@brentvatne
Copy link
Member

gotcha. let us know when you have a reproducible example and we can look into it! please follow this guide https://stackoverflow.com/help/mcve

@clemtfvr
Copy link
Author

I found a solution for the .apk to work on my old and small Huawei Mya-L41, I added android.useDeprecatedNdk=true in my gradle.properties and in build.gradle, added the following:

android { .... defaultConfig { .... ndk { abiFilters "armeabi", "armeabi-v7a", "x86", "mips" } } }

Release build is now stable on my device, just like the emulator. Any explanation or feeling on this?
I'll be digging into it a bit more today.

@cruzach
Copy link
Contributor

cruzach commented Sep 10, 2021

I'm going to close this issue as it's pretty old, the expo-payments-stripe module was deprecated with the release of SDK 42, and we collaborated with the team at Stripe to make the @stripe/stripe-react-native library work seamlessly in Expo projects, so we recommend you use that library instead (it has ApplePay support, and it will make it so that you don't need to eject just for that)

@cruzach cruzach closed this as completed Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants