-
Notifications
You must be signed in to change notification settings - Fork 243
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
ondeviceready won't fire because plugin does not cleanup after itself properly when removed(?) #927
Comments
I just had this bug too. I updated the plugin using It worked again after I did |
I've confirmed that the repro steps reliably reproduces the issue. Seems weird it would only affect this plugin though. There are 3 main paths (relative to the root of the cordova project) that cordova tracks installed plugins:
The first 2 is cleaned up as expected. The native java code however is cleaned up as expected. |
Some additional information I've found when testing other plugins and will explain:
So first this bug does occur on all plugins it seems like. However only the last plugin removed is left in a "broken" state. So what I did was did the steps to reproduce the issue on the device plugin, and had my environment in a broken state with the device plugin. I repeated the steps for the file plugin. When I removed the file plugin, it ended up "correcting" the state with the device plugin, but the file plugin state was broken (all the file plugin JS modules and module entries were lingered). Repeating the steps for the device plugin again, fixed the broken state of the file plugin, but the broken state of the device plugin returned. This bug is probably more suitable for |
The bug is reproducible on the iOS platform as well, not just on Android. |
Bug Report
Problem
If an application has this plugin installed and, for some reason, it's not needed anymore and removed,
ondeviceready
won't fire anymore.This seems to be caused by some leftover code... That's probably why the previous reporter mentioned the usual shenanigans of add/remove platform/plugins solved it.
What is expected to happen?
The event should fire as usual, since it's seemingly unrelated to this plugin.
What does actually happen?
ondeviceready
never gets fired:Logcat displays the following (easier to find if you filter logcat by the package name):
Command or Code
Environment, Platform, Device
Version information
Nothing besides what was described above seems relevant.
Checklist
The text was updated successfully, but these errors were encountered: