You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "alexp25 (via GitHub)" <gi...@apache.org> on 2024/05/03 21:13:46 UTC

[I] plugin_not_installed errors after upgrading from 6.3.0 [cordova-ios]

alexp25 opened a new issue, #1434:
URL: https://github.com/apache/cordova-ios/issues/1434

   # Bug Report
   
   ## Problem
   
   I have upgraded my project from cordova-ios@6.3.0 to @7.1.0, and apparently managed to build the project. However, when I run on my iOS device, it seems that none of the cordova plugins are recognized anymore. 
   
   ### What is expected to happen?
   
   The cordova plugins should work as they used to work with @6.3.0.
   
   ### What does actually happen?
   
   The cordova plugins are not being recognized: I get 'plugin_not_installed' errors in the console.
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   When running the commands `cordova platform add ios@7.1.0 && cordova build ios` everything seemed fine, no errors that would point to any issues with plugins.
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   `cordova platform add ios@7.1.0 && cordova build ios`
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   build on macOS
   run on iOS
   
   ### 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.
   -->
   
   Ionic:
   
      Ionic CLI                     : 5.4.15 (/usr/local/lib/node_modules/ionic)
      Ionic Framework               : @ionic/angular 5.8.5
      @angular-devkit/build-angular : 0.1102.15
      @angular-devkit/schematics    : 11.2.15
      @angular/cli                  : 11.2.15
      @ionic/angular-toolkit        : 3.1.1
   
   Cordova:
   
      Cordova CLI       : 12.0.0 (cordova-lib@12.0.1)
      Cordova Platforms : ios 7.1.0
      Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 44 other plugins)
   
   Utility:
   
      cordova-res                          : not installed
      native-run (update available: 2.0.1) : 0.2.8
   
   System:
   
      ios-deploy : 1.9.4
      ios-sim    : 8.0.2
      NodeJS     : v16.15.1 (/usr/local/bin/node)
      npm        : 8.11.0
      OS         : macOS
      Xcode      : Xcode 15.1 Build version 15C65
   ## 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-unsubscribe@cordova.apache.org.apache.org

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


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


Re: [I] plugin_not_installed errors after upgrading from 6.3.0 [cordova-ios]

Posted by "nqduy96 (via GitHub)" <gi...@apache.org>.
nqduy96 commented on issue #1434:
URL: https://github.com/apache/cordova-ios/issues/1434#issuecomment-2505222089

   I have the same problem when use `yarn` to install node-module, I solved it by use `npm`
   


-- 
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-unsubscribe@cordova.apache.org

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


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


Re: [I] plugin_not_installed errors after upgrading from 6.3.0 [cordova-ios]

Posted by "alexp25 (via GitHub)" <gi...@apache.org>.
alexp25 commented on issue #1434:
URL: https://github.com/apache/cordova-ios/issues/1434#issuecomment-2096228182

   Tried that but didn't work. And I even just installed a few basic plugins so I ruled out any rogue plugins but they were still not being recognized. My aging Mac is also too slow to go through the process again with my huge project. It means that finally, after 5 years of app development with Cordova and wrestling with many outdated plugins and breaking changes, I'll give Capacitor a try. I also hope that this will be solved at some point.


-- 
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-unsubscribe@cordova.apache.org

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


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


Re: [I] plugin_not_installed errors after upgrading from 6.3.0 [cordova-ios]

Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek commented on issue #1434:
URL: https://github.com/apache/cordova-ios/issues/1434#issuecomment-2093820395

   I've had this happen to my projects as well for years... I don't think it's exclusively a 7.x issue, i've encountered it on 5.x and 6.x over the years.
   
   I've never could reproduce it in a simple project and when it does occur the errors doesn't make any sense. e.g. all the files appear to be in place but the runtime seems to think it doesn't exists.
   
   I believe it has something to do with restoring plugins and a plugin install erroring during the restore (e.g. when installing plugins from a `cordova platform add` command).
   
   When this occurred for me, doing a `cordova plugin add ...` for each plugin that it's complaining about not being installed/found during runtime worked around the issue for me, so you could try that as a workaround.
   
   In efforts to avoid this issue, I try not to destroy/remove my platform, although obviously you need to when doing platform updates.


-- 
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-unsubscribe@cordova.apache.org

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


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


Re: [I] plugin_not_installed errors after upgrading from 6.3.0 [cordova-ios]

Posted by "alexp25 (via GitHub)" <gi...@apache.org>.
alexp25 commented on issue #1434:
URL: https://github.com/apache/cordova-ios/issues/1434#issuecomment-2094123455

   I did try to add each plugin one by one with `cordova plugin add` but nothing changed. Moreover, not even HTTP requests seem to work, and the splash screen is not showing. Could all of this have something to do with the splash screen, or am I missing something?


-- 
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-unsubscribe@cordova.apache.org

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


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


Re: [I] plugin_not_installed errors after upgrading from 6.3.0 [cordova-ios]

Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek commented on issue #1434:
URL: https://github.com/apache/cordova-ios/issues/1434#issuecomment-2094351942

   > It seems that it's not related to the cordova-ios version after all, as I tried to revert to 6.3.0 and the same thing happens (although the splash screen is working, so there might also be a red herring). Is there a way to check what is the root cause of this issue?
   
   Like I said in my previous comment, it's an issue that has stumped me. I don't know why it occurs. I just know it sometimes occurs when restoring a platform. It's an issue that has happened to me on my work projects periodically since 4.x, which is about when I started using Cordova myself.
   
   >  did try to add each plugin one by one with cordova plugin add but nothing changed. Moreover, not even HTTP requests seem to work, and the splash screen is not showing (the app loads without error though, and I can see the landing page, but then it doesn't work properly due to all these native calls not working). Could all of this have something to do with the splash screen, or am I missing something?
   
   When it gets into this kind of broken state, this is kind of what I do (and hope it works):
   
   Disclaimer: Unsaved to the native project modifications might be lost following these steps.
   
   1. Make note of `cordova plugin ls` -- we will be nuking all plugins and if you happen to have a plugin installed, but not pinned in your package.json or config.xml, those plugins won't be restored automatically.
   2. Delete `platforms/` directory
   3. Delete `plugins/` folder. Doing this will ensure that all plugins will be refetched from the network, at the pinned version. If you have an updated version pin, but already have a copy (even of a different version) stored here, it will use the stored copy.
   4. Delete `node_modules/` folder
   5. delete `package-lock.json` or `npm-shrinkwrap.json`
   6. Run `npm install` to reinstall your dev dependencies.
   7. Run `cordova platform add ios` - pay attention to the plugin restore log mesages, if anything fails, at this point it's a good opportunity to investigate.
   
   On cordova-ios@7 specifically, there will be warnings "apple-ios version check failed", these warnings can be safely ignored.
   
   8. Assuming there isn't anything bad printed out during the platform add command, try building and deploying the app. At this point sometimes the build works as expected, sometimes despite the plugins being added, the runtime still can't find the plugin. Running `cordova plugin add ...` will state that the plugin is already added, but it seems to correct the bad state after building and redeploying.
   
   I know how ridiculous this sounds, but it's a series of steps that usually works for me whenever I do encounter this, as a workaround obviously. Not a solution.
   
   I don't think I've ever encountered this issue on the android platform, only when removing and re-adding the ios platform, so I do believe it's ios specific. I have different bundle ids for different environments, e.g. a dev, staging and production environment. Changing bundle ids requires removing and re-adding the platform and that's generally when the issue reproduces for me.
   
   > Is there a way to check what is the root cause of this issue?
   
   I don't really work on the cordova projects as much as I used to (someone else in my company does), but I'll try to remember to zip up my project the next time it does occur. So that I can investigate further off company time.


-- 
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-unsubscribe@cordova.apache.org

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


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


Re: [I] plugin_not_installed errors after upgrading from 6.3.0 [cordova-ios]

Posted by "erisu (via GitHub)" <gi...@apache.org>.
erisu commented on issue #1434:
URL: https://github.com/apache/cordova-ios/issues/1434#issuecomment-2094189332

   > I also found out that the build is now in `platforms/ios/build/Debug-iphoneos` instead of `platforms/ios/build/device` so could this be a path issue?
   
   Regarding to the output path change, this should be correct and expected. This breaking behavior change was added in 7.0.0 release. Here is the PR that made this change: https://github.com/apache/cordova-ios/pull/1310


-- 
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-unsubscribe@cordova.apache.org

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


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


Re: [I] plugin_not_installed errors after upgrading from 6.3.0 [cordova-ios]

Posted by "alexp25 (via GitHub)" <gi...@apache.org>.
alexp25 commented on issue #1434:
URL: https://github.com/apache/cordova-ios/issues/1434#issuecomment-2094126908

   I also found out that the build is now in `platforms/ios/build/Debug-iphoneos` instead of `platforms/ios/build/device` so could this be a path issue?


-- 
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-unsubscribe@cordova.apache.org

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


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


Re: [I] plugin_not_installed errors after upgrading from 6.3.0 [cordova-ios]

Posted by "alexp25 (via GitHub)" <gi...@apache.org>.
alexp25 commented on issue #1434:
URL: https://github.com/apache/cordova-ios/issues/1434#issuecomment-2094267485

   It seems that it's not related to the cordova-ios version after all, as I tried to revert to 6.3.0 and the same thing happens. Is there a way to check what is the root cause of this issue?


-- 
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-unsubscribe@cordova.apache.org

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


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