Hi all,
Since a few weeks we receive complaints some users cannot use the camera or cannot chose images from gallery in our mobile apps. The error messages in service center specifically points to a JS part of the code in the camera plugin:
So far we have only been able to reproduce this on Android (both on 12 and 14), when not giving permissions to the app to use the camera or gallery, or when removing the permissions. On iOS we have not been able to reproduce (yet), and also not all Android users are affected.
We are a bit behind on versions (7.2.0 while I see 7.5.1 is already available, last update on the camera plugin we did in July 2023). We did not upgrade any other plugins/UI/MABS versions in the last few weeks. We are working with OS11, MABS 9.0.
Did any of you experience similar issues? Or do you have ideas on what might be causing it?
Thanks in advance!
Mayke
Hi Mayke!First of all, thank you for your interest in our supported Camera Plugin.Just to clarify, when permissions are not given to the camera, for example, the taking a picture shouldn't work, that is, the plugin should return an error stating that the camera can't be accessed because the permission is denied. Is this what is happening? Or it is something else.Also, as you've mentioned that you tested this on Android 14, we recommend updating the plugin at least to version 7.4.0, as this is the version that fully supports Android 14.Best regards,Alexandre
Hi Alexandre,
Thanks for you message. When I reproduced the error myself, I actively took away the permissions (via app info on my phone). The first time I did get a popup asking for permissions, but later on this popup no longer appears.
The behaviour on my phone is that nothing seems to happen when I click the gallery or camera buttons on my screen. There is no error message shown, only in the Service Center logs. The buttons that do not seem to react, and the lack of error message is in line with complaints we received from our end users.
I'll try to speed up the process of updating the plugin (in a big organisation not everything can be done very fast, unfortunately) to see if that improves the experience for our Android 14 users, but we have also reproduced on Android 12.
Regards,
Hi Mayke,
Thanks for your quick answer. After calling the client action, are you checking the "Success" and "Error" output parameters to check if an error occurred? In that scenario, the "Success" parameter should return "False", whereas the "Error" parameter should contain the error I mentioned in my previous response, stating that the camera can't be accessed because the permission is denied.Best regards,
Alexandre
Thanks for your answer. Yes we do check the .Success from both ChooseGalleryPicture and TakePicture actions from the plugin and give feedback to the user, however I see in the code we filter out error messages -1 and 3. I don't know the decisions that were made when implementing the camera, perhaps it's something we should reconsider.
I'll continue to investigate the error messages (content and when exactly they are thrown) and will catch the error while debugging on mobile, thanks for the idea! To be continued...
After debugging I can confirm revoking permissions to use camera and/or gallery on an Android phone result in the following error messages. I am not sure if this is the expected behaviour, but we have added a message for our end-users to check the permissions on their phone if this error is thrown.
It would be nicer to force the popup asking for and enabling permissions again, but that will take a bit more time.
Interesting finding is that if I, in case of revoked permissions to gallery, just hit the gallery button several times in a row (like perhaps a slightly impatient user might do ;) ) the gallery DOES open in my app. However if I try to select an image, I am not allowed to and the same error message as above is thrown.
Also opening the gallery or camera with permissions enabled, but then changing my mind and using the CANCEL button, will throw the same error.