Xamarin Pair to Mac - Couldn't connect - Access to path is Denied - visual-studio

I recently wiped my Macbook Pro and I am trying to setup the "Pair to Mac" functionality in Visual Studio 2019 on my Windows machine. I also just updated Visual Studio 2019 on my Windows machine to 16.3.0. The Mac is running Visual Studio 8.3 (build 1805).
I receive an error when I try to Pair to Mac:
Couldn't connect to [ip address]. Please try again. XMA-Failed-dd7e7bf-Access to path '/Users/[user]/.config/Xamarin/Xamarin Messaging/1.1.6.217-d16-3+64904be' is denied.
I have Remote Login enabled, Firewall is off, Xcode 11 installed, xamarin-ios sdk installed.
It looks like a permissions issue but I'm not sure what else to check.
Edit
I'm also able to ssh into the Mac and run a successful 'ls' command.

I ran the following command and it fixed my issue:
sudo chown -R [username] .config

Related

How can I launch Android Emulator without android studio on Mac M1

I'm trying to start the emulator with this command emulator -avd Pixel_4_API_30 but it gives me an error:
[8633370112]:ERROR:android/android-emu/android/qt/qt_setup.cpp:28:Qt library not found at ../emulator/lib64/qt/lib
Could not launch '/Users/primulax/../emulator/qemu/darwin-x86_64/qemu-system-aarch64': No such file or directory
Android Studio specs:
Build #AI-203.7717.56.2031.7935034, built on November 21, 2021
Runtime version: 11.0.10+0-b96-7249189 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.2
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: org.jetbrains.kotlin
✅ I was able to run with ~/Library/Android/sdk/emulator/emulator -avd Pixel_4_API_30 with this command
Use ~/Library/Android/sdk/emulator/emulator instead of ~/Library/Android/sdk/tools/emulator on MacOS, for Ubuntu use ~/Android/Sdk/emulator/emulator.
I just experienced the same issue on a freshly setup machine, emulator installed through SDK manager and all.
The error message says it all actually: If you go to /Users/primulax/../emulator/qemu/ on your machine, you'll notice that of course there is no darwin-x86_64 directory, but darwin_aarch64, since you are on an M1 machine. Whatever the reason is the emulator looks in the wrong directory, if you just duplicate the darwin_aarch64 folder and name your copy darwin-x86_64, it works as intended. Not ideal, but it's a workaround until this path-problem is fixed.
Edit: Please take a look at #Andrew Stromme's comment. Of course symlinking is a much more elegant solution to this problem!
If you have Android Studio installed, you can run the emulator from terminal without having started Android Studio first.
First of all, run
cd ~/Android/Sdk/tools && ./emulator -list-avds
to get a list of all the available Android virtual devices that you have installed.
Then, copy the name of the virtual device you want to use and run
cd ~/Android/Sdk/tools && ./emulator -avd YOUR_DEVICE_NAME
where you replace "YOUR_DEVICE_NAME" with the name of a virtual device that was listed in the installed virtual devices list.
This info and more that you may find useful can be found in the official documentation.
Now for the error you get it's most possibly due to a wrong file path. It seems that others have also faced this issue and a bug has been opened before here. The most common solution proposed is to launch emulator from the
/path/to/android-sdk/tools
directory in command line.
Also, before trying this or any other solution listed in this issue tracker, firstly make sure that you have installed from the SDK Manager the Android Emulator in SDK Tools.

Pairing Xamarin with Mac running on WSL2

I installed Mac with the docker-osx Big Sur image in docker inside WSL2 Ubuntu and now I'm trying to pair it with Mac from Visual Studio. I can connect to it with localhost:50922 but after providing the username and password I'm getting the following error.
An error occurred while trying to configure the SSH keys for authentication with '::1:50922'
The problem was the host name localhost:50922. I changed it to 127.0.0.1:50922 and it started working.

Why I might suddenly get persmission denied when I just open TortoiseHG?

I installed TortoiseHG 5.6.1 (x64) on guest Win 7 Ultimate x64 in VirtualBox. The host OS is Win10 Enterprise x64. When I right-click in any folder and select "Hg Workbench", it opens successfully. After that, I accidentelly deleted the *.vdi file and had to reinstall both OS and TortoiseHG again. But, this time when I right-click and select "Hg Workbench" I always get this error:
I tried older TortoiseHG versions, but I get the same error. I even tried to reinstall guest OS again, but it didn't help. I just installed OS and TortoiseHG, so what can be that I did accidentally the first time and/or other times?
UPDATE 1
I installed TortoiseHG 5.6.1 (x64) on guest Win 10 x64 in VirtualBox and I didn't get that error message. So, it has to be something with Win 7. What can that be?

Xamarin.IOs Error: Inconsistency between the local app and the remote build

I have a Xamarin.IOs project which I code in Visual Studio 2017 for Windows and debug on a real device connecting to a Mac Build Host via the Pair to Mac tool of Visual Studio.
But I get this error when I try to run my Xamarin.IOs application,
An inconsistency between the local app and the remote build has been detected for <App Name>. Please rebuild the application and try again. Check the logs for more details
Neither of these solved the problem,
Rebuilding the application and running again
Clean the project, build it and running again
Clean the project, deleting the bin and obj folders, build it and running again
When this error occurs, you have to simply disconnect your Mac Build Host and then reconnect to that Mac Build Host. Then just try to run the application on the device, it would work!
Image Guide
A: Open Pair to Mac window to connect to a Mac Build Host
B: The connected Mac Build Host
C: Right click and Disconnect this Mac Build Host, then connect to it again
Now if you run the application it would deploy to the device without any issues.
Note: Connecting To Mac tutorial
https://learn.microsoft.com/en-us/xamarin/ios/get-started/installation/windows/connecting-to-mac/

Genymotion error at start 'Unable to load virtualbox'

I've installed the genymotion+virtualbox package on Windows 7 64-bit and everything goes fine... But when I start Genymotion it presents me an error message Unable to load virtualbox.
VirtualBox is installed and I'm able to start it manually. I've tried to install the packages separately, updated virtualbox to 4.2.16 but nothing worked.
I've already read genymotion FAQ but it did not help.
I have spend all day to solve this error since none of the answers worked for me.
I found out that oracle virtual box doesn't install the network adapter correctly in windows 8.1
Solution:
Delete all previous virtual box adapters
Go to device manager and click "Action" > "Add legacy hardware"
Install the oracle virtual box adapters manually (my path was C:\Program Files\Oracle\VirtualBox\drivers\network\netadp\VBoxNetAdp.inf)
Now that virtual box adapters is installed correctly, it needs to be setup correctly. (the following solution is like many other solution in here)
Start Oracle VM VirtualBox and go to "File" > "Preferences" > "Network" > "Host-only Network"
Click edit
Set IPv4 192.168.56.1 mask 255.255.255.0
Click DHCP Server tab and set server adr: 192.168.56.100 server Mask: 255.255.255.0 low address bound: 192.168.56.101 upper adress bound 192.168.56.254
Now click OK and start genymotion
Had the same problem, Uninstall Genymotion, install VirtualBox stand alone from https://www.virtualbox.org/wiki/Downloads then install the Genymotion package without VirtualBox.
Try closing Android Studio/Eclipse if it's open. It worked for me.
In Linux at least, I had to restart VirtualBox, running this command on terminal:
/lib/virtualbox/VirtualBox restart
Seems to be the same on Mac OS X.
What worked for me in Windows 7 is to remove the Host-only Network (in Oracle virtual box Preferences menu [CTRL+G] -> Network -> Host-only Networks). Genymotion will recreate it automatically at the next virtual device start. For the record; I'm using a Nexus S 2.3.7 virtual device.
Open Genymotion in Windows as an administrator. My Genymotion works only in this mode
FIXED SOLUTION
Run below command in terminal, It denotes where is your virtualbox install on MAC/Linux.
$ which vboxmanage
/usr/local/bin/VBoxManage
Genymotion search the virtualBox in /usr/bin/VBoxManage while it is located to /usr/local/bin/VBoxManage , you need to create the symlink to that location , Run in terminal to fix it.
sudo ln -s /usr/local/bin/VBoxManage /usr/bin/VBoxManage
I am using Intellij IDEA and same error happened to me, I found that the path to genymotion folder was not configured properly. Either open settings using File > Settings or press Ctrl + Alt + S then in IDE Settings check if the path to the genymotion folder is correct or not.
Since Android Studio are almost similar to Intellij IDEA so you can apply the same steps above to Android Studio as well.
Actually it seems like Genymotion has an issue with the newer versions of Virtual box, I had the same issue on my Mac but when I downgraded to 4.3.30 it worked like a charm.
Verify that GenyMotion is in your PATH environment variable. I noticed mine was not auto populated, so once I entered it, it was fine.
For Windows there are 2 installers. Did you use the bundle containing VirtualBox installer?
It is call Windows 32/64 bits (with VirtualBox).
Don't ask what this has to do with that , but by right clicking the genymotion application file and changing to compatibility to Vista solved the problem!
I also experienced this when I upgraded operating system from Windows 8 to Windows 8.1. Un-installing Virtualbox and re-installing worked for me.
Close Android Studio (if Android Studio is running)
Run Genymotion as administrator
that's all! simple.
try launching it via android-studio/eclipse plugin. Thats how I had similar issue when launching it from ubuntu.

Resources