igorsantos07 opened a new issue, #927:
URL: https://github.com/apache/cordova-lib/issues/927

   # Bug Report
   >Originally reported at apache/cordova-plugin-device#125 
   
   ## 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:
   
![image](https://github.com/apache/cordova-plugin-device/assets/532299/128cd879-91d8-436d-ba5f-ef0b62f8e967)
   
   
   Logcat displays the following (easier to find if you filter logcat by the 
package name):
   
   ```
   2023-10-14 22:59:13.783 29167-29267 PluginManager           
io.cordova.hellocordova              D  exec() call to unknown plugin: Device
   2023-10-14 22:59:13.834 29167-29167 chromium                
io.cordova.hellocordova              I  [INFO:CONSOLE(80)] "[ERROR] Error 
initializing cordova-plugin-device: Class not found", source: 
https://localhost/plugins/cordova-plugin-device/www/device.js (80)
   2023-10-14 22:59:18.645 29167-29167 chromium                
io.cordova.hellocordova              I  [INFO:CONSOLE(1237)] "deviceready has 
not fired after 5 seconds.", source: https://localhost/cordova.js (1237)
   2023-10-14 22:59:18.645 29167-29167 chromium                
io.cordova.hellocordova              I  [INFO:CONSOLE(1230)] "Channel not 
fired: onCordovaInfoReady", source: https://localhost/cordova.js (1230)
   ```
   
   
   ### Command or Code
   ```cli
   $ cordova create sample-reproduction
   $ cd sample-reproduction
   $ cordova platform add android
   $ cordova plugin add cordova-plugin-device
   $ cordova plugin rm cordova-plugin-device
   $ cordova run android
   ```
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you 
experiencing the issue? -->
   - cordova-android: 12.0.0 and 12.0.1
   - plugin: 2.1.0 (as in clean install below), and also our actual project had 
it installed on 1.1.4, upgraded to 2.1.0, then realized it's not used and thus, 
got removed. We also removed other plugins and didn't had this kind of trouble.
   - device: Android emulator, API 30
   
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   Nothing besides what was described above seems relevant.
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to