-
-
Notifications
You must be signed in to change notification settings - Fork 927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Camera won't launch on iOS PWA #713
Comments
I am facing the same issue right now. My team and I are developing a React app that uses the barcode scanner, and it works fine when visiting our site through Safari. However, when adding the website to the homepage via the process you described above, the same issue occurs. A flash of the camera icon, it disappears, and then a blank scanner element. When we tap "Stop Scanning", an error pops up saying "TypeError: Argument 1 ('child') to Node.removeChild must be an instance of Node", so I believe that the issue has to do with mounting/rendering the Scanner to the DOM when in PWA mode. Edit: |
hi. i also have same issue the camera scanner is not showing when i have added to the home screen on iOS 16.4. |
it seems the issue has been resolved for me too… I have no idea what I did to fix it, perhaps iOS updated in the background. I’m running iOS 16.3 right now, and it works fine… this is weird |
nothing is weird, IOS constantly fixing their mistakes especially with their browser and javascript engine since years now. |
IOS 16.4.1 not working in PWA. May work for the first time after adding to home screen and then not work |
Has anyone managed to solve this problem yet? |
I have not been able to solve it permanently, it just sort of stopped happening. It takes a restart of my iPhone to get it to reset and work again. PWA on iOS is just bugged. For example, my React application had issues with the keyboard no longer showing up when I tapped into an input. I would have only the frame of the keyboard but none of the letters appearing. Took a restart to get it work again, whereas the browser version worked flawlessly. I doubt this is an issue with HTML5 Qr Code honestly |
I need to resolve this somehow, users are already complaining! |
There is a Webkit bug report for this, with similar reproducible examples. Show your support here https://bugs.webkit.org/show_bug.cgi?id=252465 |
Have any of you found a solution to this error? I keep on getting the sam problem when running it inside an ios webkitview. It is haunting me at this point. |
Same issue on iPhone 14 with Safari 😢 |
Same here |
if your app doesn't need to use service worker then remove it, and it will work perfectly. I checked and found that even if you register a service worker that does nothing, the same problem will occur. This error is caused by ios operating system. |
if you don't use service worker, it's a perfect choice |
Has anyone got any solution? |
@rajp-bacancy I had the exact same issue on my own PWA. I went on the aforementioned webkit forums to see that this exact issue has been reported as fixed on iOS I went ahead and upgraded my own devices to |
We're getting similar issues on ios 17.4 now, The camera launches then the page completely freezes and cannot do anything until i quit the app/webpage and try again (which it then freezes on) I can replicate on scanapp.org too |
Been searching for days now, my NextJS PWA freezes when loading the camera since ~04/17. Only on a specific model of iphone and only when installed to home.
Same, scanapp.org freezes when installed to home screen but not in the browser. This makes me think it's another webkit/ios issue |
you really should report all IOS possible issues to apple developers as html5-qrcode depends 100% of the JS engine sandbox and cannot be in any case responsible of a hardware bug on specific model and OS, unless if the javascript code fails at 100% so we can say it's certainly an html5-qrcode bug. |
Not that what your saying is wrong, BUT...
So yeah it's probably an Apple issue, but that doesn't help anybody, which is why they're looking for solutions here. |
"Let's face it, Apple won't do anything for people who have current projects, this isn't a solution." |
I don't think this is something html5-qrcode can fix, or even workaround. I've tried other react libraries like https://github.com/adamalfredsson/react-zxing and https://www.npmjs.com/package/@yudiel/react-qr-scanner and they exhibit the exact same issue. I only posted here because it seems to be the same bug from the same change Apple made last week. |
Guys I don't really like to repeat myself, but again this is a golden rule in web development:
|
I'm agreeing with you pal, no need to patronize. Webkit bug (for now): https://bugs.webkit.org/show_bug.cgi?id=273046 |
Describe the bug
Camera won't open on iOS in webApp.
When the scanner is launched, the camera won't open when the website is in 'PWA mode'.
This works fine when the scanner is launched on the actual page in Safari/other browsers, but breaks with a WebAppCapable-enabled site (Full-screen page accessible from home-screen).
To Reproduce
Steps to reproduce the behavior:
<meta name="apple-mobile-web-app-capable" content="yes">
Expected behavior
When camera permissions are accepted, the camera should open without a problem, as it does on a regular safari website.
Additional context
• I have tried doing the same with www.scanapp.org (which supports the web-app-capable tag) – same problem occurs.
• On iOS, there's a camera indicator icon that pops up in the top left when the camera is in use. When the scanner is enabled, it briefly pops up, but then disappears in less than a second.
The text was updated successfully, but these errors were encountered: