Error 908 – READ_EXTERNAL_STORAGE permission denied while selecting image

Hi Kodular Community,

I am facing a storage permission issue in my app while trying to select and process an image.

Problem:
When I pick an image and press Scan and Convert, the app shows:

Error 908: The permission READ_EXTERNAL_STORAGE has been denied

Because of this, the image path loads but the app cannot read the file.

Image path shown in app:

file:/storage/emulated/0/Android/data/io.kodular.anubhav_lucky2000.ImaEx_copy/files/Pictures/

What my app does:

  • User selects an image
  • App scans the image and converts text to table
  • But it fails at file reading stage

What I already tried:

  • Tested on different devices
  • Tried in Chrome & Firefox (builder side)
  • Used Image Picker component
  • Path is correctly returned but read operation fails

My doubt:
Is this happening due to Android 11+ Scoped Storage restrictions?
Do I need to use a permission extension or change the file path method?

Need help with:

  1. Correct way to access selected image file in latest Android versions
  2. Whether I must use SAF (Storage Access Framework) or File component differently
  3. If any specific Kodular setting or extension is required

I have attached the error screenshot for reference.

Thanks in advance :folded_hands:

Hi dear,

Welcome to the Kodular community!

The error most likely comes from a component that requires READ_EXTERNAL_STORAGE on Android 11+ (the new permission is READ_MEDIA_IMAGES).
It would be useful to show us the relevant blocks related to picking and scanning.
The ImagePicker should have been fixed, in fact, it now only requires android.permission.INTERNET.

I have some doubts about the scan you’re performing, but I’d need to see which blocks you’re using.


Usefull Links

Hello,

Thankyou so much for your feedback.

Well, I am getting Error 908 right after ImagePicker.AfterPicking.

Flow:
ImagePicker.Selection → stored in Selected_Image_Path → sent to OCR extension and File.SaveFile.

I am NOT manually requesting READ_MEDIA_IMAGES permission.
Target SDK: (write your value)
Tested on Android version: (write version)

Is ImagePicker.Selection returning a path that cannot be accessed directly in Android 11+?
Do I need a FileProvider or different method to read the image instead of direct path?

Sir, just to add:

Device: Android 14 (OxygenOS 14)

I cannot find Target SDK option in Kodular properties.

Error 908 happens right after ImagePicker.AfterPicking.
I store ImagePicker.Selection in a variable and pass it to OCR UploadImage and File.SaveFile.

Is ImagePicker returning a content URI instead of real file path on Android 14?
How should I handle this — permission extension, FileUtil, or another method?

If you’re using the native OCR component, the problem could be exactly that.
From the component permissions, I see it still has READ_EXTERNAL_STORAGE (deprecated)

So I’d suggest using an external extension outside of Kodular as a temporary solution.


The problem doesn’t seem to be ImagePicker.


Added to the BugsTracker

This is currently 35

It would really help if you provided a screenshot your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select “Download Blocks as Image”. You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun

Hi,

Device: Android 14 (OxygenOS 14)

I am using ImagePicker and passing ImagePicker.Selection directly to:
OCR1.UploadImage path
and also using it for file operations.

Error 908 occurs right after ImagePicker.AfterPicking.

Is ImagePicker.Selection returning a content URI instead of a real file path on Android 13/14?

If yes, what is the correct way in Kodular to handle this URI?
Should I use SAF extension or ActivityStarter instead of ImagePicker to access images?

My blocks for ImagePicker and OCR upload are attached.

Use Do it to find it out yourself

use the companion app together with Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps

see also Live Development, Testing and Debugging

You might want to ask for permission as shoen here

Taifun

Hello @RaYzZz and @Taifun ,

Hi, thanks for the guidance.

I understand that on Android 13/14 the ImagePicker is returning a restricted path (often inside /Android/data/...), and that this may cause Error 908 when the OCR extension tries to read the file.

Based on suggestions, I am trying to do this:

Goal flow:

  1. User picks image with ImagePicker.
  2. Immediately copy that image to a public folder like /storage/emulated/0/Pictures/temp.jpg.
  3. Then use this new path for OCR upload instead of the original ImagePicker.Selection path.

So I am trying to add something like:

  • call File1.CopyFile
    • from Scope: Shared
    • from File Name: ImagePicker1.Selection
    • to Scope: Shared
    • to File Name: “Pictures/temp.jpg”

Then:

  • set global Selected_Image_Path to "/storage/emulated/0/Pictures/temp.jpg"

And later:

  • OCR1.UploadImage path = global Selected_Image_Path

Problem:
I cannot correctly place the call File1.CopyFile block inside when ImagePicker1.AfterPicking. It seems to be a different type of block and does not snap properly into the event body like other call blocks (e.g., Notifier or OCR).

Could someone please show (screenshot or description) the exact block structure of:

ImagePicker.AfterPicking → CopyFile → set new path → rest of logic

So I can place it correctly?

Thank you.

Hi dear,

When selecting an image from ImagePicker, the image is already copied to

/storage/emulated/0/Android/data/your.package.name/files/Pictures/imageName.jpg

and it is not necessary to copy the file.
However, since it is a directory freely accessible by the app, it seems very strange that it gives a permission error.

Useful guide

I’ll try to study it a bit and see if I can find a solution.

1 Like

This should be now fixed in 2025.10.5: