flutter_workmanager icon indicating copy to clipboard operation
flutter_workmanager copied to clipboard

🐞[ClassNotFoundException] java.lang.ClassNotFoundException with 0.5.0-dev.8

Open TheCarpetMerchant opened this issue 3 years ago • 3 comments

  • [x] I have read the README
  • [x] I have done the setup for Android

Version

Technology Version
Workmanager version 0.5.0-dev.8

Describe the error

I'm getting this error regularly since I started using Work Manager (0.5.0-dev.8). Given this appeared with the inclusion of the package and I have no complain from the users, I do believe it is the package creating this error. It happens across Android 9, 10, and 11 (not 12 so far, which is notable). It has been repeated hundreds of times across my userbase.

Is this a packaging problem ? Proguard ? I'm mostly looking to see if this is a known issue but I haven't found anything about it.

Stacktrace taken from the Play Console
java.lang.RuntimeException: 
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:3960)
  at android.app.ActivityThread.access$1400 (ActivityThread.java:268)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1993)
  at android.os.Handler.dispatchMessage (Handler.java:107)
  at android.os.Looper.loop (Looper.java:237)
  at android.app.ActivityThread.main (ActivityThread.java:7814)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1075)
Caused by: java.lang.ClassNotFoundException: 
  at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:196)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:379)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:312)
  at android.app.AppComponentFactory.instantiateReceiver (AppComponentFactory.java:110)
  at androidx.core.app.CoreComponentFactory.instantiateReceiver (CoreComponentFactory.java)
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:3953)
  at android.app.ActivityThread.access$1400 (ActivityThread.java:268)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1993)
  at android.os.Handler.dispatchMessage (Handler.java:107)
  at android.os.Looper.loop (Looper.java:237)
  at android.app.ActivityThread.main (ActivityThread.java:7814)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1075)

Output of flutter doctor -v

Stacktrace
[√] Flutter (Channel stable, 2.10.4, on Microsoft Windows [version 10.0.19044.1645], locale fr-BE)
    • Flutter version 2.10.4 at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c860cba910 (4 weeks ago), 2022-03-25 00:23:12 -0500
    • Engine revision 57d3bac3dd
    • Dart version 2.16.2
    • DevTools version 2.9.2

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at 
    • Platform android-31, build-tools 30.0.2
    • 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.

[!] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.0)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.1.32210.238
    X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++" workload, and include these components:
        MSVC v142 - VS 2019 C++ x64/x86 build tools
         - If there are multiple build tool versions available, install the latest
        C++ CMake tools for Windows
        Windows 10 SDK

[√] 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.65.2)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.36.0

[√] Connected device (1 available)
    • Windows (desktop) • windows • windows-x64 • Microsoft Windows [version 10.0.19044.1645]

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

! Doctor found issues in 1 category.

TheCarpetMerchant avatar Apr 23 '22 10:04 TheCarpetMerchant

same

NavidHosseini avatar Apr 24 '22 04:04 NavidHosseini

We need more logs for this bug.. can you please run add logcat and from beginning to end and post the entire logs? Are the jobs still running?

ened avatar May 15 '22 12:05 ened

I can't reproduce it myself ; I'll soon install Firebase's crashlytics and I'll see if your version 5.0.0 still causes problems :)

TheCarpetMerchant avatar May 15 '22 16:05 TheCarpetMerchant