Survey123 silent error on attaching PNG as a photo

628
5
Jump to solution
09-28-2021 07:12 PM
SkeenP_
New Contributor III

Found an odd bug today in a few Survey123 forms across multiple devices. When you have a image field, if you add a PNG as a photo the app silently fails to add the attachment. You can add the png as a file, but not as a photo. The debug log suggests the file cannot be found and that it is a part of the image resize process.

I suspect the libs used by Survey123 could be failing to resize a PNG?

In any case, it would be good to see a file type filter if PNGs are not supported, or to make the error more pronounced so that it doesn't happen silently.

Tags (4)
0 Kudos
1 Solution

Accepted Solutions
SkeenP_
New Contributor III

Worked it out, not a PNG issue... 

I'm finding most images in my gallery seem to be locked through IOS, looks like the default for my and my field staff's iPhones is 'Selected Photos' permissions on Survey123 where it should be All Photos. I'll get everyone to update permissions.

Its odd that iOS shows you all photos in the gallery regardless of if you can use them in the app or not. There is no indication in the gallery if an app can access a photo or not, so when you select a locked photo it fails silently.

View solution in original post

5 Replies
SkeenP_
New Contributor III

Forgot to add, am using 3.13.229

0 Kudos
Philip-Wilson
Esri Notable Contributor

Hi @SkeenP_,

Did you see the same issue with 3.12, or is it new with 3.13?

Can you share an example of the PNG files you are trying to attach?

Also does this occur on all OS (Windows, Android, iOS) or jsut some OS and devices?

Regards,

Phil.

0 Kudos
SkeenP_
New Contributor III

We have not noted this on previous versions but in most cases we attach JPGs.

In this case we have png screen shots from iOS that are causing the issue. So far have only tested on iOS and will attach a video showing the workflow and behaviour as well as a sample file.

In the video:
 - I add a photo normally
 - I add a file
 - I attempt to add a PNG, selecting 'Select image from? > Photos'

0 Kudos
Philip-Wilson
Esri Notable Contributor

Hi @SkeenP_,

I just tested with your PNG you provided and with version 3.13.229 on iPad Pro with iOS 14.7. However I am able to select the image and it gets successfully added to the survey as a PNG with the Photos option (it gets renamed to the question name which is expected). I am not seeing any issues with PNG files (see screenshot below). Also tested Windows and android version of the field app, and worked correctly to with PNG files.

The resizing appears to be working to, my survey is set to an image size of 1280, your original PNG is 2224x1688, after I attach it to the survey I can see the attached image is 1280x960, which is correct.

I noticed in your video you add a log file to an image question with the file option, and then try to add an image file, without deleting the log file attachment first. Can you try selecting the PNG as the first image?

And just to double check, what version of iOS are you using, and on what device model?

PhilipWilson_0-1632888006687.png

Regards,

Phil.

0 Kudos
SkeenP_
New Contributor III

Worked it out, not a PNG issue... 

I'm finding most images in my gallery seem to be locked through IOS, looks like the default for my and my field staff's iPhones is 'Selected Photos' permissions on Survey123 where it should be All Photos. I'll get everyone to update permissions.

Its odd that iOS shows you all photos in the gallery regardless of if you can use them in the app or not. There is no indication in the gallery if an app can access a photo or not, so when you select a locked photo it fails silently.