Skip to content
This repository was archived by the owner on Nov 9, 2021. It is now read-only.
This repository was archived by the owner on Nov 9, 2021. It is now read-only.

cordova-plugin-filepath Crash Report:java.lang.NumberFormatException #73

@albertyue

Description

@albertyue

i use cordova-plugin-filechooser(1.2.0) choose file, then use this plugin (1.6.0) convert the content uri to native "file://" like uri, but i got this err:
E/PluginManager: Uncaught exception from plugin java.lang.NumberFormatException: For input string: "raw:/storage/emulated/0/Download/Browser/libusb-1.0.24.7z" at java.lang.Long.parseLong(Long.java:594) at java.lang.Long.valueOf(Long.java:808) at com.hiddentao.cordova.filepath.FilePath.getPath(FilePath.java:370) at com.hiddentao.cordova.filepath.FilePath.resolveNativePath(FilePath.java:103) at com.hiddentao.cordova.filepath.FilePath.execute(FilePath.java:75) at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98) at org.apache.cordova.PluginManager.exec(PluginManager.java:132) at com.getcapacitor.MessageHandler.callCordovaPluginMethod(MessageHandler.java:107) at com.getcapacitor.MessageHandler.postMessage(MessageHandler.java:51) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:336) at android.os.Looper.loop(Looper.java:184) at android.os.HandlerThread.run(HandlerThread.java:67)

it seems like the plugin was crashed.
the original content uri is "content://com.android.providers.downloads.documents/document/raw%3A%2Fstorage%2Femulated%2F0%2FDownload%2FBrowser%2Flibusb-1.0.24.7z"

System environment:
android 10(realme V15)

Ionic info:
Ionic:

Ionic CLI : 6.13.1 (C:\Users\User\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 5.5.2
@angular-devkit/build-angular : 0.1000.8
@angular-devkit/schematics : 10.0.8
@angular/cli : 10.0.8
@ionic/angular-toolkit : 2.3.3

Capacitor:

Capacitor CLI : 2.4.6
@capacitor/core : 2.4.6

Utility:

cordova-res : not installed
native-run : not installed

System:

NodeJS : v14.16.0 (C:\Program Files\nodejs\node.exe)
npm : 6.14.11
OS : Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions