question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: cameraModal.componentOnReady is not a function (on Android emulator)

See original GitHub issue

Tried using the camera feature on an Android emulator:

const image = await Camera.getPhoto({ quality: 98, allowEditing: false, resultType: CameraResultType.Base64, source: CameraSource.Camera });

TypeError: cameraModal.componentOnReady is not a function at CameraPluginWeb.<anonymous> (https://localhost:6147/build/0.js:654:70) at step (https://localhost:6147/build/vendor.js:19296:23) at Object.next (https://localhost:6147/build/vendor.js:19277:53) at https://localhost:6147/build/vendor.js:19270:71 at new t (https://localhost:6147/build/polyfills.js:3:21506) at Object.__awaiter [as b] (https://localhost:6147/build/vendor.js:19266:12) at https://localhost:6147/build/0.js:646:143 at new t (https://localhost:6147/build/polyfills.js:3:21506) at CameraPluginWeb.<anonymous> (https://localhost:6147/build/0.js:646:39) at step (https://localhost:6147/build/vendor.js:19296:23)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

5reactions
obendesmondcommented, Dec 2, 2019

Add

<script type="module" src="https://unpkg.com/@ionic/pwa-elements@latest/dist/ionicpwaelements/ionicpwaelements.esm.js"></script> <script nomodule src="https://unpkg.com/@ionic/pwa-elements@latest/dist/ionicpwaelements/ionicpwaelements.js"></script>

in your index.html file

3reactions
obendesmondcommented, Dec 2, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot known issues with Android Emulator
This page lists known issues, workarounds, and troubleshooting tips for the Android Emulator. If you encounter an issue not listed here or ...
Read more >
Uncaught (in promise): TypeError: cameraModal ... - YouTube
componentOnReady is not a function TypeError : cameraModal. componentOnReady is not a function. useful link: My Laptop:- ...
Read more >
Capacitor Camera API throws error when running on web
The plugin works fine when running the application on an android device ... core.js:15724 ERROR Error: Uncaught (in promise): TypeError: ...
Read more >
Camera and Photo Gallery in Ionic React app using ...
TypeError : cameraModal.componentOnReady is not a function. Some Capacitor plugins, including the Camera, provide the web-based functionality ...
Read more >
Android Emulator Troubleshooting - Xamarin
Hyper-V issues. In some cases, enabling both Hyper-V and Windows Hypervisor Platform in the Turn Windows features on or off dialog may not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found