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

App crashed after download #137

Open
dzero1 opened this issue Aug 26, 2019 · 4 comments
Open

App crashed after download #137

dzero1 opened this issue Aug 26, 2019 · 4 comments

Comments

@dzero1
Copy link

dzero1 commented Aug 26, 2019

Got a exception like this,

08-26 17:24:31.757 26250 26308 E AndroidRuntime: FATAL EXCEPTION: JavaBridge
08-26 17:24:31.757 26250 26308 E AndroidRuntime: Process: com.headstartcloud.singer, PID: 26250
08-26 17:24:31.757 26250 26308 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.PackageItemInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference
08-26 17:24:31.757 26250 26308 E AndroidRuntime: 	at android.support.v4.content.FileProvider.parsePathStrategy(FileProvider.java:584)
08-26 17:24:31.757 26250 26308 E AndroidRuntime: 	at android.support.v4.content.FileProvider.getPathStrategy(FileProvider.java:558)
08-26 17:24:31.757 26250 26308 E AndroidRuntime: 	at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:400)
08-26 17:24:31.757 26250 26308 E AndroidRuntime: 	at com.vaenow.appupdate.android.DownloadHandler.installApk(DownloadHandler.java:107)
08-26 17:24:31.757 26250 26308 E AndroidRuntime: 	at com.vaenow.appupdate.android.DownloadHandler.handleMessage(DownloadHandler.java:60)
08-26 17:24:31.757 26250 26308 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:105)
08-26 17:24:31.757 26250 26308 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:156)
08-26 17:24:31.757 26250 26308 E AndroidRuntime: 	at android.os.HandlerThread.run(HandlerThread.java:61)

Device : Huawei MediaPad T3 10
Model number : AGS-l09
EMUI - 5.1
Android version 7.0

Now I'm using ionic-angular 3.9.2, app-update "^4.20.0" and cordova-android "8.0.0". But I guess this happen on some older plugin version.

This is the only device I have the issue with. My clients says some other mobile devices have same issue. But in some devices working perfectly.

@Willovent
Copy link

I have the same issue . Here is my stacktrace

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:605)
    at android.support.v4.content.FileProvider.getPathStrategy(FileProvider.java:579)
    at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:417)
    at com.vaenow.appupdate.android.DownloadHandler.installApk(DownloadHandler.java:107)
    at com.vaenow.appupdate.android.DownloadHandler.handleMessage(DownloadHandler.java:60)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:201)
    at android.os.HandlerThread.run(HandlerThread.java:65)

@Willovent
Copy link

On my side, it was because I was changing the packageId on the build.gradle file but not on the main activity (In a multi-tenant & environment application). I don't have this problem anymore.

@abangrephol
Copy link

Somehow the config-file that should be added to AndroidManifest.xml from the plugin.xml gone missing after build,
it happen to me too past few days
and i guess i found tricky solution for it

add below xml tags to config.xml
<config-file parent="/manifest/application" target="AndroidManifest.xml"> <provider android:authorities="${applicationId}.appupdate.provider" android:exported="false" android:grantUriPermissions="true" android:name="com.vaenow.appupdate.android.GenericFileProvider"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/appupdate_paths" /> </provider> </config-file>

it from plugin.xml file inside plugins/cordova-plugin-app-update

you can reproduce the problem by removing platform then add platform again

Sorry for bad english, i hope it helps

@NareshKukreti12
Copy link

Did you find the solution? I facing the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants