-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
plugin onload seems to start plugin before app ready #1715
Comments
I do not believe it's related to #1605 which simply makes CoreAndroid isn't responsible for managing plugins or "starting" any plugins. It's purpose is to provide some core JS apis to handle hardware back button presses, among couple of other niche things. In otherwords, #1605 wouldn't have changed plugin loading behaviour of other plugins which uses With that being said, I'm not so certain this is a bug with cordova-android either. The The init makes and configures the webview and initialises all plugins that has the So for about a decade, I acknowledge that the documentation does not detail any of this whatsoever. The android plugin docs has 2 sentences noting the existence of the |
"Attempting to call JS on plugin initialise while the plugin is initialised onload will likely result in a race condition, depending on how the plugin invokes a JS call." |
Bug Report
Problem
We use a firebasex plugin, which has been working fine but lately we have noticed an issue and believe it could be related to plugin initialization.
What does actually happen?
It appears that if
onload
is set to true, then the plugin instance is started too early before the javascript interface is available, and any callback to the JS interface will fail.See dpa99c/cordova-plugin-firebasex#888
Could be related to #1605
Environment, Platform, Device
cordova-android 12.0.1 and 13.0.0
cordova 12.0.0 ([email protected])
The text was updated successfully, but these errors were encountered: