Open davejlin opened 2 years ago
I am also receiving this exception on version 2.0.1 of advance_pdf_viewer using my Android device.
E/flutter ( 8502): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method getPage on channel flutter_plugin_pdf_viewer)
E/flutter ( 8502): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:165:7)
E/flutter ( 8502):
flutter doctor -v:
[✓] Flutter (Channel stable, 2.8.0, on macOS 11.6 20G165 darwin-x64, locale en-US) • Flutter version 2.8.0 at /Users/emilyrainer/Developer/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision cf44000065 (4 weeks ago), 2021-12-08 14:06:50 -0800 • Engine revision 40a99c5951 • Dart version 2.15.0
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc5) • Android SDK at /Users/emilyrainer/Library/Android/sdk • Platform android-31, build-tools 31.0.0-rc5 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165) • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.0) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.10.1
[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3) • Android Studio at /Applications/Android Studio.app/Contents • 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.10+0-b96-7281165)
[✓] IntelliJ IDEA Community Edition (version 2018.1.6) • IntelliJ at /Applications/IntelliJ IDEA CE.app • 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
[✓] VS Code (version 1.63.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.29.0
[✓] Connected device (2 available) • SM G991U1 (mobile) • R5CR50YYD5T • android-arm64 • Android 11 (API 30) • Chrome (web) • chrome • web-javascript • Google Chrome 96.0.4664.110
same here
I downgraded back to 2.0.0 and it works ok, just throws the Android Deprecated old error
same here
I downgraded back to 2.0.0 and it works ok, just throws the Android Deprecated old error
i had the same issue, but for me even downgrade to 2.0.0 won't work. Wen I tap the button to open PDF the screen just close and the app close, with the same message.
After I change advance_pdf_viewer: ^2.0.0 to advance_pdf_viewer: 2.0.0 works.
same here
I downgraded back to 2.0.0 and it works ok, just throws the Android Deprecated old error
same here.
Having the same issue on android when I upgraded to 2.0.1. Does anyone know how to resolve it? Kindly tell.
same issue here
I/System.out( 9379): Already closed
W/System.err( 9379): java.lang.IllegalStateException: Already closed
W/System.err( 9379): at android.graphics.pdf.PdfRenderer.throwIfClosed(PdfRenderer.java:267)
W/System.err( 9379): at android.graphics.pdf.PdfRenderer.close(PdfRenderer.java:185)
W/System.err( 9379): at pt.tribeiro.flutter_plugin_pdf_viewer.FlutterPluginPdfViewerPlugin.getPage(FlutterPluginPdfViewerPlugin.java:206)
W/System.err( 9379): at pt.tribeiro.flutter_plugin_pdf_viewer.FlutterPluginPdfViewerPlugin.access$100(FlutterPluginPdfViewerPlugin.java:31)
W/System.err( 9379): at pt.tribeiro.flutter_plugin_pdf_viewer.FlutterPluginPdfViewerPlugin$1.run(FlutterPluginPdfViewerPlugin.java:84)
W/System.err( 9379): at android.os.Handler.handleCallback(Handler.java:873)
W/System.err( 9379): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err( 9379): at android.os.Looper.loop(Looper.java:193)
W/System.err( 9379): at android.os.HandlerThread.run(HandlerThread.java:65)
D/PdfViewerPlugin( 9379): Retrieving page failed.
E/AndroidRuntime( 9379): FATAL EXCEPTION: flutterPdfViewer
E/AndroidRuntime( 9379): Process: io.rokt.com.otsuka.mobileapp, PID: 9379
E/AndroidRuntime( 9379): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: flutterPdfViewer
E/AndroidRuntime( 9379): at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:1280)
E/AndroidRuntime( 9379): at io.flutter.embedding.engine.FlutterJNI.invokePlatformMessageEmptyResponseCallback(FlutterJNI.java:933)
E/AndroidRuntime( 9379): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:167)
E/AndroidRuntime( 9379): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.notImplemented(MethodChannel.java:248)
E/AndroidRuntime( 9379): at pt.tribeiro.flutter_plugin_pdf_viewer.FlutterPluginPdfViewerPlugin$1.run(FlutterPluginPdfViewerPlugin.java:87)
E/AndroidRuntime( 9379): at android.os.Handler.handleCallback(Handler.java:873)
E/AndroidRuntime( 9379): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 9379): at android.os.Looper.loop(Looper.java:193)
E/AndroidRuntime( 9379): at android.os.HandlerThread.run(HandlerThread.java:65)
D/TransportRuntime.SQLiteEventStore( 9379): Storing event with priority=HIGHEST, name=FIREBASE_CRASHLYTICS_REPORT for destination cct
D/TransportRuntime.JobInfoScheduler( 9379): Scheduling upload for context TransportContext(cct, HIGHEST, MSRodHRwczovL2NyYXNobHl0aWNzcmVwb3J0cy1wYS5nb29nbGVhcGlzLmNvbS92MS9maXJlbG9nL2xlZ2FjeS9iYXRjaGxvZ1xBSXphU3lCcnBTWVQ0RkZMMDlyZUhKaTZIOUZZZGVpU25VVE92Mk0=) with jobId=-1646578455 in 9803ms(Backend next call timestamp 1642131046115). Attempt 1
Facing same issue, Any solution for this?
I do have this issue on v.2.1.0 here the log from sentry
java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: flutterPdfViewer
at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:3)
at io.flutter.embedding.engine.FlutterJNI.invokePlatformMessageEmptyResponseCallback(FlutterJNI.java:1)
at io.flutter.embedding.engine.f.b$a.a(DartMessenger.java:2)
at f.a.d.a.k$a$a.c(MethodChannel.java:1)
at i.a.a.a$a.run(FlutterPluginPdfViewerPlugin.java:8)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:255)
at android.os.HandlerThread.run(HandlerThread.java:67)
I think it is fine on 2.0.0 before
This package is working, trying to use it.
This line here cause exception on https://github.com/lohanidamodar/pdf_viewer/blob/43ae962390ac51cd79b418f592073b14a871ece1/android/src/main/java/pt/tribeiro/flutter_plugin_pdf_viewer/FlutterPluginPdfViewerPlugin.java#L203 before return. which result in null being return. Can we get a fix on the official pub?
This line here cause exception on
https://github.com/lohanidamodar/pdf_viewer/blob/43ae962390ac51cd79b418f592073b14a871ece1/android/src/main/java/pt/tribeiro/flutter_plugin_pdf_viewer/FlutterPluginPdfViewerPlugin.java#L203 before return. which result in null being return. Can we get a fix on the official pub?
There is the error you mention, and also there should be a else block after the if here:
if (pageResult == null) {
Log.d(TAG, "Retrieving page failed.");
result.notImplemented();
}
mainThreadHandler.post(new Runnable() {
@Override
public void run() {
result.success(pageResult);
}
});
I created a pull request https://github.com/lohanidamodar/pdf_viewer/pull/101
Hi, when will be a new release with fix available?
Thanks!
MissingPluginException is thrown and crashes my app when I use v2.0.1 on Android. v2.0.0 on Android does not have this issue. v2.0.1 on iOS does not have this issue. Is there something I need to update to use v2.0.1 on Android?
Thrown from:
Call stack:
flutter doctor -v: