microsoft / cordova-plugin-code-push

Cordova plugin for CodePush
http://appcenter.ms
Other
644 stars 334 forks source link

net::ERR_ACCESS_DENIED on codepush install after changing Android API target to 30 #685

Closed rex-iotum closed 3 years ago

rex-iotum commented 3 years ago

Description

With an Android app that was working with codepush, changing the API target from 29 to conform with Google's new target API level of 30 now gives "Application Error net::ERR_ACCESS_DENIED" to file:///data/user/0/com.app.company/files/codepush/deploy/versions/guid?/www/index.html.

The issue still happens after requesting for WRITE_EXTERNAL_STORAGE permissions and accepting it before codepush update happens.

Reproduction

Add <preference name="android-targetSdkVersion" value="30" /> to an existing Cordova app with codepush, and try to get it to install a codepush update.

Additional Information

rex-iotum commented 3 years ago

The issue was caused by Android 11's setAllowFileAccess being defaulted to be false, and not using the latest cordova-android@^10.0.0 which sets that config to be true.

Closing the issue, not directly related to cordova-plugin-code-push and is user error.