Flutter crash after open apps

2

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/zipedia.zipediaapps-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: zipedia.zipediaapps, 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/zipedia.zipediaapps-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: zipedia.zipediaapps, data_app_crash, 3558ffd2-7966-4d8d-8ba6-2ceca752fb06 08-17 11:18:46.310 2831 3677 W ActivityManager: Force finishing activity zipedia.zipediaapps/.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: zipedia.zipediaapps 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 zipedia.zipediaapps u0

any idea?

android
flutter
crash
codemagic
asked on Stack Overflow Aug 17, 2020 by zukijuki • edited Aug 19, 2020 by zukijuki

4 Answers

0

Could you try updating your firebase packages dependencies?

answered on Stack Overflow Aug 24, 2020 by faithomotoso
0

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'

enter image description here

adb logcat can provide the detail for exact error causing issue

answered on Stack Overflow Aug 24, 2020 by Javeed Ishaq • edited Aug 24, 2020 by Javeed Ishaq
0

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

answered on Stack Overflow Aug 26, 2020 by fangwy • edited Aug 26, 2020 by fangwy
0

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?

answered on Stack Overflow Sep 15, 2020 by mcmahonS9

User contributions licensed under CC BY-SA 3.0