Cant build ios app after installing Firebase - xcode

I've followed all the proper steps to installing cocoapods and Firebase to my app, but for some reason, I keep getting the same Shell Script Invocation Error:
/Users/Guest/Library/Developer/Xcode/DerivedData/NewApp-eszjuaizunqxaofbuqgmicbnvqkh/Build/Products/Debug-iphonesimulator/NewApp.app/Frameworks/GoogleToolboxForMac.framework: No such file or directory
For this reason I cannot build and run my app. I've searched and followed all suggestions I could find, but nothing has worked. So far I have updated my pods, deleted Derived Data, and deleted everything from the pods to my project and restarted using my backup file.
Can someone pleeease help?

This is a pretty common that happens a lot when using Firebase with Xcode! I assume that you are using CocoaPods to download the correct frameworks. A could of things to try:
1. In Xcode go to the top bar and go to: Product -> Clean
2. Just restart Xcode! (Make sure that all Xcode related tasks aren't running) Command + Q then make sure that its no longer in your dock running
3. Go into terminal and run these commands to redownload your pod files
pod deintegrate
pod clean
pod install
If these don't work just continue trying these steps and it will probably hopefully work

Deleting the file and starting from scratch solved my issue

Related

Why "Watchman crawl failed" error in react-native immediately after updating to macOS catalina?

Trying to run react-native run-ios or build RN project from xcode, as soon as metro bundler starts, this error appears in the terminal:
Loading dependency graph...jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.
Error: Watchman error: resolve_projpath: path `/Users/vorousjames/Desktop/Development/TicTacWHOA/app/TicTacWHOA`: open: /Users/vorousjames/Desktop/Development/TicTacWHOA/app/TicTacWHOA: Operation not permitted. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.html.
events.js:183
throw er; // Unhandled 'error' event
^
Error: resolve_projpath: path `/Users/vorousjames/Desktop/Development/TicTacWHOA/app/TicTacWHOA`: open: /Users/vorousjames/Desktop/Development/TicTacWHOA/app/TicTacWHOA: Operation not permitted
at BunserBuf.<anonymous> (/Users/vorousjames/Desktop/Development/TicTacWHOA/app/TicTacWHOA/node_modules/fb-watchman/index.js:95:23)
at emitOne (events.js:116:13)
at BunserBuf.emit (events.js:211:7)
at BunserBuf.process (/Users/vorousjames/Desktop/Development/TicTacWHOA/app/TicTacWHOA/node_modules/bser/index.js:292:10)
at /Users/vorousjames/Desktop/Development/TicTacWHOA/app/TicTacWHOA/node_modules/bser/index.js:247:12
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
This never happened before the Catalina update. I've had an empty watchman config file in the root of my project since the beginning. On first boot post-update, there was a popup in terminal saying something about permissions but i dont remember exactly. there's also a notice in my terminal in visual studio code saying "the default shell changed to zsh" run chsh -s /bin/zsh to change, so i did.
I've tried:
watchman watch-del-all
watchman server-shutdown
adding full disk access to terminal from within system preferences->privacy tab
npm uninstall watchman & npm uninstall -g watchman
You need to grant disk access to watchman. To do this You need to:
Go to System preferences > Security & Privacy then scroll down
Select Full Disk Access
Unlock it and click + button to add new app/tool
Select Macintosh HD in the folders list
Press this combination shift Command . at the same time to see all the directories list
Click opt > brew > bin (watchman is installed in this folder for MacOS Catalina) || usr > local > Cellar > Watchman > 21***** > bin (watchman is installed in this folder MacOS Monterey)
Look for watchman in the list then select it
Here we go, this should fix the issue.
I had the same issue after updating to Catalina. Wez Furlong's answer worked for me, but I had to provide full disk access to watchman in order to run watchman watch-project command without getting "Operation not permitted" error. As part of prior troubleshooting, I also had provided full disk access to Xcode and Terminal (not sure if this also contributed to the fix).
First run watchman watch-del-all
then run watchman shutdown-server fixed my issue
To change the permissions for Watchman regarding the Documents folder, it's under Security & Privacy -> files & folders in the system preferences
My issue was resolved by checking Watchman in the list under Document folder
The error message indicates a permission problem on /Users/vorousjames/Desktop/Development/TicTacWHOA/app/TicTacWHOA.
However, it may be something funky with launchd, so I would suggest:
$ watchman shutdown-server
$ launchctl unload ~/Library/LaunchAgents/com.github.facebook.watchman.plist
$ rm ~/Library/LaunchAgents/com.github.facebook.watchman.plist
$ watchman watch-project /Users/vorousjames/Desktop/Development/TicTacWHOA/app/TicTacWHOA
and see if that works or shows more context.
Cross linking back to an issue in our GitHub tracker:
https://github.com/facebook/watchman/issues/751
You need to change something its works for me. follow only following steps:
1. Go to System preferences > Security & Privacy then scroll down.
2. Select Full Disk Access.
3. Look for all watchmen on the list.
4. check(Mark) all Folders in all watchman files.
5. then go to vs code.
6. rebuilt your code.
I hope it will work smoothly
Try to change the directory of your project. I had mine on desktop and was getting that error, moved to the home folder and the error is gone
Just uncheck the repeated boxes in Mac:
System Preferences -> Security and privacy -> Privacy
For me above scenario didn't work, so I tried with different solution which solved the problem for me. (I am using MacBook Pro, chip: Apple M1 pro)
At first you have to update the setting of your Mac OS
System Preference >> security & privacy >> privacy tab >> Full disk access >> click on the lock icon >> checkmark for terminal
Sometime using this steps you are able to resolve the issue, but after this, if you are still facing issue, please use this link: #1030 (comment)
on macos. brew uninstall watchman
it works for me
npx react-native start --port=8088 resolved mine
There is only one solution at the moment. Move your project from the "Desktop" or "Documents" folder to the main folder (~/). None of the other ways worked for me.
This is because MacOS now asks for permissions for these folders (example in the image below). I guess this hasn't been added to the watchman yet.
As a temporary workaround, you can move your project to your home folder and it should run successfully.
To open your home folder, press Command-Shift-H.
(As of June 2022, there seems to be an issue with the 2022.05.30.00 version of Watchman, and this temporary solution is the only way I have been able to get around the issue.)

Heroku CLI hangs on Windows 10

I use Heroku CLI on Windows 10. The first day after installing it works just fine, but on the next day (or so) it just hangs after launch:
C:\Users\{User}>heroku
and that's all. No output to console, no logs (no error.log). It lasts forever (not 120 sec like here: Heroku CLI Unresponsive)
I reinstalled CLI on 10.10.2017. Today is 14.10, my folder contains the following files:
folder view before cleaning
The autoupdate.log contains:
[2017-10-10T13:36:14+03:00] starting `C:\Program Files (x86)\Heroku\bin\\heroku.cmd update --autoupdate` from
heroku-cli: Updating CLI... already on latest version: 6.14.34-1fcf80e
heroku-cli: Updating plugins... done
[2017-10-11T22:36:40+03:00] starting `C:\Program Files (x86)\Heroku\bin\\heroku.cmd update --autoupdate` from logs
heroku-cli: Updating CLI... already on latest version: 6.14.34-1fcf80e
heroku-cli: Updating plugins... Waiting for all commands to finish
heroku-cli: Updating plugins... done
[2017-10-14T01:13:34+03:00] starting `C:\Program Files (x86)\Heroku\bin\\heroku.cmd update --autoupdate` from logs
heroku-cli: Updating CLI... already on latest version: 6.14.34-1fcf80e
heroku-cli: Updating plugins... Waiting for all commands to finish
What have I tried:
uninstall and install again - this one works, but I don`t want to do
this every day
running as administrator
waiting all night long
using different commands (heroku --version, heroku update etc)
delete folder ..\AppData\Local\heroku
After deleting the folder and running command 'heroku update' the following files & folders were created, but console still hangs:
folder view after cleaning
The autoupdate.log consists now of 1 line:
[2017-10-14T19:39:02+03:00] starting `C:\Program Files (x86)\Heroku\bin\\heroku.cmd update --autoupdate` from update
I waited for an hour since and now writing this question here. Has anyone faced such an issue? What can be done?
Update
Finally I made it work after a few days by reinstalling CLI several times and deleting the autoupdate files, but cannot say precisely which of my actions had true effect. If you face the same issue you can start with the Malik`s answer.
I encountered the same problem when I run $ heroku login on GitBash for Windows.
I tried the accepted answer above but to no avail. What solved it was just to use Windows Command Prompt instead of GitBash and all problems were solved.
I'm just adding this answer here in case someone has done the same thing like I did.
Using GitCMD instead of GitBash solved the problem for me.
I had the same issue and i followed these steps to fix it.
Go to heroku AppData directory. (windows run %LOCALAPPDATA%\heroku)
You should see 2 files named as autoupdate and a directory named as update.lock.
Delete these 2 files and the directory.
Open a new cmd window.
Try running the heroku cmd again. Now it should work for you.
I use following version
heroku-cli/6.14.36 , (windows-x64) , node-v8.9.0.
Relevant github issue thread
I got the same symptom because I was behind a proxy but did not set the proxy env vars.
export HTTP_PROXY=http://proxy.server.com:portnumber
export HTTPS_PROXY=https://proxy.server.com:portnumber
heroku login
Usin CMD git for heroku login. I had to do the other steps using the bash and all was perfect.

MODULE_NOT_FOUND in heroku pg:backups

I've got problem with heroku pg:backups capture --app myapp command.
Heroku CLI submits usage information back to Heroku. If you would like to disable this, set `skip_analytics: true` in /home/ubuntu/.heroku/config.json
heroku-cli: Updating to 4.99.0-e5f5ef4... done
heroku-cli: Updating CLI...heroku-cli: Updating to 5.11.8-f58f4fa... done
Starting backup of postgresql-spherical-5948... done
Use Ctrl-C at any time to stop monitoring progress; the backup will continue running.
Use heroku pg:backups:info to check progress.
Stop a running backup with heroku pg:backups:cancel.
Backing up DATABASE to b598... pending
Backing up DATABASE to b598... !
▸ MODULE_NOT_FOUND: Cannot find module 'bytes'
Does anybody have similar problem? This command is launched with deploy on CircleCI.
I started running into the same problem yesterday and was finally able to come up with a solution that is working for me.
For starters, it looks like bytes is a dependency of heroku-pg, which is the part of Heroku CLI that is being used for the backups command. It seems like the dependency is not being included or installed with the version of heroku-cli that is being used to run the backup command.
I tried CircleCI’s “Rebuild with SSH” to troubleshoot the issue, and encountered similar error messages when attempting the backup command there. While trying to reinstall heroku-cli using npm, I found that the npm and node versions were way behind what heroku-cli wanted, so maybe that is part of the problem? Anyway, reinstalling with npm only produced an even more broken Heroku CLI.
Finally I checked the build environment and it was set to Ubuntu 12.04 (Precise) which probably explains the way out of date npm/node packages. I changed it to Ubuntu 14.04 (Trusty) and pushed a new commit to CircleCI (A rebuild alone is not sufficient to change OS versions) and was able to successfully run the backup command that had been failing!
Solution: Set CircleCI build environment to Ubuntu 14.04

cocoapods installation stuck on "Updating local specs repositories"

Any help please I have been waiting so long for this and it didn't show me any improvement.Still stucking at Updating local specs repositories
Actually i was trying to update pod files of library that I use on my xcode.I close it yesterday because it takes too long.And today i run again,doing control + c and run pod install again.
It didn't work,stucking at Updating local specs repositories
When I open my Xcode,many errors occur because of pod issue..
Please I need help!
There's an known error with http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/
You can try to fix it by doing:
pod repo remove master
pod setup
pod install
For me it already happened a few times, always after cocoapods failing to contact github on a previous run if I'm not mistaken.
I solved by simply deleting the contents of ~/.cocoapods/repos. and running the pods again
It looks like specs repos will be updated by default when you run pod update. Including --no-repo-update in the pod update command solved the issue for me
pod update POD_NAME --no-repo-update
Reference:
https://github.com/CocoaPods/CocoaPods/issues/4218#issuecomment-141678644
Also on these days some users sugest update Ruby via homebrew
Check this issue:
https://github.com/CocoaPods/CocoaPods/issues/7447

"No such file or directory - getcwd" error on rubygems on Mac Os Lion

I'm trying to launch a heroku console that uses rubygems but I keep getting this error:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:471:in `expand_path': No such file or directory - getcwd (Errno::ENOENT)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:471:in `find_files'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:470:in `map'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:470:in `find_files'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1103
from /usr/bin/heroku:9:in `require'
from /usr/bin/heroku:9
I'm using Mac OS Lion 10.7.3. Any ideas on how to fix this? Thanks!
Maybe the current working directory of the shell that's used to start your heroku process doesn't exist (maybe removed by another process, as in my case), and therefore getcwd throws an error.
This happened to me. It turned out I had deleted the folder I was running the command in.
I had that same issue.... running sudo gem update --system fixed the problem... give it a try.
I had the same thing, just type cd in the terminal, then navigate back to where you were and it works.
Tried starting the rails server in another console tab.
cd . solved it for me
Faced a similar issue while setting up rails app locally.
The issue was that the server was running in a directory which i had removed from another terminal window to recreate the app.
Close terminal and do it again or go to some other directory and come back and do it...
Anything should work..It did for me.
I encounter a same one, it happened when the working directory has actually been removed.
This doesn't appear to be Heroku issue as something in your code is requiring this getcwd.
What happens if you run this application locally in production mode? Have you defined all of your dependencies for Heroku (either via a .gems file or Bundler)
In my case, I was in a directory that had "unusual" characters in its name: /Volumes/Members/Finance & Accounting/-MC 2008, 7848/2020.
And also, I was in a remote directory, as Mac users will recognize.
I simply did push ~ and ran the command again, then did popd to get back to my remote directory with odd characters in the name.
It could be that gem is ill-behaved in the face of directory names containing whitespace, or it could be that it doesn't work on networked directories.
The bash built-in pwd worked just fine in the remote directory with the funny name.
This whole thing makes me a bit nervous about gem.
solved for me
cd ..
cd -
you have to go back and return to current directory.
Ended up on this page from searching for the same error on AWS Elastic beanstalk.
The problem with getcwd is because EB is trying to repeat the deployment process endlessly. It changes the /var/app/staging directory before it is able to finish the current action. getcwd fails because the directory was already replaced. Try deploying a stable version or a sample app
This just happened to me while I was running a Sinatra app on my localhost and this is what I found.
Scenario:
I'm using Git as my version control and I switched branches from development to master to merge my branches. After the merge, with an active server running, I made a minor html change which shouldn't have blown up the app and when I went to check the change in my broswer my "request" came back with OP's error - just to note this app isn't deployed to heroku.
My guess:
I'm not familiar with the intricacies of Webbrick (or equivalent programs) but I'm guessing you had an active server running (like me) and it was was looking for specific file(s) in memory and when they were modified on a possible branch change or an important file was modified/deleted - Webbrick freaked out and didn't know where to find it/them and threw up this error.
I'm not sure what version control you're using but I know git is popular for heroku so I think this might have something to do with your issue.
Fixing the issue for myself was as simple as restarting the server, hope this helps future trouble shooters.
I solved this problem by closing and restarting my terminal, setting the correct Ruby version in the new Terminal to
$ rvm use 2.1.1
(or whatever Ruby version is relevant to your program)
as explained by gerardk
you could try this before launching back heroku console
$ pwd #ie: /mywork
$ cd ..
$ cd [pwd] #ie: cd mywork
now go launch back heroku console
Restart system fixed this problem in my case
I worked around this error by shutting down the server, restarting my terminal, then restarting the server.
sudo gem update --system (as Israfil Havilah mentioned) and rebooting the server (Ubuntu 16.04.6 LTS) helped me
Make sure, you are not switching git branches. To me, it happened due to switching between GIT branches deleted my folder.

Resources