Azure functions throwing error when trying to debug on MacOS - macos

Trying to debug an Azure functions project.
On the mac clicking F5 and starting the debug.
And the output is this :
[2021-07-25T08:47:57.429Z] Cannot create directory for shared memory usage: /dev/shm/AzureFunctions
[2021-07-25T08:47:57.434Z] System.IO.FileSystem: Access to the path '/dev/shm/AzureFunctions' is denied. Operation not permitted.
Value cannot be null. (Parameter 'provider')
Has anybody encountered this before and know how to fix this ?
I tried running visual studio code with administrator permissions like this :
sudo open ./Visual\ Studio\ Code.app
Also tried to mkdir the /dev/shm directory but it just keeps giving this error.
What should I do ?

Solution was adding --verbose mode and see the logs. The problem was that azure didn't support node version 15. Downgraded nodejs to version 13.12.0 and it worked.

Step 1: Downgrade nodejs to 14.x
https://nodejs.org/download/release/v14.19.0/
Step 2: run in verbose mode
Open terminal, change to api folder, and enter the below command
func start --verbose

Related

Why /user/local/go isn't recognized as a Go SDK in GoLand

I'm trying to setup GoLand to use WSL 2 as in this guide: https://www.jetbrains.com/help/go/how-to-use-wsl-development-environment-in-product.html
I've installed Go in the Ubuntu distro following the linux instructions on the GoLang website, and go version prints outs the version I downloaded, so it appears that Go is working inside WSL.
So now I tried to create a new project in GoLand, and I'm getting errors, which appear to come from the fact that the SDK isn't loaded in GoLand. The guide doesn't offer much guidance on this, so I just tried to add a local SDK.
When I select /usr/local/go I get an error that it's not a valid SDK.
So I created the ~/go directory, and then updated my .zshrc file to export the GOPATH and GOROOT environment variables, even though they already showed up when I ran go env, doing this got them to show up on a simple env call.
But I'm still getting the invalid SDK error like above.
Is there a configuration step I'm missing that isn't spelled out in the guide? I came across this old post about creating symlinks to fake the expected directory structure. I haven't done this because it's a really old post, has comments that say this has been fixed, and seems like a really odd solution.
Support for Go SDK in WSL2 will be available in the next 2021.3 release, please see GO-10618.
October 2021 update.
2021.3 reaches Early Access Program at the moment. GoLand suggests selecting Go SDK on WSL2 mount if the location of the project is on WSL2 as well.
I experienced this on my Debian machine and I wasn't using WSL2. I found that the actual cause of the issue is that Goland is unable to read the directory /usr/local/go/bin due to inadequate permission.
A possible solution is to run the goland.sh script as root. The script can be found in the bin/goland.sh directory of the Goland IDE folder. Here is a simple command to do run Goland as the root
export HISTIGNORE='*sudo -S*' && echo "sudo-password-here" | sudo -S /absolute-path-to-goland.sh
export HISTIGNORE='*sudo -S*' tells bash history to ignore caching any command matching sudo -S* to bash history. This way, your sudo-password isn't saved into the bash-history file.
echo "sudo-password-here" | pipes your sudo password as input to the next command.
sudo -S tells bash to read input for password prompt from stdin, which has been provided through the echo command.
Alternatively, you can just install the latest version of Goland. Hopefully, it doesn't come with this bug

nvm use giving Execution of the Windows Script Host Failed error

I have got two node version installed using nvm.
When I am trying to switch to other I am getting below error
Looking at some solution, I added "Enabled" to the registry location
HKEY_CURRENT_USER\Software\Microsoft\Windows Script Host\Settings\Enabled
but it did not fix it.
Also I tried running this in Administration access cmd window.

How can I resolve a package installation error in Julia on Windows?

I have just started using Julia on a Windows 10 machine, and I have been trying to install some very basic packages. When I use the Pkg.add() command, however, the command window returns the following error:
ERROR: SystemError: opening file C:\Users\username\.julia\environments\v1.0\Project.toml: Permission denied
The error message pops up even when using the Administrator mode. Any advice or tips would be appreciated! Thanks!
Delete .julia folder or set a new location for the JULIA_DEPOT_PATH.
Once done use a non-administrator account (the one you normally work with) to reinstall packages.

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.)

What is causing this project to fail on Macbook Pro when It runs just fine on windows 10

I have a nativescript application in windows that deploys to the emulator just fine, but when I git clone onto the MacBook Pro and run the same process, I get:
new-host:nativescript jbaird$ tns run android
Searching for devices...
Starting Android emulator with image Nexus_5X_API_26
Waiting for emulator device initialization...
Executing before-liveSync hook from /Users/jbaird/Documents/development/gr8dates/Nativescript/hooks/before-liveSync/nativescript-angular-sync.js
Executing before-prepare hook from /Users/jbaird/Documents/development/gr8dates/Nativescript/hooks/before-prepare/nativescript-dev-typescript.js
Found peer TypeScript 2.4.2
Preparing project...
Project successfully prepared (Android)
Building project...
Unable to apply changes on device: emulator-5554. Error is: spawn EACCES.
Executing after-watch hook from /Users/jbaird/Documents/development/gr8dates/Nativescript/hooks/after-watch/nativescript-dev-typescript.js
Any ideas? Thanks in advance.
The error is a permission error. Therefore, all you need to do is give access to the the folder you are running your apps from. The process involves you to copy and paste the command below into your terminal.
sudo chmod -R a+rwx /AppFolder
The command is an administrator command, therefore, you may have to insert your system password.
PS: Definitely, you hit enter and there will be a prompt for you to insert your password.
Let me know if you have any challenges with this solution!
emulator-5554. Error is: spawn EACCES.emulator-5554. Error is: spawn EACCES.
Seems a permission error. You could solve it by:
sudo,
Or, by giving +x permision to your hooks folder?

Resources