Bower component download failures in CodeKit - bower

I downloaded the latest version of CodeKit (trial version 2.0 (16828)). It starts fine on my Mac Mini, but as soon as I try to download a component using Bower, it fails with the error: "Bower Error / Bower could not determine which components are installed in this project. Make sure you're connected to the Internet and try again." Repeated attempts (either clicking "Retry" or clicking "OK" and trying to download the component again) continue to fail.
The app completes the "Downloading Bower component list" without error. The error occurs when it is "Scanning For Installed Components..."
I'm connected to the Internet just fine.
When I try to install a Bower component, it fails with this message:
Why am I getting these errors and how can I fix CodeKit?
Thank you!

Turns out that Bower continued to fail, which prevented CodeKit from working.
Tolga Akyuz's answer to Siddharth's problem was the fix - I had a ~/.cache file which was preventing Bower from adding files to ~/.cache/
When I renamed the ~/.cache file (e.g. to ~/.cache-orig) and created a ~/.cache/ directory, Bower began working properly - and so did CodeKit.

It turns out that this behavior can be caused by several things. Another user fixed it and shared this with me:
I installed xcode and still had issues. After a bit of research, I found a post that said installing the command line tools in Xcode might solve the problem. I did that and the problem is now solved.
From what I can see, there is a appears to be an issue with the $PATH getting messed up with systems that have been upgraded from Lion (and Snow Leopard) that did not ship with git. In the questions and answers listed on the page linked below, there were several terminal command options given, but I was unsure of which to choose so I went with the Xcode route.
https://apple.stackexchange.com/questions/18470/why-is-git-not-found-after-installing-os-x-lion

I had the same issue.
Check console messages (mac)
Delete faulty library. I had one.
Should be all good now.
good luck

If it's still relevant. In my case it was Google Maps AMD Loader Plugin. All fixed after removing it.

In my case the problem was with path to the project folder – it contains "!" symbol that makes bower crazy. To check is it Bower or CodeKit problem try to cd in terminal to your project folder and run "bower list".
zhaba$ bower list
bower EINVALID Name must be lowercase, can contain digits, dots, dashes, "#" or spaces
With corrected project folder path CodeKit works.

I had the same problem running CodeKit2 with El Capitan, and an old version of Xcode. Updating Xcode fixed the problem.

Related

Xcode suddenly can not get Swift package revision: "Couldn't get revision"

I opened a project in Xcode that relies on RxSwift which is included as a Swift package through the builtin Swift package manager.
It worked fine a couple of week ago when I created the project.
Now all of a sudden, when trying to build and run my project, I get an error message about that Swift package:
Couldn’t get revision ‘6.5.0^{commit}’
I tried a clean of the build folder, but would still get the same error.
My internet connection is working fine, so it's not a network issue.
I am also surprised that Xcode would try to get the revision again since no update of the package in question, RxSwift was released between the time building last worked fine and today. So I would assume that whatever is cached locally should still be there and functional.
So far I could not find any other reports about this error message.
Apparently, something was wrong with the package cache.
An update of Xcode or a cleaning tool I run on my Mac which deletes some caches might have confused Xcode's package cache.
In Xcode, click File > Packages -> Reset Package Caches from the menu and then build again.
If that does not do it, first try to restart Xcode and then also try cleaning the build folder as well and try again.
For me deleting the .build directory in the project directory worked but that's more likely what Xcode actually does anyway with Reset Package Caches.

Xcode 11.4 compile error 'Missing package product <package name>'

When I integrate a local package in my Xcode project everything is fine initially but when i switch branches and want to run the app Xcode gives me the compile error Missing package product <package name>. When I quit Xcode and re-open it everything is fine again. Any idea what this can be? An Xcode bug?
We also integrate external packages via Swift Package Manager which works perfectly fine. No issues there.
The issue is also well described in a post by Jesse Squires.
Solution 1: File > Swift Packages > Reset Package Caches
Solution 2: File > Swift Packages > Update to Latest Package Versions
For me, I needed File > Swift Packages > Reset Package Caches
In Xcode go to File > Swift Packages > Update to Latest Package Versions
Worked for me
In Xcode go to Product > Clean Build Folder
This worked for me. The problem originally started when I was trying to solve another issue that came up after I deleted my Derived Data folder.
Restarting Xcode didn't work, but cleaning the build folder did. I don't know if the other answers here would work for me because I didn't try them seeing as cleaning the build folder worked.
I bumped into this issue today on Xcode 13.0 when working on the WooCommerce iOS app after manually deleting the DerivedData folder.
The build was failing like in the questions description: Missing package product '<package name>'
I tried both resetting the packages cache and updating to the latest versions, but neither work. Thinking about it, that's not surprising since the packages Xcode couldn't find were local packages.
What did the trick for me was following this suggestion from an Apple forums thread and remove the local packages references, then adding them back again.
In WooCommerce's case, the local packages are part of a workspace file. Removing then adding them back again in the same order didn't result in a diff in the file. That is, nothing really changed in the workspace setup, but that was apparently the kind of kick Xcode needed to get over that error. 🤷‍♂️
I'm not sure of the root cause, but I get this quite regularly. Not the most elegant solution, but neither Reset Package Caches nor Update to Latest Package Versions worked for me. For me, I had to quit Xcode, and delete DerivedData.
rm -rf ~/Library/Developer/Xcode/DerivedData/*
Then rebuild.
None of the answers worked for me on Xcode 12.5 beta. I had to manually remove all spm packages and re add them.
SPM - Reset Package Caches vs Update to Latest Package Versions
File -> Swift Packages -> Reset Package Caches
File -> Swift Packages -> Update to Latest Package Versions
Update to Latest Package Versions
fetch the latest possible version(based on restrictions)
Reset Package Caches
reset cache(derived folder) -> Update to Latest Package Versions
folder
<path_to_derived_data>/<randomizer>/SourcePackages/checkouts/<project_name>
//e.g
/Users/alex/Library/Developer/Xcode/DerivedData/SPM-dpsmlyjrashqjefkfheppizcrgic/SourcePackages/checkouts/SPMExperiments
[Local SPM]
I tried:
Clean project
Clean derived data
Resolve Package Versions (File > Package)
Update to Latest Package Versions (File > Package)
Restart Xcode
Restart Mac
And restarting the Mac is what worked 🥲
Others say doing "Resolve Package Versions" multiple times also work.
I got this error when having the same local Swift package open in two different instances of Xcode in two different projects. Got it working again by quitting Xcode and only having one project open at a time.
A workaround for me at the moment has been both running Product > Clean Build Folder (cmd-k) and then restarting Xcode. This is an issue in both Xcode 12.4 and 12.5, and 12.5's per user package caching did not resolve the issue.
File > Swift Packages > Reset Package Caches also appears to work but it is slower for me.
Context:
One of my vendors distributes their pre-compiled binary library via SPM. Whenever I switch between git development branches, I get:
"artifact of binary target 'xyz' failed extraction: The operation couldn’t be completed. (TSCBasic.StringError error 1.)"
It also causes these "missing package product" errors for totally unrelated packages presumably because if one package fails the whole SPM process fails ("resolving package graph failed") even if these package are entirely independent.
Edit: With Xcode 12.5 simply quitting Xcode and re-opening seems to be enough.
Start with the other answers like
Reset Package Caches
Product > Clean Build Folder
If this doesn't help...
In my messages I found a hint that I had a dependency to two different version of the same package.
After fixing this, Reset Package Caches suddenly worked for most of my packages.
I could fix the remaining problems by adding
platforms: [
.iOS(.v13),
],
to the corresponding package. Before that, I had no platforms statement.
Xcode Source Control should be enabled to run this.
Preference -> Source Control and enable the source control.
If none of the above answers work, Please refer the solution shared by GravityBytes in this link on Apple Forums.
Eventually he happened to share the below resolution
I eventually got this resolved. What seemed to get it working was re-adding my local packages using the "Add Packages…" menu option on the project that has the framework targets using the local package. This created a new "Packages" group in the project, and eventually started compiling correctly.
Please remove the existing references and try adding them using the above approach.
Just a silly question: did you set up your git account on Xcode preferences?
For Moya I had to edit project file to Xcode heart's content
/* XCRemoteSwiftPackageReference "Moya" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/Moya/Moya";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 13.0.2;
};
anything other than 13.0.2 results in unresolutio for the numerous semicircular dependencies that Moya package brings to the table.
This breathes a new life into https://foldoc.org/field+circus
I had this issue after the current branch rename in the project and resolve it by clearing xcuserdata in workspace.
Nothing worked for me except Product -> Clean Build Folder and Restart
For me, Xcode was opened using Rosetta which wans't enabled before. Disabling Rosetta helped me 💪🏼
In Xcode 12.0.1 (12A7300) this bug has been fixed. It was auto-resolved by the Xcode update for me.
EDIT Xcode 12.5 [beta]
Apple added a SPM cache. See my question here. If you run into this problem with this Xcode version it might help to delete this cache.

ios Could not get BatchedBridge, make sure your bundle is packaged properly

I am getting this while running app on simulator using xCode, version 9.2
I've tried other solution mentioned on Stack overflow & Github S1S2 S3 S4 but most of the solution are mentioned for android.
P.S. This project also includes purescript code explained here Integrate Pure Script in your React Native project
That's how I resolved it.
Terminate your metro bundler > react-native link > react-native run-ios
It was not bundling because of some errors which was not showing in the simulator but just this error was thrown.
create index.js, index.android.js and index.ios.js whith the same content. I do have all of them and it solved my issue
I have also faced the same issue when I changed the name of images saved in my local directory. In my case, I have just restarted metro bundler, deleted the app, and restarted the app. Issue was fixed for me.
Try this:
npx react-native-asset
then:
react-native run-ios
This issue is caused basically when some packages or images are not bundled properly, it might be caused because of improper assets path or internet issue when installing packages or reload issue. The expo bundles into a standalone library so it can be available immediately.
This error does not provide any stack to debug since it does not properly have the bundled data even for error stack.
I have just face few bundled scenarios
Scenario 1 => While the expo is running and we install a new library on fly, few times during this importing the library might not get bundled properly, so it's better to stop the expo and re-run, or try reloading the error in app. This will some time resolve the issue, or if there is some error it will show up the error stack
Scenario 2 => You have a customised asset director or have changed the asset path in app.json file improperly.
Please let me know in comments if there are any other scenarios
I had a metro bundler terminal window opened and whenever I was running npm run ios , it wasn't starting a new metro server, the problem was that. I closed the metro bundler terminal window and ran npm run ios and it opened a started a new metro server and the error was gone
I had a same issue, then I did:
rm -rf node_modules,
npm install
and restarted the metro (npm start). It worked.
In Settings, go to Privacy > Local Network to see a list of every app that requested access. I solved by allowing my app to access to the local network. (Trying to run on physical iPhone device from my mac m1 on the same wifi).
Source
Make sure that when you restart the expo project you do so with expo start -c
-c throws out the cache, otherwise the problem persisted for me.

Flutter run command error : FlutterView.send called on a detached view

Can anyone tell me why my app is not installing at all and ending with the error message
Observatory connection never became ready.
the app was working perfectly fine until yesterday .
I have changed the channel to master yesterday in the command prompt and from then on the app never runs.
I even switched back to channel alpha but still no use.
I have attached a screenshot of the command prompt where the installation was stuck forever.
I am not so sure if I need to reinstall the flutter. I am worried if I uninstall the flutter now it may not configure properly and I might break it forever.
Please can someone tell me what exactly might have gone wrong.
Many Thanks,
Mahi
Instead of reinstall try with following: (Mac)
Set Path Variable: via following terminal command
export PATH=~/flutter/bin:$PATH;
that is bin folder path of flutter.
export PATH=[PATH_TO_FLUTTER_GIT_FOLDER]/bin:$PATH
https://flutter.io/setup-macos/#update-your-path
If above not worked. Check with the Dart version
dart --version
Install the latest dart version:
brew install dart --devel
Hope this helps others.
For Mac
open terminal
$ echo $PATH
it will show like this
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:
it means you need to add flutter in to path
Open Finder presss command + shift + G
Put /etc/paths in dialog and press GO
Copy the file "paths" and paste it on desktop
Then open the pasted "paths" file from desktop
and add following line into end of the file "/flutter/bin"
Then copy that file and again paste it on /etc/paths
same like step no 2
it will ask you to replace or not
press replace
Now if you hit $ echo $PATH on terminal it will show
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/swagat/development/flutter/bin
Now your $flutter doctor will work perfectly
The solution is from Google Groups #Flutter-Dev
Thank you very much for your reply #Michael Thomsen.
I've tried what you have suggested and the details are as follows:
When I used flutter run -v command the command prompt output is as follows:
It was stuck for a while at waiting for port connection if I am not wrong.
So I've used AndroidStudio, File>Open and selected android/ folder to run the app then the gradle was showing an error:
Error:Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (25.2.0) and test app (25.4.0) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
I modified the build.gradle(Module:app) to show the correct version of 25.2.0 which was previously showing 25.4.0.
dependencies {
androidTestCompile 'com.android.support:support-annotations:25.2.0'
}
I just saved the changes inside android studio and the gradle sync completed without any errors.
Now I can run the app from inside Android Studio and also from IntelliJ IDE.
Thanks very much Michael this solved my problem.
Reinstalling flutter would be my starting point. If this problem persists, please post the output of $>flutter doctor and a description of what exactly leads to this error.

when building an ionic app files and folders starting with "._" are created until error

I have a strange problem. I develop an app using Ionic on a samba network drive.
I develop on a windows machine and run all the command lines regarding Android development. I switch to a Mac to be able to build for iOS.
All went fine and as expected the last couple of days. Today I edited some HTML, JS and CSS files - just some minor improvements. I built the app for android on the windows machine (plus using jarsigner and zipalign - only if that should matter).
On the Mac I had troubles. Suddenly I get errors when trying to run ionic build --release ios (as I already did successfully the last couple days).
The executed script creates files and folders starting with "._" which were never created before and are already existing without it. This results at some point in an ENOENT (no such file or directory) aborting everything.
I don't get it. I already de-/re-installed node, npm, cordova and ionic. But nothing helped.
I would love to support you guys with additional error messages or logs, but due to I'm fairly new to mobile development (and using a Mac), I don't know what information would be helpful and what not.
Sp please tell me any information you need and I'll be happy to supply them.
I accidentally solved my own problem. I just "removed" the platforms directory (by renaming it) and re-added the platform using the command cordova platform add ios.
After that I could build my app as it did before. Don't know why or what actually triggered this behavior, but at least I'm able to proceed.
If somebody knows how to prevent that from happening again (so that I don't loose all the project settings I configured in Xcode), I would appreciate it.
This happened to me, too - I found this bug in the Cordova issues:
https://issues.apache.org/jira/browse/CB-5644
I found out that Xcode created the file PROJECT_PATH/platforms/ios/._APPNAME.xcodeproject. I deleted this file and "cordova prepared ios" was working again.
...
It should ignore files starting with ._ as they are hidden system
files used by osx to store infos about a file

Resources