capacitor: bug: Camera freeze in iOS safari browser (PWA)
Bug Report
Capacitor Version
π Capacitor Doctor π
Latest Dependencies:
@capacitor/cli: 2.4.2
@capacitor/core: 2.4.2
@capacitor/android: 2.4.2
@capacitor/electron: 2.4.2
@capacitor/ios: 2.4.2
Installed Dependencies:
@capacitor/ios 2.4.2
@capacitor/core 2.4.2
@capacitor/android 2.4.2
@capacitor/cli 2.4.2
@capacitor/electron not installed
[success] Android looking great! π
Found 11 Capacitor plugins for ios:
@capacitor-community/apple-sign-in (0.0.12)
@capacitor-community/facebook-login (1.0.2)
@capacitor-community/firebase-crashlytics (0.3.0)
@capacitor-community/firebase-remote-config (0.1.3)
@capacitor-community/http (0.2.1)
@capacitor-community/twitter (1.0.1)
@codetrix-studio/capacitor-google-auth (2.1.1)
capacitor-apple-login (0.0.7)
capacitor-firebase-auth (2.3.2)
cordova-plugin-compat (1.2.0)
cordova-plugin-qrscanner (3.0.1)
[success] iOS looking great! π
Platform(s)
iOS Safari (PWA)
Current Behavior
Camera freeze after camera launch for 1-2 seconds. Need press on the safari video recording button twice (disable and enable back the video recording) to make it working properly.
Expected Behavior
It should be work as normal.
Code Reproduction
Other Technical Details
npm --version
output:
6.14.8
node --version
output:
v12.16.1
pod --version
output (iOS issues only):
Additional Context
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 9
- Comments: 15 (3 by maintainers)
Nope, it still not working.
@dodomui have you made any progress on this issue? I am having the same problem
Yes, no longer an issue with 14.3. On 13 Jan 2021 15:54 -0600, Dan Imhoff notifications@github.com, wrote:
Note that this is likely an issue with PWA Elements, which Capacitor Camera plugin uses when running on the web. Please donβt open other issues, thereβs already several.
Can confirm running Ionifits app in Safari browser or as installed PWA.
Specs:
To repro, open https://ionifits.ionicframework.com on an iOS device. On login screen, take SKIP button, tap Expenses tab, tap FAB button at bottom to open modal, then tap the Camera FAB to open the device camera. The front facing camera loads and the image freezes right away. after about 2 seconds, the camera window turns to black.
Running on the web (desktop), get this error in console: Uncaught (in promise) TypeError: Cannot read property βlengthβ of undefined at o.initPhotoCapabilities
separate note @cyril-petit - we highly recommend using
CameraResultType.Uri
(File URI) instead of base64 to capture images for the best performance. iOS devices these days take incredibly high quality photos, so loading that much base64 data into memory can be too much, even causing the app to crash. See Ionifits or the official First App tutorial for ways to use File URI.@jcesarmobile have you had a moment to look at this issue? Thank you for any guidance you can provide!!