You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "GusLAN (via GitHub)" <gi...@apache.org> on 2024/01/19 10:41:58 UTC

[I] Error occurs with WRITE_EXTERNAL_STORAGE permission when installing alongside other plugins that utilize this permission. [cordova-plugin-camera]

GusLAN opened a new issue, #879:
URL: https://github.com/apache/cordova-plugin-camera/issues/879

   # Bug Report
   
   ## Problem
   
   ### What is expected to happen?
   
   Compile on Android without issues when other plugins use the WRITE_EXTERNAL_STORAGE permission, for example cordova-plugin-camera-preview.
   
   
   ### What does actually happen?
   
   In version 7.0.0 of cordova-plugin-camera, this permission is included as follows:
   
   `<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
   `
   This leads to duplication in the AndroidManifest.xml due to android:maxSdkVersion="32".
   
   
   ## Information
   
   ![Captura de pantalla 2024-01-19 a las 11 35 56](https://github.com/apache/cordova-plugin-camera/assets/890703/4e106622-1b02-4810-a992-c774c6392c65)
   
   
   ### Environment, Platform, Device
   Android
   
   
   
   ### Version information
   Cordova CLI       : 12.0.0 (cordova-lib@12.0.1)
   Cordova Platforms : android 12.0.1
   
    Ionic CLI: 7.2.0 
    Ionic Framework: @ionic/angular 7.6.5
    @angular-devkit/build-angular: 16.2.2
    @angular-devkit/schematics: 16.2.2
    @angular/cli: 16.2.2
   
   cordova-plugin-camera-preview: 0.12.3
   cordova-plugin-camera: 7.0.0
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [X] I searched for existing GitHub issues
   - [X] I updated all Cordova tooling to most recent version
   - [X] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] Error occurs with WRITE_EXTERNAL_STORAGE permission when installing alongside other plugins that utilize this permission. [cordova-plugin-camera]

Posted by "wifisher (via GitHub)" <gi...@apache.org>.
wifisher commented on issue #879:
URL: https://github.com/apache/cordova-plugin-camera/issues/879#issuecomment-1900354678

   Please see: https://github.com/apache/cordova-plugin-camera/issues/854
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] Error occurs with WRITE_EXTERNAL_STORAGE permission when installing alongside other plugins that utilize this permission. [cordova-plugin-camera]

Posted by "JacoboSegovia (via GitHub)" <gi...@apache.org>.
JacoboSegovia commented on issue #879:
URL: https://github.com/apache/cordova-plugin-camera/issues/879#issuecomment-1900176534

   Same issue in my project, following this thread


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] Error occurs with WRITE_EXTERNAL_STORAGE permission when installing alongside other plugins that utilize this permission. [cordova-plugin-camera]

Posted by "jomarti (via GitHub)" <gi...@apache.org>.
jomarti commented on issue #879:
URL: https://github.com/apache/cordova-plugin-camera/issues/879#issuecomment-1900331648

   Same problem in one of my projects.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] Error occurs with WRITE_EXTERNAL_STORAGE permission when installing alongside other plugins that utilize this permission. [cordova-plugin-camera]

Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek closed issue #879: Error occurs with WRITE_EXTERNAL_STORAGE permission when installing alongside other plugins that utilize this permission.
URL: https://github.com/apache/cordova-plugin-camera/issues/879


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] Error occurs with WRITE_EXTERNAL_STORAGE permission when installing alongside other plugins that utilize this permission. [cordova-plugin-camera]

Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek commented on issue #879:
URL: https://github.com/apache/cordova-plugin-camera/issues/879#issuecomment-1900407733

   Conflicts will inevitably occur if you have 2 plugins defining the same position with different settings.
   
   You can use https://gist.github.com/breautek/bd157b8598f9a816f2ec0d45e3d932c8 as a `after_prepare` hook which  will correct the manifest by stripping out the duplicates. It looks for specific pattern so if you have multiples you may need to add to it or modify it.
   
   The rationale of this plugin including `maxSdkVersion=32` is because the permission is completely obsolete in API 33<sup>1</sup>, so this omits the permission from the final manifest that is built in the APKs distributed to API 33+ devices.
   
   <sup>1</sup>The permission was actually obsolete in API 29 with scoped storage, providing no extra behaviour. However, requesting that permission still implicitly granted the `READ_EXTERNAL_STORAGE` which until API 33 where both read and write permissions are now obsolete. Cordova relied on this behaviour up to API 32 devices.
   
   Closing this issue because it's not a bug with the camera plugin, it's more of a problem with the `edit-config`/`config-file` system which is already known that it needs some work. The gist above should be sufficient as a workaround.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org