You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "pjdpaulsagnik (via GitHub)" <gi...@apache.org> on 2024/07/20 04:33:59 UTC

[I] App crashing when TargetSDK - 34 [cordova-plugin-camera]

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

   Bug Report
   Problem Description
   Expected Behavior
   To be able to take photos using the camera.
   
   Actual Behavior
   The app crashes.
   
   Related Information
   Reproduction Steps:
   Launch the app.
   Activate the camera function and tap the capture button.
   The app crashes.
   Additional Context or Information:
   Device: Samsung M15
   
   Operating System: Android 14
   cordova plugin list
   backgroundapprun 0.0.1 "backgroundAppRun"
   com-sarriaroman-photoviewer 1.2.4 "PhotoViewer"
   cordova-background-geolocation 4.15.0 "BackgroundGeolocation"
   cordova-plugin-android-permissions 1.1.5 "Permissions"
   cordova-plugin-app-version 0.1.9 "AppVersion"
   cordova-plugin-background-fetch 7.2.4 "CDVBackgroundFetch"
   cordova-plugin-background-mode 0.7.3 "BackgroundMode"
   cordova-plugin-camera 6.0.1-dev "Camera"
   cordova-plugin-console 1.1.0 "Console"
   cordova-plugin-device 2.0.2 "Device"
   cordova-plugin-dialogs 2.0.1 "Notification"
   cordova-plugin-file-opener2 3.0.5 "File Opener2"
   cordova-plugin-file-transfer 1.7.1 "File Transfer"
   cordova-plugin-file 6.0.2 "File"
   cordova-plugin-firebasex 14.0.0 "Google Firebase Plugin"
   cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
   cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
   cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview"
   cordova-plugin-network-information 3.0.0 "Network Information"
   cordova-plugin-splashscreen 5.0.2 "Splashscreen"
   cordova-plugin-statusbar 2.4.2 "StatusBar"
   cordova-plugin-streaming-media 2.3.0 "StreamingMedia"
   cordova-plugin-vibration 3.1.0 "Vibration"
   cordova-plugin-whitelist 1.3.5 "Whitelist"
   cordova-plugin-x-socialsharing 6.0.4 "SocialSharing"
   cordova-plugin-x-toast 2.7.3 "Toast"
   es6-promise-plugin 4.2.2 "Promise"
   
   Command or Code
           $scope.showActionSheet = function () {
               console.log("LOG Action Sheet !");
               $ionicPopup.show({
                   title: 'Upload Image',
                   subTitle: '',
                   scope: $scope,
                   buttons: [
                       { text: '<i class="icon ion-android-camera"><p>Camera</p>' ,
                           onTap: function(e) {
                               $scope.openCameraTEST();
                           }
                       },
                   ]
               });
           };
   
           $scope.openCameraTEST = function () {
   
               var options = {
                   quality: 75,
                   allowEdit: false,
                   sourceType: 1,
                   destinationType: 0
               };
               cordova.plugins.backgroundMode.enable();
               Camera.getPicture(options).then(function (imageData) {
                   console.log("imageData : ",imageData);
                   cordova.plugins.backgroundMode.disable();
                   $scope.data.doc_path = "data:image/jpeg;base64," + imageData;
                   console.log("$scope.data.doc_path : ",$scope.data.doc_path);
               }, function (err) {
                   console.log(err);
               });
           }
   
   
   Environment, Platform, Device
   Platform: Android
   Device: Samsung M15
   
   Version Information
   Cordova: Cordova Android 10.1.1
   Operating System: Android 14
   
   Checklist
    Searched for existing GitHub issues.
    Included all the necessary information above.
    
    Problem : 
   
   When TargetSDK set to - API - 34, App is crashing for most of the android versions.
   
   Please release an update for TargetSDK - 34
   


-- 
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] App crashing when TargetSDK - 34 [cordova-plugin-camera]

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

   You're using severely out-dated platform and plugins.
   
   API 34 support comes with cordova-android@13. Since version 10, there's been several breaking changes to keep up with upstream breaking changes in the Android SDK. See the following blog posts for breaking changes / migration notes.
   
   - [cordova-android@11](https://cordova.apache.org/announcements/2022/07/12/cordova-android-release-11.0.0.html)
   - cordova-android@12 has no significant breaking changes that won't be covered by cordova-android@13. Except for NodeJS 14 support is dropped, the new minimum NodeJS is 16.13. Recommended version is to use NodeJS LTS (Currently NodeJS 20)
   - [cordova-android@13](https://cordova.apache.org/announcements/2024/05/23/cordova-android-13.0.0.html) (cordova-android@13 targets SDK 34, which requires a lot of other environment updates, including JDK 17, Gradle 8, etc)
   
   These updates will break several of your plugins which will have updates for.
   
   > cordova-plugin-whitelist 1.3.5 
   
   This plugin is obsolete since cordova-anroid@11 and is effectively included under the core platform as `allow-list`. The access/allow directives in the config were not changed.
   
   > cordova-plugin-splashscreen 5.0.2
   
   This plugin is now also obsolete except for the browser platform since cordova-android@11. If you also maintain a browser platform, then upgrade this package to the latest version which only includes an implementation for the browser platform. Otherwise it can safely be removed.
   
   If you're also maintaining an old version of ios platform in your plugin, the splashscreen plugin may still be needed. I'm not sure if there is a version of this plugin that has an iOS implementation without the android implementation, therefore you may need to upgrade the iOS platform as well.
   
   > cordova-plugin-file 6.0.2 "File"
   
   There is a version 8 which includes API 34 support.
   
   > cordova-plugin-file-transfer 1.7.1 "File Transfer"
   
   This will break because it had dependencies on the whitelist plugin which is no longer supported. Upgrade to v2 of the plugin for cordova-android@13 / API 34 support. It will also depend on cordova-plugin-file@8
   
   > cordova-plugin-camera 6.0.1-dev "Camera"
   
   cordova-plugin-camera@7 will include API 34 support.
   
   #### Additional Notes
   
   - API 33 introduces several breaking changes on how the android's external filesystem is accessed (generally will user documents, images, and other media is stored). It also introduces a lot more restrictions on raw filesystem APIs. Some actions that was possible before is no longer possible using the file system plugin. Many of these restrictions started since scoped storage and is documented [here](https://github.com/apache/cordova-plugin-file?tab=readme-ov-file#androids-external-storage-quirks)
   
   - Above I've noted several plugins that requires updates either because I **know** they will break on the platform upgrade or that it requires updates for API 33/34 support. I cannot comment on third-party plugins because I do not know what they do or how they will behave. An omission of a plugin comment does not mean it won't have required or recommended updates. You will have to conduct you're research on the other plugins to see if they have updates available, especially any that are necessary.
   
   - Don't forget to `cordova plugin/platform remove` to remove the plugins/platforms, followed by `cordova plugin/platform add` to upgrade the package. In-place upgrades aren't supported so simply adding a new version will not actually upgrade the package to the newer version.
   
   I'm closing this issue because it doesn't describe a bug with the camera plugin.


-- 
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] App crashing when TargetSDK - 34 [cordova-plugin-camera]

Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek closed issue #892: App crashing when TargetSDK - 34
URL: https://github.com/apache/cordova-plugin-camera/issues/892


-- 
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