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.

Android: TypeError: cordova.fireDocumentEvent is not a function

See original GitHub issue

Description of the problem:

Fresh project via npx @capacitor/cli create. After npx cap add android npx cap open android, app runs in emulator, displaying error.

    cordova.fireDocumentEvent is not a function
    TypeError: cordova.fireDocumentEvent is not a function
        at <anonymous>:1:9

Affected platform

  • Android
  • iOS
  • electron
  • web

OS of the development machine

  • Windows
  • macOS
  • linux

Other information:

Capacitor version:

  "dependencies": {
    "@capacitor/android": "^1.0.0-beta.22",
    "@capacitor/cli": "^1.0.0-beta.22",
    "@capacitor/core": "^1.0.0-beta.22"
  }

node version: v10.15.3

npm version: 6.4.1

CocoaPods version:

Steps to reproduce:

Link to sample project:

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jcesarmobilecommented, May 2, 2019

That’s not a cordova plugin, just the wrapper. You have to npm install cordova-plugin-file

0reactions
JacobSobolevcommented, May 3, 2019

That’s not a cordova plugin, just the wrapper. You have to npm install cordova-plugin-file

thanks, solved the issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use Capacitor for Camera Plugin but get error regarding ...
When I try the camera after running android on an emulator or a real device, ... fireDocumentEvent is not a function TypeError: cordova....
Read more >
Top 5 cordova Code Examples - Snyk
Learn more about how to use cordova, based on cordova code examples created from the most popular ways it is used in public...
Read more >
cordova Uncaught TypeError: Object(...) is not a function
I have Created my custom plugin. Created its Wrapper using following steps. Cloned the ionic native wrapper from
Read more >
Cordova GoogleMaps plugin for iOS and Android (version 2.3.8)
Fix: Uncaught TypeError: evt.target.hasAttribute is not a function when device is rotated. Fix: marker.setDisableAutoPan() does not work on ...
Read more >
Events - Apache Cordova
To run when locked on iOS 4, this setting does not matter. resume event. When called from a resume event handler, interactive functions...
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