Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<edit-config> tags does not get copied over to config.xml on plugin install. #246

Closed
Edmu opened this issue Jan 21, 2019 · 5 comments
Closed
Labels
bug help-needed need help developing, using, testing this plugin

Comments

@Edmu
Copy link

Edmu commented Jan 21, 2019

Expected Behaviour

Copy over plugin.xml tags to project config.xml file on (re)install.

Actual Behaviour

tags from plugin.xml does not gets copied over to project config.xml on plugin install.

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

Android 8.0.0

Cordova CLI info

cli packages: (...)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.1.2 ([email protected])
Gulp CLI              : CLI version 3.9.1 Local version 3.9.1

local packages:

@ionic/app-scripts : 3.1.6
Cordova Platforms  : android 6.4.0 browser 5.0.3 ios 4.5.5
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
ios-deploy        : 2.0.0
Node              : v9.11.1
npm               : 2.15.12

Plugin version

cordova-plugin-file-opener2 2.1.3 "File Opener2"

Logs taken while reproducing problem

ADB Logcat:

01-18 17:31:16.937 14504 14666 E PluginManager: Uncaught exception from plugin
01-18 17:31:16.937 14504 14666 E PluginManager: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.ProviderInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference
01-18 17:31:16.937 14504 14666 E PluginManager: at android.support.v4.content.FileProvider.parsePathStrategy(FileProvider.java:583)
01-18 17:31:16.937 14504 14666 E PluginManager: at android.support.v4.content.FileProvider.getPathStrategy(FileProvider.java:557)
01-18 17:31:16.937 14504 14666 E PluginManager: at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:399)
01-18 17:31:16.937 14504 14666 E PluginManager: at io.github.pwlin.cordova.plugins.fileopener2.FileOpener2._open(FileOpener2.java:122)
01-18 17:31:16.937 14504 14666 E PluginManager: at io.github.pwlin.cordova.plugins.fileopener2.FileOpener2.execute(FileOpener2.java:67)
01-18 17:31:16.937 14504 14666 E PluginManager: at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
01-18 17:31:16.937 14504 14666 E PluginManager: at org.apache.cordova.PluginManager.exec(PluginManager.java:132)
01-18 17:31:16.937 14504 14666 E PluginManager: at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:57)
01-18 17:31:16.937 14504 14666 E PluginManager: at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
01-18 17:31:16.937 14504 14666 E PluginManager: at android.os.MessageQueue.nativePollOnce(Native Method)
01-18 17:31:16.937 14504 14666 E PluginManager: at android.os.MessageQueue.next(MessageQueue.java:375)
01-18 17:31:16.937 14504 14666 E PluginManager: at android.os.Looper.loop(Looper.java:225)
01-18 17:31:16.937 14504 14666 E PluginManager: at android.os.HandlerThread.run(HandlerThread.java:65)

Other comments

Copying it manually from plugin.xml to config.xml helps but it's just workaround.

@shnist
Copy link
Collaborator

shnist commented Jan 21, 2019

hi @Edmu, thanks for raising this issue. As a first step, please try updating to version 2.1.4 of the plugin, as 2.1.3 is deprecated. In the mean time I will see if I can reproduce the issue with the config you have.

@Edmu
Copy link
Author

Edmu commented Jan 22, 2019

@shnist tried with v2.1.4 same issue. I suspect this may be due to low cordova-android version (v6.3.0) maybe this issue? https://issues.apache.org/jira/browse/CB-13514

Anyway it would be good to find out and maybe add some restriction via engine tag into plugin to prevent install on lower version if this is the cause of the issue?

@shnist
Copy link
Collaborator

shnist commented Feb 12, 2019

@Edmu thanks for doing the research and pointing to a probable cause. Are you able to update your cordova android to see if the issue disappears?

@agm
Copy link

agm commented Sep 26, 2019

Provider tag is back here (cordova-android 8.0.0). Fix.
No more 'Attempt to invoke virtual method...'

See cordova-plugin-camera provider.

@shnist
Copy link
Collaborator

shnist commented Oct 16, 2019

thanks for this @agm, I will apply the same patch to this plugin.

@shnist shnist closed this as completed Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help-needed need help developing, using, testing this plugin
Projects
None yet
Development

No branches or pull requests

4 participants