java.lang.IllegalArgumentException: documentAdapter cannot be null

GitHub | tim1003 | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    plugin crashes app when trying to print

    GitHub | 7 months ago | tim1003
    java.lang.IllegalArgumentException: documentAdapter cannot be null

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      documentAdapter cannot be null

      at android.print.PrintManager.print()
    2. Android Platform
      PrintManager.print
      1. android.print.PrintManager.print(PrintManager.java:382)
      1 frame
    3. de.appplant.cordova
      Printer$4.onPageFinished
      1. de.appplant.cordova.plugin.printer.Printer$4.onPageFinished(Printer.java:281)
      1 frame
    4. com.android.webview
      WebViewContentsClientAdapter.onPageFinished
      1. com.android.webview.chromium.WebViewContentsClientAdapter.onPageFinished(WebViewContentsClientAdapter.java:449)
      1 frame
    5. com.android.org
      AwContentsClient$AwWebContentsObserver$1.run
      1. com.android.org.chromium.android_webview.AwContentsClient$AwWebContentsObserver$1.run(AwContentsClient.java:73)
      1 frame
    6. Android Platform
      ActivityThread.main
      1. android.os.Handler.handleCallback(Handler.java:733)
      2. android.os.Handler.dispatchMessage(Handler.java:95)
      3. android.os.Looper.loop(Looper.java:146)
      4. android.app.ActivityThread.main(ActivityThread.java:5602)
      4 frames
    7. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:515)
      2 frames
    8. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
      2 frames
    9. Android Platform
      NativeStart.main
      1. dalvik.system.NativeStart.main(Native Method)
      1 frame