Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13415

Importing corrupt images using the Camera plugin crashes the app

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • None
    • None
    • cordova-plugin-camera
    • Android: OS 7.0, Phone Model: Moto G5 Plus
      iOS: OS 10.1.1 (14B150)

    • Important

    Description

      ISSUE
      Importing corrupt images using the Camera plugin crashes the app

      Current Behavior

      1. Importing a corrupt image using the Cordova Camera plugin crashes the Cordova app which uses the plugin

      Expected Behavior

      1. Importing a corrupt image using the Cordova Camera plugin:
        • Throws an exception which can be caught by the Cordova app which uses the plugin
        • Does not crash the Cordova app which uses the plugin
        • Allows the Cordova app which uses the plugin to render a Toast error message relaying the error
      1. # Platforms affected
        • Android
        • iOS

      REFERENCES

      1. Sample corrupt image which crashes the app
      2. Technique used to wrap the call in a Try/Catch block in a callable inner class to prevent an app crash

      ADDITIONAL INFORMATION

      1. Importing corrupt images does not crash apps which do not use the Camera plugin, such as:
        • Yelp mobile app
        • Slack mobile app

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ShemrickFlannigan Shemrick Flannigan
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: