Closed Josje92 closed 1 year ago
Little extra info:
If I simply wipe the contents of the public void share(final PluginCall call) { ... }
method, it still won't work with a large base64 string. Same error pops up. It seems that the capacitor-PluginCall
class somehow has trouble reading a large base64 string.
I've also tried not encoding the contents, in order to get a smaller string down the line, but it still has the same issue.
Made a PR to be able to send a local filepath instead of base64. It seems a large base64 string simply breaks as a capacitor plugin argument. This way, you pass a _capacitor_file_/directory/file
-string and have this plugin fetch the contents into the base64 string.
If possible, plz merge or review π
PR included in 4.0.0.
Capacitor version: 3.0.0
Run
npx cap doctor
:Affected Platform(s):
Current Behavior
App crashes with Java error while trying to open the FileShare popup on a native device or AVD. This is before being able to choose the app to share the file with, the dialog simply won't open. In Android Studio + the web console, the only error that's being shown is as follows:
E/Capacitor/Console: File: http://localhost/ - Line 316 - Msg: Error: Java exception was raised during method invocation
There doesn't seem to be more info than this, or it's just me not knowing how to get to that point.
Expected Behavior
The dialog to open.
Reproduction Steps
Try sharing this large PDF while on a device or AVD.