You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/07/05 17:47:17 UTC

[GitHub] [cordova-plugin-camera] fokunn edited a comment on issue #473: Crash after taking a picture from gallery

fokunn edited a comment on issue #473: Crash after taking a picture from gallery
URL: https://github.com/apache/cordova-plugin-camera/issues/473#issuecomment-508823194
 
 
   I confirm it crashes with with Camera.destinationType set  to FILE_URI, and with HUAWEI DUB-AL00, android version: 8.1.0, ENUI version 8.2.0  as well.
   
   logcat output: 
   ```
   --------- beginning of crash
   07-05 23:51:40.477 17852 17920 E AndroidRuntime: FATAL EXCEPTION: pool-1-thread-1
   07-05 23:51:40.477 17852 17920 E AndroidRuntime: Process: ccc.xxxxxx.xxxxxxxx, PID: 17852
   07-05 23:51:40.477 17852 17920 E AndroidRuntime: java.lang.NumberFormatException: For input string: "raw:/storage/emulated/0/Download/share_image_1562173902011.png"
   07-05 23:51:40.477 17852 17920 E AndroidRuntime: 	at java.lang.Long.parseLong(Long.java:590)
   07-05 23:51:40.477 17852 17920 E AndroidRuntime: 	at java.lang.Long.valueOf(Long.java:804)
   07-05 23:51:40.477 17852 17920 E AndroidRuntime: 	at org.apache.cordova.camera.FileHelper.getRealPathFromURI_API11_And_Above(FileHelper.java:101)
   07-05 23:51:40.477 17852 17920 E AndroidRuntime: 	at org.apache.cordova.camera.FileHelper.getRealPath(FileHelper.java:60)
   07-05 23:51:40.477 17852 17920 E AndroidRuntime: 	at org.apache.cordova.camera.CameraLauncher.processResultFromGallery(CameraLauncher.java:682)
   07-05 23:51:40.477 17852 17920 E AndroidRuntime: 	at org.apache.cordova.camera.CameraLauncher.access$000(CameraLauncher.java:74)
   07-05 23:51:40.477 17852 17920 E AndroidRuntime: 	at org.apache.cordova.camera.CameraLauncher$1.run(CameraLauncher.java:830)
   07-05 23:51:40.477 17852 17920 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
   07-05 23:51:40.477 17852 17920 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
   07-05 23:51:40.477 17852 17920 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:784)
   
   ```
   
   some extra output :
   
   ```
   07-06 01:41:52.005 29551 29702 D FileUtils: id: raw:/storage/emulated/0/Download/share_image_1562173902011.png
   07-06 01:41:52.005 29551 29702 D FileUtils: uri: content://com.android.providers.downloads.documents/document/raw%3A%2Fstorage%2Femulated%2F0%2FDownload%2Fshare_image_1562173902011.png
   07-06 01:41:52.005 29551 29702 D FileUtils: uri.getAuthority(): com.android.providers.downloads.documents
   -
   ```
   
   the crash code:
    ```
     final Uri contentUri = ContentUris.withAppendedId(
                           Uri.parse("content://downloads/public_downloads"), Long.valueOf(id));
   
                   return getDataColumn(context, contentUri, null, null);
   
   ```
   
   I am not familar with android file stuff,  dont know how to fix that .... sad... can some one please give a shotcut Which i can use before this get fixed?
   
   thanks..........

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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