Getting androidx.camera.core.ImageCaptureException: Failed to write temp file

86 views
Skip to first unread message

Shivani Patel

unread,
Jan 17, 2024, 1:14:13 AMJan 17
to Android CameraX Discussion Group
Getting below exception in Samsung A24 

androidx.camera.core.ImageCaptureException: Failed to write temp file at androidx.camera.core.ImageCapture$4.onError(ImageCapture.java:1062) at androidx.camera.core.ImageSaver.lambda$postError$2$ImageSaver(ImageSaver.java:342) at androidx.camera.core.-$$Lambda$ImageSaver$q5J8WAquxyekKA6et-sNzW3OiJM.run(Unknown Source:8) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at java.lang.Thread.run(Thread.java:1012) Caused by: java.io.IOException: Failed to save new file at androidx.exifinterface.media.ExifInterface.saveAttributes(ExifInterface.java:4778) at androidx.camera.core.impl.utils.Exif.save(Exif.java:174) at androidx.camera.core.ImageSaver.saveImageToTempFile(ImageSaver.java:153) at androidx.camera.core.ImageSaver.run(ImageSaver.java:95) ... 3 more Caused by: java.io.IOException: Invalid marker at androidx.exifinterface.media.ExifInterface.saveJpegAttributes(ExifInterface.java:6320) at androidx.exifinterface.media.ExifInterface.saveAttributes(ExifInterface.java:4745) ... 6 more

Android CameraX Discussion Group

unread,
Jan 17, 2024, 1:18:22 AMJan 17
to Android CameraX Discussion Group, shivanip...@gmail.com
Thanks for the bug. I've filed a tracker for the issue. Could you please provide more info (repro steps, CameraX versions, code fragments) in the tracker to investigate the issue?

https://issuetracker.google.com/320598150 Getting androidx.camera.core.ImageCaptureException: Failed to write temp file

Shivani Patel

unread,
Jan 17, 2024, 1:30:27 AMJan 17
to Android CameraX Discussion Group, Android CameraX Discussion Group, Shivani Patel
implementation "androidx.camera:camera-camera2:1.2.0-alpha03"
implementation "androidx.camera:camera-lifecycle:1.2.0-alpha03"
implementation "androidx.camera:camera-view:1.2.0-alpha03"

Currently, we are using the above library but now we have integrated stable one but still we are getting exception 

implementation "androidx.camera:camera-camera2:1.3.1"
implementation "androidx.camera:camera-lifecycle:1.3.1"
implementation "androidx.camera:camera-view:1.3.1"

In 1.3.1 version of camerax I am getting androidx.camera.core.ImageCaptureException: Failed to update Exif data this exception

Android CameraX Discussion Group

unread,
Jan 17, 2024, 1:33:57 AMJan 17
to Android CameraX Discussion Group, shivanip...@gmail.com, Android CameraX Discussion Group
Thanks for the info. We will follow up in the https://issuetracker.google.com/320598150. Thanks!
Reply all
Reply to author
Forward
0 new messages