Comments (7)
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.
from cordova-ios.
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 (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?
from cordova-ios.
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?
from cordova-ios.
I also found out that the build is now in
platforms/ios/build/Debug-iphoneos
instead ofplatforms/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: #1310
from cordova-ios.
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?
from cordova-ios.
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. I've never reproduced the issue in a simple project either. Only in my work projects. That leads me to think it's some kind of nuance interaction when a project has several plugins, perhaps conflicting somehow in an obscure way. But it's strange that isn't consistently reproducible.
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.
- 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. - Delete
platforms/
directory - 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. - Delete
node_modules/
folder - delete
package-lock.json
ornpm-shrinkwrap.json
- Run
npm install
to reinstall your dev dependencies. - 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.
- 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.
from cordova-ios.
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.
from cordova-ios.
Related Issues (20)
- Please remove org_apache_cordova_UIView_Extension because it isn't necessary since iOS 8.
- SplashScreen not loading on [email protected] HOT 8
- Cannot run new iOS app since latest upgrade HOT 18
- Trouble to open Instagram App HOT 2
- Any alternative to CDVCommandDelegateImpl which is removed from public classes? HOT 6
- [Next Major] Delete bin/cordova_plist_to_config_xml script
- Several template project bin scripts are broken
- Add preferences to config.xml to control which are the "Supported Destinations"
- Issue with `<privacy-manifest>` and `cordora prepare ios` HOT 3
- The CDVURLProtocol no longer exists, so how should we modify the interception? HOT 3
- The startURLSchemeTask method in CDVURLSchemeHandler was not executed HOT 2
- Copy deployment-target from root config.xml to platform-specific config.xml before usage in Podfile HOT 5
- WKWebViewConfiguration is always ignored
- Missing API declaration on iOS app submission to App Store HOT 5
- CDVPlugin's viewController should just be a CDVViewController
- CDVWebViewUIDelegate should take a CDVViewController
- Cordova ios 7.1.0 - Build failed with "Command failed with exit code 65" HOT 4
- Several version checks fail after cordova-ios platform add [email protected] HOT 2
- Target Identity info missing Display Name, Version, Build HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-ios.