vue-qrcode-reader
vue-qrcode-reader copied to clipboard
[iOS / Cordova / VueJS] NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
Describe the bug Plugin is not working in iOS in Cordova / VueJS Project I have a prompt asking me the permission for the camera but when i accept it it shows me the NotAllowedError. Going to the params of the app in iOS shows me that camera permission is granted.
'NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.'
To Reproduce Clone this repository https://github.com/c4software/vuejs-cordova-sample Install vue-qrcode-reader Import QrcodeStream Run the app on an iPhone and see
Screenshots Error returned in the console : https://prnt.sc/1hith0r Permissions granted : https://prnt.sc/1hitum7
Desktop (please complete the following information):
- OS: [macOS Big Sur v11.4 (Apple M1)]
- Browser [Safari]
- Version [14.1.1]
Smartphone (please complete the following information):
- Device: [iPhone XR]
- OS: [iOS 14.3]
- Browser [Safari]
I'd add that the Demo Page works on the iPhone for "decode continuously" but not for the "upload" one, after uploading the picture it only shows me the picture i uploaded and nothing get pasted as a result.
I got this working using capacitorJS and decode continuously on iOS.
Maybe you need to add a hostname to your cordova config.xml.
Try to add this to your config.xml - Cordova iOS 6.0.0 Released! - WKURLSchemeHandler introduction fixes CORS issues
<preference name="scheme" value="app" />
<preference name="hostname" value="localhost" />
This issue has been marked as stale. If there is no further activity it will be closed.