Skip to content

Unable to open files when targeting API 28 #268

Closed
@KleggerKoder

Description

@KleggerKoder

Expected Behaviour

Opens file

Actual Behaviour

java.lang.NullPointerException Error -- See log below

Reproduce Scenario (including but not limited to)

Build targeting Android SKD 28

Steps to Reproduce

Try to open files / nothing happens

Platform and Version (reproduced on Android 8 and 9)

Logs taken while reproducing problem From Android Studio

/PluginManager: Uncaught exception from plugin
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
at android.support.v4.content.FileProvider.parsePathStrategy(FileProvider.java:604)
at android.support.v4.content.FileProvider.getPathStrategy(FileProvider.java:578)
at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:416)
at io.github.pwlin.cordova.plugins.fileopener2.FileOpener2._open(FileOpener2.java:124)
at io.github.pwlin.cordova.plugins.fileopener2.FileOpener2.execute(FileOpener2.java:67)
at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
at org.apache.cordova.PluginManager.exec(PluginManager.java:132)
at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:57)
at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:325)
at android.os.Looper.loop(Looper.java:142)
at android.os.HandlerThread.run(HandlerThread.java:65)

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