katzer / cordova-plugin-email-composer

Edit and send email messages
Apache License 2.0
345 stars 336 forks source link

Runtime exception #381

Open jondspa opened 1 year ago

jondspa commented 1 year ago

Hi -

Longtime user of this great plugin! Thanks!

Trying to upgrade to API 31. App compiles but crashes immediately on a device. Getting this error in logcat:

java.lang.RuntimeException: Unable to get provider de.appplant.cordova.emailcomposer.Provider: java.lang.SecurityException: Provider must not be exported

I've gone into this plugin's plugin.xml and see exported is set to false. I've tried true, I've taken out android:exported="false", and I've taken out the whole provider section. Always same error. I've tried 0.9.2 and 0.10.1.

Any ideas?

jfoclpf commented 1 year ago

I am using the plugin in API 30 to 33 with no problems.

It crashes immediately right after opening the APP? I'm not versed in Java, but the cordova APP has the file plugins/cordova-plugin-email-composer/src/android/Provider.java. Here!

Have you tried commenting some of those lines?

This plugin has 343 forks, you may also check if one of those found any solution and be kind to share it with us :)

jfoclpf commented 1 year ago

maybe androidX issue? If that's the case you'll need the plugin cordova-plugin-androidx-adapter

Akash-Tapadia-DFT commented 9 months ago

Having the same issue, commenting the Provider.java helped me