Pick image from library function problems

We might have to look to the wisdom of @Mevi (or other AppGyver members) to help us see what we are missing.

I have the feeling that I am missing an obvious minor point and without access to your project I can’t easily work through it. I am hoping that the AppGyver team with the use of your project id can see what I am missing.

Okay. I really do appreciate your effort and help in this matter. So thank you for that.

1 Like

I am happy to keep working on a few more obscure options, but I don’t want to make you be my fingers on the keyboard via continued replies :slight_smile:

1 Like

If you are interested, you could use the default AppGyver image path (pasted below) as the static value to set to your app variable (instead of using the Pick Library - Output 1 - Imagefile.path). This would confirm that the app variable can be set with a valid, known image path.

It would also allow you to confirm that the rest of the flow functions work in this setup.
https://s3.amazonaws.com/appgyver.assets/composer3/images/image_placeholder.png

I am able to set the app variable with that static path, and other similar static paths, but unable to get the path from output 1. ID 176050 if anyone wants to take a look.

Since it is a new morning, I am going to offer up another item to check.

In the screenshot below, you can see that the “Assigned value” field that was set in the Forumula has a unique id for the “Pick image from library” component (outputs[“19f07237.d2c2ae”].imageFi…). If that id doesn’t match the id of the “Pick image from library” component you will have “weird” issues.

The easiest way to see if this might be the underlying issue is to delete the “Pick image from library” component, then add it back to the canvas and then go into the “Set app variable” component and redo the “Assigned value” Formula by reselecting the “Output of another node” value in the Formula editor and the imageFile.path value.

I’ve tried that as well. Have you tried acquiring the path from pick images from library flow function and setting the app variable on Android devices? If you try the same process on android, I’m almost certain that you will have the same error. I’ve tried a number of different variable types and formula’s, but it doesn’t want to take the path.

I will need to hunt down an android device. I’ll give it a try as soon as I have have found one. It will be a good thing for me to have for my testing anyway :slight_smile:

1 Like

Okay, I found an Android device. I was able to get it to work (one broken, unrelated to your issue). When I go into the profile screen and pick an image from the Photo library or the Gallery, it allows me to assign it to the app variable, base64 encode it and send it to xano and then show the new image URL (from Xano API call) in the image component.

The flow function that would not work for me on Android is the Resize/compress image flow function. Once I removed that from the flow logic everything worked great.
[found this forum entry: Compress/Resize Image flow function error] – It looks like the error I ran into is already being addressed. :+1: I also confirmed that using the Camera to take and use a picture worked with compression and everything else (that is supported by the forum entry I have linked to as well)

Have you made any additional progress with it?

screen2 screen5

Thank you for checking. I did delete the Resize/compress, but as you say that is not resolving the issue with receiving path from output 1. I believe our layout is identical, yet for some reason we are getting different results. I’m using a Galaxy A11

Raw error message, and regular error message from output 3.

I changed the pick image flow function to take photo flow function, and was able to set the app variable. I noticed the last update to pick image flow function was Oct. 2019, and my device launched in March 2020, so perhaps there is a compatibility issue here with newer android devices, or certain models like the Galaxy A11.

Is there a way to work around this bug by getting the path from Pick Files instead of Pick Images? I tried to force outputs[“Pick files”].files.path through via formula but no luck there.

Can you compare the directory/filename structure between the pick image and take photo approaches?

It would be helpful to know if the structure of the directory for each of those is similar or if that might give us a clue.

The other option at this point is to rebuild the flow from scratch to see if AppGyver got messed up in some way we can’t see.

I’ve rebuilt it several times. I was able to get my hands on an older Samsung device today, and it does work on that device. I presume there is a conflict with the Samsung A11 and the AppGyver application. At some point they will need to address this issue especially as more people move to newer devices.

In the meantime, I’m going to try and find a work around.

open failed: EACCES (permission denied) error. That’s from output1.

Great find! Thanks for letting me join you in that effort! It got me using an Android device for some of my testing, which will be good :slight_smile:

I upvoted the ticket you opened and added the link back to this thread.

1 Like

I just tested on a Samsung S20 Ultra and getting the same exact error: open failed: EACCES (permission denied) error

Works fine on my older phone though.

This definitely needs to be bug-listed

1 Like

Interesting.

I distributed a beta in early Sept, and received complaints from some users about the Image Upload. Now I know why.

This bug should be prioritized, since it affects most applications in production.

Thanks for the detailed discussion and debugging efforts everyone! We’re looking into this and prioritizing as possible (working of final touches for the 2.x runtime upgrade right now). Status can be followed at https://tracker.appgyver.com/bug-reports/p/eaccespermission-denied

Hi, just wanted to ask if this issue has been resolved? I seem to be having the same problem as @liam_rob - whereby the pick image flow function does not seem to work. It keeps giving me “unknown error occured while picking an image from the library”.

Im using a Google Pixel 3 running on android 11.