Release application always crashing on splash screen - android

I'm facing an issue with React Native release builds. Either on iPhone or Android, my application works fine in debug mode, but after building with release configuration, the app always crashes on the splash screen.
On Android, I'm getting an OutOfMemory in the log triggered by WebSocketReader.java. Here is the Android log :
07-26 10:57:18.639 5893 7623 E AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher
07-26 10:57:18.639 5893 7623 E AndroidRuntime: Process: com.schooltoring, PID: 5893
07-26 10:57:18.639 5893 7623 E AndroidRuntime: java.lang.OutOfMemoryError: Failed to allocate a 10628794 byte allocation with 4409280 free bytes and 4MB until OOM
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at java.lang.StringFactory.newStringFromBytes(StringFactory.java:79)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at java.lang.StringFactory.newStringFromBytes(StringFactory.java:207)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at okio.Buffer.readString(Buffer.java:620)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at okio.Buffer.readUtf8(Buffer.java:591)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.java:222)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:101)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:262)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:201)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at okhttp3.RealCall$AsyncCall.execute(RealCall.java:135)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
07-26 10:57:18.639 5893 7623 E AndroidRuntime: at java.lang.Thread.run(Thread.java:762)
Complete log : https://gist.github.com/SLedunois/7d801cb0e55f2ae98bdbc054b0a84e61 (Sorry about the link. Crash report are too long to be included in the body)
On iPhone, I don't really understand the crash report. I'm new at iOS development. Here is the iOS crash report :
https://gist.github.com/SLedunois/76eaa85dfebb2ceff1f97cb4723989f1
I think, the error is caused by :
Thread 12 Crashed:
0 libsystem_kernel.dylib 0x00000001815192ec __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001816ba288 pthread_kill$VARIANT$mp + 376
2 libsystem_c.dylib 0x0000000181487d0c abort + 140
3 Schooltoring 0x0000000100ccc734 0x100c78000 + 345908
4 CoreFoundation 0x0000000181a931c8 __handleUncaughtException + 828
5 libobjc.A.dylib 0x0000000180c4c8c8 _objc_terminate+ 35016 () + 112
6 Schooltoring 0x0000000100cb090c 0x100c78000 + 231692
7 libc++abi.dylib 0x0000000180c3d37c std::__terminate(void (*)+ 111484 ()) + 16
8 libc++abi.dylib 0x0000000180c3cccc __cxxabiv1::exception_cleanup_func+ 109772 (_Unwind_Reason_Code, _Unwind_Exception*) + 0
9 libobjc.A.dylib 0x0000000180c4c720 _objc_exception_destructor+ 34592 (void*) + 0
10 Schooltoring 0x0000000100d61af0 0x100c78000 + 957168
11 Schooltoring 0x0000000100d61638 0x100c78000 + 955960
12 libdispatch.dylib 0x0000000181384aa0 _dispatch_call_block_and_release + 24
13 libdispatch.dylib 0x0000000181384a60 _dispatch_client_callout + 16
14 libdispatch.dylib 0x000000018138e9b4 _dispatch_queue_serial_drain$VARIANT$mp + 608
15 libdispatch.dylib 0x000000018138f2fc _dispatch_queue_invoke$VARIANT$mp + 336
16 libdispatch.dylib 0x000000018138fcc8 _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 340
17 libdispatch.dylib 0x0000000181398098 _dispatch_workloop_worker_thread$VARIANT$mp + 668
18 libsystem_pthread.dylib 0x00000001816b7e70 _pthread_wqthread + 860
19 libsystem_pthread.dylib 0x00000001816b7b08 start_wqthread + 4
All my builds are configured to be signed.
Does someone face a similar issue?

Try adding android:largeHeap="true" to your manifest under application:
Ex. <application android:label="YourApp" android:largeHeap="true"></application>

Found solution. The error was triggered because of the static image used in the application were too big.
See https://facebook.github.io/react-native/docs/images for more explanations.

Related

React Native App crashing on release mode but working fine debug mode

My React native app was working fine few days back on both release and debug mode but from yesterday it keeps crashing on start in release mode, but it is working perfectly fine on debug mode.
When i ran
adb logcat *:E
it gave me following logs but i can't find anything on internet related to this
02-17 18:30:56.108 564 595 E libPowerHal: Could not open '/proc/1705/comm'
02-17 18:30:56.108 564 595 E libPowerHal: error : 13, Permission denied
02-17 18:30:56.260 22398 22398 E com.blackhedge: Not starting debugger since process cannot load the jdwp agent.
02-17 18:30:56.282 564 595 E libPowerHal: perfLockRel handle:293
02-17 18:30:56.517 22398 22398 E libc : Access denied finding property "ro.vendor.df.effect.conflict"
02-17 18:30:56.518 534 22445 E ResolverController: No valid NAT64 prefix (105, <unspecified>/0)
02-17 18:30:56.518 534 22447 E ResolverController: No valid NAT64 prefix (105, <unspecified>/0)
02-17 18:30:56.518 534 22446 E ResolverController: No valid NAT64 prefix (105, <unspecified>/0)
02-17 18:30:56.597 564 595 E libPowerHal: perfLockRel handle:294
02-17 18:30:56.716 1204 1687 E WindowManager: App trying to use insecure INPUT_FEATURE_NO_INPUT_CHANNEL flag. Ignoring
02-17 18:30:56.716 534 22467 E ResolverController: No valid NAT64 prefix (105, <unspecified>/0)
02-17 18:30:56.720 22398 22454 E AndroidRuntime: FATAL EXCEPTION: create_react_context
02-17 18:30:56.720 22398 22454 E AndroidRuntime: Process: com.blackhedge, PID: 22398
02-17 18:30:56.720 22398 22454 E AndroidRuntime: java.lang.RuntimeException: Unable to load script. Make sure you're either running Metro (run 'npx react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release.
02-17 18:30:56.720 22398 22454 E AndroidRuntime: at com.facebook.react.bridge.CatalystInstanceImpl.jniLoadScriptFromAssets(Native Method)
02-17 18:30:56.720 22398 22454 E AndroidRuntime: at com.facebook.react.bridge.CatalystInstanceImpl.loadScriptFromAssets(CatalystInstanceImpl.java:239)
02-17 18:30:56.720 22398 22454 E AndroidRuntime: at com.facebook.react.bridge.JSBundleLoader$1.loadScript(JSBundleLoader.java:29)
02-17 18:30:56.720 22398 22454 E AndroidRuntime: at com.facebook.react.bridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:268)
02-17 18:30:56.720 22398 22454 E AndroidRuntime: at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1371)
02-17 18:30:56.720 22398 22454 E AndroidRuntime: at com.facebook.react.ReactInstanceManager.access$1100(ReactInstanceManager.java:136)
02-17 18:30:56.720 22398 22454 E AndroidRuntime: at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1065)
02-17 18:30:56.720 22398 22454 E AndroidRuntime: at java.lang.Thread.run(Thread.java:919)
02-17 18:30:56.730 22398 22457 E fullstory: Destroy scanner called twice
02-17 18:30:56.809 1204 1329 E InputDispatcher: channel '81fad7a com.blackhedge/com.blackhedge.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
02-17 18:30:56.812 4731 4790 E PowerKeeper.Event: oops, parse AM_RESTART_ACTIVITY_AI parameter error
02-17 18:30:56.814 1204 1343 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.927) failed {.code = ERROR_NOT_SUPPORTED, .description = }
02-17 18:30:57.182 1705 1705 E Launcher: changeViewByFsGestureState, view=ShortcutMenuLayer, alpha=1.0, scale=1.0
02-17 18:30:57.233 564 595 E libPowerHal: perfLockRel handle:295
02-17 18:30:59.825 1204 1343 E WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.927) failed {.code = ERROR_NOT_SUPPORTED, .description = }
I tried generating logs and searched on internet the errors i was getting on logs but found nothing
this error is caused by the absence of the index.android.bundle file in the ./android/app/src/main/assets directory
First step:
Create the assets folder if it does not exist in the android/app/src/main/ directory
Second step:
Run the following command line:
react-native bundle --platform android --dev false --entry-file index.js --bundle-output ./android/app/src/main/assets/index.android.bundle --assets-dest ./android/app/src/main/res/
Step three:
Compile the application in release mode

How to fix React native app stopped working on android

i added firebase to my react native project and it's stopped running on my emulator. I've had this issue with firebase & react-native some years back, don't know what the fix was.
Running adb logcat displays this
04-24 22:13:32.453 371 394 E system_server: Invalid ID 0x00000000.
04-24 22:13:32.465 371 398 E memtrack: Couldn't load memtrack module
04-24 22:13:32.468 371 398 E memtrack: Couldn't load memtrack module
04-24 22:13:32.471 371 398 E memtrack: Couldn't load memtrack module
04-24 22:13:32.476 371 398 E memtrack: Couldn't load memtrack module
04-24 22:13:32.479 371 398 E memtrack: Couldn't load memtrack module
04-24 22:13:32.480 371 398 E memtrack: Couldn't load memtrack module
04-24 22:13:32.482 371 398 E memtrack: Couldn't load memtrack module
04-24 22:13:32.484 371 398 E memtrack: Couldn't load memtrack module
04-24 22:13:32.485 371 398 E memtrack: Couldn't load memtrack module
04-24 22:13:32.486 371 398 E memtrack: Couldn't load memtrack module
04-24 22:13:32.487 371 398 E memtrack: Couldn't load memtrack module
04-24 22:13:32.488 371 398 E memtrack: Couldn't load memtrack module
04-24 22:13:32.493 371 398 E memtrack: Couldn't load memtrack module
04-24 22:13:32.494 4759 4759 E com.mvmarket: Unknown bits set in runtime_flags: 0x8000
04-24 22:13:32.494 371 398 E memtrack: Couldn't load memtrack module
04-24 22:13:32.748 174 4798 E ResolverController: No valid NAT64 prefix (101, <unspecified>/0)
04-24 22:13:32.755 202 271 E SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
04-24 22:13:32.755 202 271 E SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
04-24 22:13:32.818 4759 4807 E AndroidRuntime: FATAL EXCEPTION: create_react_context
04-24 22:13:32.818 4759 4807 E AndroidRuntime: Process: com.mvmarket, PID: 4759
04-24 22:13:32.818 4759 4807 E AndroidRuntime: java.lang.NoSuchMethodError: No static method createEgl14([I)Lorg/webrtc/EglBase14; in class Lorg/webrtc/EglBase; or its super classes (declaration of 'org.webrtc.EglBase' appears in /data/app/com.mvmarket-R-KOl49no3K6lCqfeV5j9A==/base.apk)
04-24 22:13:32.818 4759 4807 E AndroidRuntime: at com.oney.WebRTCModule.EglUtils.getRootEglBase(EglUtils.java:35)
04-24 22:13:32.818 4759 4807 E AndroidRuntime: at com.oney.WebRTCModule.EglUtils.getRootEglBaseContext(EglUtils.java:62)
04-24 22:13:32.818 4759 4807 E AndroidRuntime: at com.oney.WebRTCModule.WebRTCModule.<init>(WebRTCModule.java:107)
04-24 22:13:32.818 4759 4807 E AndroidRuntime: at com.oney.WebRTCModule.WebRTCModule.<init>(WebRTCModule.java:76)
04-24 22:13:32.818 4759 4807 E AndroidRuntime: at com.oney.WebRTCModule.WebRTCModulePackage.createNativeModules(WebRTCModulePackage.java:15)
04-24 22:13:32.818 4759 4807 E AndroidRuntime: at com.facebook.react.ReactPackageHelper.getNativeModuleIterator(ReactPackageHelper.java:42)
04-24 22:13:32.818 4759 4807 E AndroidRuntime: at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:42)
04-24 22:13:32.818 4759 4807 E AndroidRuntime: at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1476)
04-24 22:13:32.818 4759 4807 E AndroidRuntime: at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1447)
04-24 22:13:32.818 4759 4807 E AndroidRuntime: at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1341)
04-24 22:13:32.818 4759 4807 E AndroidRuntime: at com.facebook.react.ReactInstanceManager.access$1200(ReactInstanceManager.java:138)
04-24 22:13:32.818 4759 4807 E AndroidRuntime: at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1111)
04-24 22:13:32.818 4759 4807 E AndroidRuntime: at java.lang.Thread.run(Thread.java:919)
04-24 22:13:32.850 371 473 E InputDispatcher: channel '932d8ad com.mvmarket/com.mvmarket.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
04-24 22:13:32.857 202 202 E Layer : [Surface(name=AppWindowToken{82ce2ce token=Token{53e3bc9 ActivityRecord{127bfd0 u0 com.mvmarket/.MainActivity t75}}})/#0xafd9b7e - animation-leash#0] No local sync point found
04-24 22:13:32.857 202 202 E Layer : [Surface(name=AppWindowToken{82ce2ce token=Token{53e3bc9 ActivityRecord{127bfd0 u0 com.mvmarket/.MainActivity t75}}})/#0xafd9b7e - animation-leash#0] No local sync point found
04-24 22:13:32.874 202 202 E Layer : [Surface(name=AppWindowToken{82ce2ce token=Token{53e3bc9 ActivityRecord{127bfd0 u0 com.mvmarket/.MainActivity t75}}})/#0xafd9b7e - animation-leash#0] No local sync point found
04-24 22:13:32.890 202 202 E Layer : [Surface(name=AppWindowToken{82ce2ce token=Token{53e3bc9 ActivityRecord{127bfd0 u0 com.mvmarket/.MainActivity t75}}})/#0xafd9b7e - animation-leash#0] No local sync point found
04-24 22:13:32.906 202 202 E Layer : [Surface(name=AppWindowToken{82ce2ce token=Token{53e3bc9 ActivityRecord{127bfd0 u0 com.mvmarket/.MainActivity t75}}})/#0xafd9b7e - animation-leash#0] No local sync point found
04-24 22:13:32.924 202 202 E Layer : [Surface(name=AppWindowToken{82ce2ce token=Token{53e3bc9 ActivityRecord{127bfd0 u0 com.mvmarket/.MainActivity t75}}})/#0xafd9b7e - animation-leash#0] No local sync point found
04-24 22:13:32.940 202 202 E Layer : [Surface(name=AppWindowToken{82ce2ce token=Token{53e3bc9 ActivityRecord{127bfd0 u0 com.mvmarket/.MainActivity t75}}})/#0xafd9b7e - animation-leash#0] No local sync point found
04-24 22:13:32.956 202 202 E Layer : [Surface(name=AppWindowToken{82ce2ce token=Token{53e3bc9 ActivityRecord{127bfd0 u0 com.mvmarket/.MainActivity t75}}})/#0xafd9b7e - animation-leash#0] No local sync point found
04-24 22:13:32.974 202 202 E Layer : [Surface(name=AppWindowToken{82ce2ce token=Token{53e3bc9 ActivityRecord{127bfd0 u0 com.mvmarket/.MainActivity t75}}})/#0xafd9b7e - animation-leash#0] No local sync point found
04-24 22:13:32.990 202 202 E Layer : [Surface(name=AppWindowToken{82ce2ce token=Token{53e3bc9 ActivityRecord{127bfd0 u0 com.mvmarket/.MainActivity t75}}})/#0xafd9b7e - animation-leash#0] No local sync point found
Fixed it
According to the stacktrace, it was an issue with react-native-webrtc
Fixed with this https://stackoverflow.com/a/67592188/11901942
Thanks #Gabe Sechan

Flutter crash after open apps

I usually build my mobile apps using build service from codemagic.com. During this week i didnt change anything of my code except build number.
Today I got my mobile phone crash after new AppBundle Compile with below error stack from firebase console.
Fatal Exception: java.lang.NoSuchMethodError
No static method createAsync(Landroid/os/Looper;)Landroid/os/Handler; in class Landroidx/core/os/HandlerCompat; or its super classes (declaration of 'androidx.core.os.HandlerCompat' appears in /data/app/exampleapps.exampleappsapps-BpzH5e6LIznAEB3YpE_SGw==/base.apk)
This crash occurs this week (last week was okay), this means There's something update on the 3rd party plugin library or from flutter, but I don't know which plugin causes this crash because I didn't change anything of my code.
Below are my pubspec.yaml specifications:
rxdart_codemod: ^0.1.5
angles: ^1.0.1
app_settings: ^1.0.5
archive: ^2.0.8
flutter_cache_manager: ^1.4.0
cached_network_image: ^2.2.0+1
carousel_slider: ^1.3.0
cron: ^0.2.1
crypto: ^2.0.6
cupertino_icons: ^0.1.2
date_format: ^1.0.5
device_id: ^0.1.3
dio: ^3.0.9
easy_alert: ^0.0.2
localstorage: ^2.0.0
audioplayers: ^0.13.1
path_provider: ^1.1.0
esys_flutter_share: ^1.0.2
flutter_compass: ^0.3.2
flutter_html: ^0.9.6
flutter_local_notifications: ^0.8.2
flutter_offline: ^0.2.4+1
flutter_swiper: ^1.1.6
flutter_xlider: ^2.4.5
font_awesome_flutter: ^8.2.0
geolocator: ^5.0.1
google_maps_flutter: ^0.2.0
google_sign_in: ^4.0.1+1
http: ^0.12.1
libcalendar: ^0.2.0
observable: ^0.22.2
location : ^2.3.0
numberpicker: ^1.0.0
pigment: ^1.0.3
# rxdart: ^0.24.1
rxdart: ">=0.18.1 <0.24.1"
shared_preferences: ^0.5.1+1
shimmer: ^1.0.0
unicode: ^0.1.0
url_launcher: ^5.0.2
validate: ^1.6.0
vibrate: ^0.0.4
# quran purpose
after_layout: ^1.0.7+2
draggable_scrollbar: ^0.0.4
flutter_web_browser: ^0.11.0
flutter_youtube: ^1.1.6
google_api_availability: ^2.0.1
indexed_list_view: ^0.0.5
permission_handler: ^3.1.0
queries: ^0.1.4
rect_getter: ^0.0.1
scroll_to_index: any
sqflite: ^1.1.5
tuple: ^1.0.2
xml2json: ^3.0.3
firebase_messaging: ^5.1.6
firebase_analytics: ^3.0.2
firebase_core: ^0.4.0+3
firebase_auth: ^0.11.1+6
firebase_admob: ^0.9.0+1
firebase_in_app_messaging: ^0.0.1+3
#button_style
superellipse_shape: ^0.1.5
#device info
device_info: ^0.4.0+2
#in-app-purchase
in_app_purchase: ^0.2.0+6
#realtime-error-reporting
sentry: any
#system_info
system_info: ^0.1.1
#highlight for tutorial
highlighter_coachmark: ^0.0.3
#detect sound
volume: ^0.1.0
#admob
admob_flutter: ^0.3.2
#other
bubble_tab_indicator: "^0.1.4"
material_design_icons_flutter: ^3.0.3289
scoped_model: ^1.0.1
flutter_slidable: ^0.4.9
kiwi: ^0.1.0
flutter_markdown: ^0.2.0
#download & save file to storage
flutter_downloader: ^1.2.1
native_ads: ^0.2.0
onesignal_flutter: ^2.0.0
##TEMPORARY DISABLED
#flutter_facebook_login: ^3.0.0
USB debug log:
08-17 11:18:42.282 12595 12600 I zygote64: Increasing code cache capacity to 128KB
08-17 11:18:42.283 12595 12595 I CrashlyticsInitProvider: CrashlyticsInitProvider initialization successful
08-17 11:18:42.285 12595 12595 D AndroidRuntime: Shutting down VM
--------- beginning of crash
08-17 11:18:42.285 12595 12595 E AndroidRuntime: FATAL EXCEPTION: main
08-17 11:18:42.285 12595 12595 E AndroidRuntime: Process: exampleapps.exampleappsapps, PID: 12595
08-17 11:18:42.285 12595 12595 E AndroidRuntime:
java.lang.NoSuchMethodError: No static method createAsync(Landroid/os/Looper;)Landroid/os/Handler; in class Landroidx/core/os/HandlerCompat; or its super classes (declaration of 'androidx.core.os.HandlerCompat' appears in /data/app/exampleapps.exampleappsapps-XKGzJQs6twT4qKb4AGKGTQ==/base.apk)
08-17 11:18:42.285 12595 12595 E AndroidRuntime: at androidx.work.impl.DefaultRunnableScheduler.**(DefaultRunnableScheduler.java:40)
08-17 11:18:42.285 12595 12595 E AndroidRuntime: at androidx.work.Configuration.(Configuration.java:106)
08-17 11:18:42.285 12595 12595 E AndroidRuntime: at androidx.work.Configuration$Builder.build(Configuration.java:434)
08-17 11:18:42.285 12595 12595 E AndroidRuntime: at androidx.work.impl.WorkManagerInitializer.onCreate(WorkManagerInitializer.java:40)
08-17 11:18:42.285 12595 12595 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:1919)
08-17 11:18:42.285 12595 12595 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:1894)
08-17 11:18:42.285 12595 12595 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:6316)
08-17 11:18:42.285 12595 12595 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:5882)
08-17 11:18:42.285 12595 12595 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5803)
08-17 11:18:42.285 12595 12595 E AndroidRuntime: at android.app.ActivityThread.-wrap1(Unknown Source:0)
08-17 11:18:42.285 12595 12595 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1666)
08-17 11:18:42.285 12595 12595 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
08-17 11:18:42.285 12595 12595 E AndroidRuntime: at android.os.Looper.loop(Looper.java:251)
08-17 11:18:42.285 12595 12595 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6572)
08-17 11:18:42.285 12595 12595 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
08-17 11:18:42.285 12595 12595 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
08-17 11:18:42.285 12595 12595 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
08-17 11:18:43.407 703 779 E ANDR-PERF-OPTSHANDLER: perf_lock_rel: updated /sys/class/mmc_host/mmc0/clk_scaling/enable with 0
08-17 11:18:43.407 703 779 E ANDR-PERF-OPTSHANDLER: return value 2
08-17 11:18:44.199 2831 4931 I ActivityManager: Killing 10866:com.sonymobile.smartcharger/1000 (adj 906): empty #17
08-17 11:18:44.210 2831 4931 I ActivityManager: Killing 11915:com.discord/u0a315 (adj 906): empty #18
08-17 11:18:44.698 677 677 D audio_hw_primary: out_standby: enter: stream (0xf13d4000) usecase(1: low-latency-playback)
08-17 11:18:44.802 677 677 D audio_hw_primary: disable_audio_route: reset and update mixer path: low-latency-playback
08-17 11:18:44.807 677 677 D hardware_info: hw_info_append_hw_type : device_name = speaker
08-17 11:18:44.808 677 677 D audio_hw_primary: disable_snd_device: snd_device(84: speaker)
08-17 11:18:44.829 677 677 D hardware_info: hw_info_append_hw_type : device_name = vi-feedback
08-17 11:18:44.830 677 677 D audio_hw_primary: disable_snd_device: snd_device(242: vi-feedback)
08-17 11:18:44.830 677 677 D msm8974_platform: platform_split_snd_device: snd_device(242) num devices(0) new_snd_devices(-238434933)
08-17 11:18:44.830 677 677 D audio_hw_primary: disable_audio_route: reset and update mixer path: spkr-vi-record
08-17 11:18:44.867 677 677 D audio_hw_extn: audio_extn_get_anc_enabled: anc_enabled:0
08-17 11:18:44.867 677 677 D audio_hw_extn: audio_extn_get_anc_enabled: anc_enabled:0
08-17 11:18:44.867 677 677 D audio_hw_primary: out_standby: exit
08-17 11:18:46.288 12595 12595 E CrashlyticsCore: Failed to execute task.
08-17 11:18:46.288 12595 12595 E CrashlyticsCore: java.util.concurrent.TimeoutException
08-17 11:18:46.288 12595 12595 E CrashlyticsCore: at java.util.concurrent.FutureTask.get(FutureTask.java:206)
08-17 11:18:46.288 12595 12595 E CrashlyticsCore: at com.crashlytics.android.core.CrashlyticsBackgroundWorker.submitAndWait(CrashlyticsBackgroundWorker.java:41)
08-17 11:18:46.288 12595 12595 E CrashlyticsCore: at com.crashlytics.android.core.CrashlyticsController.handleUncaughtException(CrashlyticsController.java:321)
08-17 11:18:46.288 12595 12595 E CrashlyticsCore: at com.crashlytics.android.core.CrashlyticsController$6.onUncaughtException(CrashlyticsController.java:301)
08-17 11:18:46.288 12595 12595 E CrashlyticsCore: at com.crashlytics.android.core.CrashlyticsUncaughtExceptionHandler.uncaughtException(CrashlyticsUncaughtExceptionHandler.java:42)
08-17 11:18:46.288 12595 12595 E CrashlyticsCore: at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1068)
08-17 11:18:46.288 12595 12595 E CrashlyticsCore: at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1063)
08-17 11:18:46.288 12595 12595 E CrashlyticsCore: at java.lang.Thread.dispatchUncaughtException(Thread.java:1953)
08-17 11:18:46.301 2831 3677 D ActivityManager: New dropbox entry: exampleapps.exampleappsapps, data_app_crash, 3558ffd2-7966-4d8d-8ba6-2ceca752fb06
08-17 11:18:46.310 2831 3677 W ActivityManager: Force finishing activity exampleapps.exampleappsapps/.MainActivity
08-17 11:18:46.313 2831 3677 D ActivityTrigger: ActivityTrigger activityPauseTrigger
08-17 11:18:46.323 2831 3677 W ActivityManager: Force finishing activity com.android.vending/.AssetBrowserActivity
08-17 11:18:46.335 2831 3677 I ActivityManager: Killing 12013:com.sonymobile.coverapp2/1000 (adj 906): empty #17
08-17 11:18:46.338 12111 12111 I Finsky : [2] rjc.onTrimMemory(1): Memory trim requested to level 20
08-17 11:18:46.339 12111 12111 I Finsky : [2] rjc.onTrimMemory(2): Flushing in-memory image cache
08-17 11:18:46.352 2831 2891 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
08-17 11:18:46.352 2831 2891 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
08-17 11:18:46.353 2831 2891 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.sonyericsson.crashmonitor/.receiver.CrashMonitorServiceBroadcastReceiver
08-17 11:18:46.356 2496 2496 I JavaDumper:main: dest_path: /data/system/log/jd_dropboxfiles/data_app_crash#1597637926341.txt
08-17 11:18:46.356 2496 2496 I JavaDumper:main: tot_read: 1699, tot_write: 1699
08-17 11:18:46.356 2496 2496 I JavaDumper:main: Successfully copied dropbox file to /data/system/log/jd_dropboxfiles/data_app_crash#1597637926341.txt
08-17 11:18:46.357 2496 2496 D clmlib : Got activities:0x00000008
08-17 11:18:46.359 12111 12111 W ProxyAndroidLoggerBackend: Too many Flogger logs received before configuration. Dropping old logs.
08-17 11:18:46.362 12111 12248 W ProxyAndroidLoggerBackend: Too many Flogger logs received before configuration. Dropping old logs.
08-17 11:18:46.363 2496 2496 I JavaDumper:JavaDumperThread: addEvent: data_app_crash#1597637926341.txt processName: exampleapps.exampleappsapps
08-17 11:18:46.363 2496 2540 I JavaDumper:JavaDumperThread: Event: data_app_crash#1597637926341.txt TimeStamp: 1597637926
08-17 11:18:46.419 2496 2540 W JavaDumper:JavaDumper: Could not init dump dir: Unknown error -95
08-17 11:18:46.420 2496 2540 E JavaDumper:FW: utils.c(257): mkdir (/data/crashdata) failed. File exists
08-17 11:18:46.423 2831 2893 I ActivityManager: Showing crash dialog for package exampleapps.exampleappsapps u0
any idea?
Could you try updating your firebase packages dependencies?
Flutter app crashes at startup are mainly caused by the any Package dependency issue
causing error can be debug via following command inside project folder into terminal
adb logcat
in your case 08-17 11:18:42.282 12595 12600 I zygote64: Increasing code cache capacity to 128KB 08-17 11:18:42.283 12595 12595 I CrashlyticsInitProvider: CrashlyticsInitProvider initialization successful 08-17 11:18:42.285 12595 12595 D AndroidRuntime: Shutting down VM
it seems crashlytics error
check if you have applied required dependency in android/app/build.gradle
as shown in picture
apply plugin: 'io.fabric'
adb logcat can provide the detail for exact error causing issue
project build.gradle
Whether androidx.core version is specified
Similar to the following
rootProject.allprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'androidx.core') {
details.useVersion "1.0.1"
}
}
}
}
If so, delete it
I had a similar issue with codemagic this week, but when I built locally and pushed to Google Play Console/App Store Connect the app runs successfully. Maybe an issue coming from codemagic?

Release app crashes instantly when run. Debug version is fine react native android

I can run my app fine on my phone while debugging but by running npx react-native run-android --variant=release
or making a release apk through android studio it crashes as soon as I open it. For what's in the logcat ithink the react-native-background-task might be to blame. Even though I tried to uninstall it. Maybe it wasn't uninstalled correctly.
adb logcat *:E
p(Looper.java:193)
08-20 23:46:52.037 21966 22003 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
08-20 23:46:52.037 21966 22003 E AndroidRuntime: at java.lang.Thread.run(Thread.java:764)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
08-20 23:47:04.089 22076 22133 E AndroidRuntime: Process: com.perkunos.daily_dharma, PID: 22076
08-20 23:47:04.089 22076 22133 E AndroidRuntime: java.lang.IllegalStateException: You need to call create() at least once to create the singleton
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at com.evernote.android.job.JobManager.instance(JobManager.java:159)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at com.jamesisaac.rnbackgroundtask.BackgroundTaskModule.initialize(BackgroundTaskModule.java:52)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at com.facebook.react.bridge.ModuleHolder.doInitialize(ModuleHolder.java:236)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at com.facebook.react.bridge.ModuleHolder.markInitializable(ModuleHolder.java:100)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at com.facebook.react.bridge.NativeModuleRegistry.notifyJSInstanceInitialized(NativeModuleRegistry.java:103)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at com.facebook.react.bridge.CatalystInstanceImpl$4.run(CatalystInstanceImpl.java:542)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:873)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at android.os.Looper.loop(Looper.java:193)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
08-20 23:47:04.089 22076 22133 E AndroidRuntime: at java.lang.Thread.run(Thread.java:764)
08-20 23:47:05.064 1211 1365 E storaged: getDiskStats failed with result NOT_SUPPORTED and size 0
08-20 23:47:07.842 22161 22194 E AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
08-20 23:47:07.842 22161 22194 E AndroidRuntime: Process: com.perkunos.daily_dharma, PID: 22161
08-20 23:47:07.842 22161 22194 E AndroidRuntime: java.lang.IllegalStateException: You need to call create() at least once to create the singleton
08-20 23:47:07.842 22161 22194 E AndroidRuntime: at com.evernote.android.job.JobManager.instance(JobManager.java:159)
React Native version:
System:
OS: Linux 4.17 Ubuntu 16.04.6 LTS (Xenial Xerus)
CPU: (4) x64 Intel(R) Core(TM) i5-4210U CPU # 1.70GHz
Memory: 1.68 GB / 7.70 GB
Shell: 4.3.48 - /bin/bash
Binaries:
Node: 12.18.1 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/bin/yarn
npm: 6.14.5 - /usr/local/bin/npm
Watchman: Not Found
SDKs:
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Languages:
Java: 1.8.0_201 - /usr/bin/javac
Python: 2.7.16 - /home/daniel/anaconda2/bin/python
npmPackages:
#react-native-community/cli: Not Found
react: ~16.11.0 => 16.11.0
react-native: ~0.62.2 => 0.62.2
npmGlobalPackages:
*react-native*: Not Found
It was the react-native-background-task unnistallation that was causing problems, either I did it wrong or something went bad. Installing it again with all the steps did the trick.

Android release APK fails immediately on launch on mobile device

The Android release APK crashes on launch when I install it on mobile device. It works fine on Android Emulator. Also, debug builds work fine on Emulator.
I’ve tried the methods in the below link suggested by #bhardman, #gderaco + #sacchykhedkar and #alvelig so far with no success.
https://github.com/facebook/react-native/issues/18357
Environment:
package.json
…
"dependencies": {
"react": "^16.6.3",
"react-dom": "^16.8.1",
"react-native": "0.58.4",
"react-native-gesture-handler": "^1.0.15",
"react-native-image-pan-zoom": "^2.1.11",
"react-navigation": "^3.2.1"
},
…
android/ build.gradle
…
buildscript {
ext {
buildToolsVersion = "28.0.2"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 27
supportLibVersion = "28.0.0"
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
…
App.js
…
import React, {Component} from 'react';
import { Platform, StyleSheet, Text, View, Image, Dimensions, Button, TouchableHighlight, WebView, ViewPropTypes } from 'react-native';
import { createStackNavigator, createAppContainer, StackActions, NavigationActions, withNavigation } from "react-navigation";
type Props = {};
export class App1 extends Component {
render() {
return (
<View style={styles.container}>
<TopMenu1 navigation={this.props.navigation} />
<View1Map />
</View>
);
}
}
…
Expected behaviour:
You open the app on your mobile device. And the app opens.
Actual behaviour:
App fails to launch on Android phone. Error message:
Unfortunately, [APP Name] had stopped.
Error messages (from logs.txt file generated from the Android phone):
I can't tell which lines are relevant. So I searched with the app name "sampleapp".
02-14 08:12:51.252 1062 1940 I ActivityManager: Killing 26119:com.android.defcontainer/u0a17 (adj 15): empty #17
02-14 08:12:51.260 1062 2363 I ActivityManager: Recipient 26119
02-14 08:12:51.270 1062 1385 I ActivityManager: Recipient 26671
02-14 08:12:51.295 1062 1698 D StatusBarManagerService: swetImeWindowStatus vis=0 backDisposition=0
02-14 08:12:51.341 1062 1940 D PMS : releaseWL(23288de): PARTIAL_WAKE_LOCK *launch* 0x1 WorkSource{10256}
02-14 08:12:51.410 1062 1385 I ActivityManager: Process com.htc.videocenter (pid 26671) has died
02-14 08:12:52.438 26718 26718 E AndroidRuntime: FATAL EXCEPTION: main
02-14 08:12:52.438 26718 26718 E AndroidRuntime: Process: com.sampleapp, PID: 26718
02-14 08:12:52.438 26718 26718 E AndroidRuntime: java.lang.IllegalStateException: Unable to create layer for ReactViewGroup
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at android.os.MessageQueue.nativePollOnce(Native Method)
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at android.os.MessageQueue.next(MessageQueue.java:323)
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at android.os.Looper.loop(Looper.java:144)
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5845)
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
02-14 08:12:52.438 26718 26718 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
02-14 08:12:52.446 1062 2435 W ActivityManager: Force finishing activity com.sampleapp/.MainActivity
02-14 08:12:52.498 1062 2435 D PMS : acquireWL(f07ef11): PARTIAL_WAKE_LOCK *launch* 0x1 1062 1000 WorkSource{10256}
02-14 08:12:52.563 1062 1081 D StatusBarManagerService: setSystemUiVisibility(0x8000)
02-14 08:12:52.563 1062 1081 D StatusBarManagerService: disable:userId=0 what=0x0 which=0x1 pkg=Window{f67b705 u0 Application Error: com.sampleapp}
02-14 08:12:52.563 1062 1081 D StatusBarManagerService: hiding MENU key
02-14 08:12:52.832 1062 1184 D PMS : releaseHCC(967c58c): CPU_MIN_NUM ActivityManager-MultiCore-Num 0x8000 null
02-14 08:12:52.832 1062 1184 D PMS : releaseHCC(5a7f4d5): CPU_MIN_FREQ ActivityManager-MultiCore-Freq 0x2000 null
02-14 08:12:52.999 1062 1080 W ActivityManager: Activity pause timeout for ActivityRecord{858d360 u0 com.sampleapp/.MainActivity t2027 f}
02-14 08:12:53.108 1062 1072 D PMS : releaseWL(f07ef11): PARTIAL_WAKE_LOCK *launch* 0x1 WorkSource{2897}

Categories

Resources