question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plugin crash on Android.

See original GitHub issue

I use flutter_downloader version 1.7.1. For some small number of users I observe the next crash:

Fatal Exception: java.lang.NullPointerException: Attempt to read from field 'java.lang.String io.flutter.view.FlutterCallbackInformation.callbackLibraryPath' on a null object reference
       at io.flutter.embedding.engine.dart.DartExecutor$DartCallback.toString(DartExecutor.java:22)
       at java.lang.String.valueOf(String.java:2896)
       at java.lang.StringBuilder.append(StringBuilder.java:132)
       at io.flutter.embedding.engine.dart.DartExecutor.executeDartCallback(DartExecutor.java:22)
       at vn.hunghd.flutterdownloader.DownloadWorker.startBackgroundIsolate(DownloadWorker.java:58)
       at vn.hunghd.flutterdownloader.DownloadWorker.access$000(DownloadWorker.java)
       at vn.hunghd.flutterdownloader.DownloadWorker$1.run(DownloadWorker.java:4)
       at android.os.Handler.handleCallback(Handler.java:873)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:214)
       at android.app.ActivityThread.main(ActivityThread.java:6986)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1445)

Crash happens in a second after launching the app.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
hnvncommented, Jan 25, 2022

Released v1.7.2

3reactions
Taym95commented, Jan 22, 2022

@Taym95 , could you provide more codes to handle the case that flutterCallback is null, because of without flutterCallback it can cause other issues.

if flutterCallback is null, I am quitting the function, this is the solution I see all other flutter plugin using it, I don’t see how to handle that case

Read more comments on GitHub >

github_iconTop Results From Across the Web

Crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >
[Camera Plugin] App crashes after confirming picture
I take the picture, see its preview and once I click OK, the app crashes. I've been noticing these errors: My phone is...
Read more >
[Android] App crashes after upgrading to 2.10.x using ... - GitHub
Seems like whenever there is another PlatformView active (tested with WebView plugin) and that view is disposed app is crashing.
Read more >
Here's how to fix constant app crashes in Android 12 beta
If you're seeing constant app crashes on Android 12, just go to the Settings menu, tap Apps, All apps, then scroll down to...
Read more >
Crash Reporter Plugin Setup - Flipper
You can use the Crash Reporter plugin to send notifications for exceptions that are suppressed in your Android application. You could even use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found