Xamarin - A remote error occurred in the connected mac. ... Connection is finished - xamarin.forms

The connection had been working for a while and then suddenly I started getting a flurry of error messages that resulted with a final "... connection is finished" error.
After a few attempts, I was able to screen capture one of the preceding messages and came up with this:
A Remote error occurred in the connected Mac
XCode couldn't be found at /Library/Developer/CommandLineTools. Please specify the right location in Visual Studio under 'Tools > Options > Xamarin > iOS Settings' or ensure that uit is installed properly at the default location ('/Applications/Xcode.app')
I tried restarting visual studio on the PC, and Visual Studio and XCode on the mac, but no dice.

I solved this problem by going back and checking that XCode command line tools was setup properly. After a recent ios update, the Xcode command line tools had been "deconfigured". The fix was pretty simple. I just had to go back into Xcode > Preferences > Locations and reselect the command line tools from the dropdown. It wasn't an obvious or easy find, but it was a simple fix once you knew what to look for.

Related

Why do I get this GRPC Error "WARNING: EmulatorService.cpp:448: Cannot find certfile" when I start the emulator?

Good evening everyone, I have only been dealing with Java and Android Studio for a few months, can someone help me to solve this error? It occurs every time the emulator starts. Thank you
Emulator: Started GRPC server at 127.0.0.1:8554
Emulator: emulator: WARNING: EmulatorService.cpp:448: Cannot find certfile: C:\Users\Sawye.android\emulator-grpc.cer security will be disabled.
Invalidate and Restart option in Android Studio, followed by gradle clean, and manually uninstalling the application from the emulator finally worked for me. Individually, they didn't for whatever reason.
I tried several other options mentioned without any luck. The file it mentioned "emulator-grpc.cer" still doesnt exist anywhere. There is a keystore in that folder called debug.keystore which isn't altered after fixing it, so I'm guessing that error is just misleading about the real problem, whatever it is. Anyway, thought I'd share what worked for me since I searched everywhere for it and didn't find it.
A quick fix:
From the main navbar menu
Tools > Android > SDK Manager > Android SDK > SDK Tools
You'll then see the screen below where you can select '- Android Emulator Hypervisor Driver for AMD Processors (installer) version 1.3.0'
I am not sure what the actual root cause of the issue is, but this patched the issue for me and may help other people.
Here my scenario: I closed the emulator with force quit. After restarting emulator, I always got this error.
Fix: I opened the AVD Manager in Android Studio by selecting Tools > AVD Manager menu. In the opened popup, I chose Wipe Data option as can be seen below image. After that, I restarted emulator and it worked !!!
Your emulator is out of date, please update by launching Android Studio:
Start Android Studio
Select menu "Tools > Android > SDK Manager"
Click "SDK Tools" tab
Check "Android Emulator" checkbox
Click "OK"
Got the same issue, I restarted the computer and then runned again the emulator and it worked. Important! you have to run the app, not debug it. You can use debug after the app is installed again in the emulator
Unless it's preventing your app from running in the emulator, or preventing the emulator from running at all, I wouldn't worry about it. It's something new that Google put into the emulator so it now checks for that file. I looked at an installation which did not have the updates and the cert file was missing there as well, and it ran just fine with no error. I'm not sure what Google is doing, but I know that this wasn't thought through all the way based on the number of people who have been having problems with this.
I was also getting the same error. The above answers didn't fix my issue. I tried a lot of things, then finally when I uninstalled Intel x86 Emulator Accelerator (HAXM installer) from-
Tools > Android > SDK Manager > Android SDK > SDK Tools.
Then I reinstalled Intel x86 Emulator Accelerator (HAXM installer). This fixed my issue and I was able to run my emulator again. Hope it helps!
I have tried all the strange answers above nothing solved the issue. So searched in google's issue tracker, I found someone posted an Issue about it, and here is what the team wrote in response:
Hi, this warning is benign. We'll remove it in a future update.
So as google said: that warning is nothing to be worried, not harmful, and will be removed!
Update:
Issue was now indeed fixed with latest Release Update for the Canary Dev Channel:
Removed prints about certs and GRPC on startup.
You need to add credentials for your application in console.developers.google.com i.e. credentials, clik Api Key 1 and than ADD AN ITEM in Restrict usage to your Android apps.

Visual Studio unable to find the app in El Capitan VM

I'm using visual studio 2015 community edition. When i try to debug my cordova-ionic app with remotebuild on an El Capitan VM on virtualbox, the app gets successfully installed onto the iOS simulator. However, I receive the error "We were unable to find the app you’re trying to debug. Check that the device is connected, awake, and unlocked. Also, make sure it has Web Inspector enabled."
Things I've tried:
1. I've checked and web inspector is turned on on the iOS simulator (under settings>safari>advanced>web inspector in the simulator)
2. I've tried 'reset content and settings (under simulator>reset content and settings...)
3. I've tried turning windows firewall off
4. I've tried secure and unsecured remotebuild
Any suggestions on how i can fix this would be greatly appreciated!
However, I receive the error "We were unable to find the app you’re trying to debug.
It could be the result of timeout of remote build tool.Please try the following steps:
first run remotebuild saveconfig in mac os terminal
Open the RemoteBuild.config file in the Text Editor from the path of the previous step
Change value of appLaunchStepTimout to 60000 (1 min)
Change value of emulatorLaunchTimeout to 60000 (1 min)
Save the file
run remotebuild on terminal
Run the project from Visual studio again
If the above steps doesn't work, please try increasing the El Capitan VM memory.

Can't start Cordova debugging to iOS simulator

I've followed the instructions at the link below to "Build and simulate a Cordova iOS app in the cloud". https://taco.visualstudio.com/en-us/docs/build_ios_cloud/
After completing the instructions I'm able to build and get the iOS simulator working, however, I'm unable to attach a debugger.
The message displayed in remotebuild is:
GET /cordova/build/5655/debug 500 10.865 ms - 28
In Visual Studio I see the following in the Debug window:
Starting launch process C:\Program Files (x86)\nodejs\node.exe "(redacted)\node_modules\vs-tac\emulator.js" --platform ios --action launch --path "(redacted)\buildInfo.json" --serverUrl https://(redacted):3000/cordova --certificateName (redacted) --language en-US --loglevel info --cliVersion 5.4.1 --npmInstallDir "(redacted)" --deployTarget "iPhone 5"
Timed out connecting debugger to remote Apache Cordova app. See Output window for JavaScript console output.
------ Cordova tools 5.4.1 already installed.
Requesting emulate on iOS Simulator for buildNumber 5655 on server https://(redacted):3000/cordova...
Emulated - Successfully sent to ios Simulator
------ Cordova tools 5.4.1 already installed.
Requesting debug on remote iOS device for buildNumber 5655 on server https://(redacted):3000/cordova...
Failed to Debug iOS remote for build (redacted)\buildInfo.json to https://(redacted):3000/cordova :
iPhone 5
My local development machine is using Visual Studio 2015 and Cordova 5.4.1. I have Node v0.12.2 installed locally and v0.12.9 installed on the MacInCloud. Following the instructions in the link above, I am NOT an admin on the Mac machine.
I've also already tried the instructions suggested in this SO answer: Visual Studio Debugger failing to connect to remote Apache Cordova app in iOS simulator
All the suggestions and the links provided by others were helpful but ultimately my assessment of the problem was not being admin/root on the Mac. The Visual Studio Cordova docs linked in my original question would suggest that you can do all that you need on a Mac without having admin/root access but in my experience that is just not the case.
To the credit of the MacInCloud group, they were very helpful in making changes that I requested to permissions and for reinstalling packages such as brew, ios-webkit-debug-proxy, remotebuild, etc... but after a while that back-and-forth kind of approach to fixing the issue proved painful. When I switched from a Managed MacInCloud server to a Dedicated one, everything worked almost immediately.
Looking back I think the initial execution of remotebuild, which executes brew -- without being admin on the box -- caused the whole process to go south. I was warned when I ran remotebuild for the first time that it would install some brew components that might need root access. That should have been a warning sign to me that not being admin on the box was going to be an issue...
Even though I was able to get a Dedicated MacInCloud server working, the lesson I learned about having control over the Mac prompted me to just buy a Mac Mini. That was a little more difficult to setup because I was now doing everything myself, but ultimately I think it will pay off in the end.
For anyone else struggling with similar issues here is a brain dump of some things I learned along the way:
You don't necessarily need to get Visual Studio talking to the Mac to debug Cordova applications. You can use Safari Web Inspector from the Mac. https://blog.nraboy.com/2015/10/debugging-your-apache-cordova-ios-app-with-safari/. Even though I finally got VS working, I actually prefer this because it is more like Chrome's debugger which I prefer to Visual Studio's.
The ios-webkit-debug-proxy NPM package mentioned in other comments and links is basically a proxy which Visual Studio uses to debug the simulator in exactly the same way Safari does as mentioned above. For this proxy to work you must also be allowed to connect to the Mac over ports 9221-9322. https://github.com/google/ios-webkit-debug-proxy. Prior to learning that I thought I only needed port 3000 open for the remotebuild proxy...
The package necessary for launching the iOS simulator from remotebuild is ios-sim and it will occasionally timeout when launching the simulator and cause the debugger not to attach. This is a known limitation. https://github.com/phonegap/ios-sim and https://blogs.msdn.microsoft.com/visualstudio/2014/11/13/tools-for-apache-cordova-update-ios-debugging-windows-8-1-support/ (see comments).
If you should feel the need to install/uninstall brew it is very easy to do. Just run the install script and if already installed it will give you instructions on how to uninstall. http://brew.sh/ and https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting. To uninstall or reinstall a NPM package is equally easy and Google is your friend.
Read and re-read both of these links for setting up a Mac: https://taco.visualstudio.com/en-us/docs/ios-guide/ and https://taco.visualstudio.com/en-us/docs/build_ios_cloud/. Getting the RemoteBuild.config right is crucial for getting secure connections to work -- especially if you want to access your Mac Mini at home from across the internet.
If you are remoting to a Mac I highly recommend iRAPP or some other VNC alternative. My experience has been that VNC is painfully slow and having a bad connection when you're troubleshooting issues just leads to more aggravation. http://www.coderebel.com/products/irapp/
As mentioned above, the MacInCloud guys were great when I asked for support, but if you do need root access for more than six months the cost of a Mac Mini is less than a Dedicated server plan.
Cheers
Since it is the call to /cordova/[...]/debug that is failing it looks like you might not have ios_webkit_debug_proxy installed. You could try making sure that homebrew is installed (from http://brew.sh) and running brew install ios-webkit-debug-proxy. Afterwards you should be able to run ios_webkit_debug_proxy without an error.
If that runs successfully then you should be able to quit out of ios_webkit_debug_proxy and debugging should work via remotebuild.

VS2015-CTP: Unable to get Ripple session info. Exception: Cannot send a content-body with this verb-type

i recently installed the new windows 10 preview and the visual studio 2015-ctp (complete installation) and tried to play with cordova. So i just created a new project from the templates and tried to run it with ripple.
I got an error message pointing out that ANDROID_HOME is not defined, so i added a new environment variable:
ANDROID_HOME pointing to: C:\Program Files (x86)\Android\android-sdk
Now i got another error without any hints on how to deal with it:
Unable to get launched browser process for Ripple.
Unable to get Ripple session info. Exception: Cannot send a content-body with this verb-type.
Any ideas?
Thanks very much!
Edit: Still no answer? Do you have problems understanding my Question?
In VS, go to Tools > Options > Tools for Apache Cordova > Environment Variable Overrides. You might try setting the Android SDK variable here. It may report errors if there's a problem.

Visual Studio 2010 giving error "External Component has thrown an exception"

I am running Visual Studio Ultimate on Windows 7. Here is the description of my problem:
My VS 2010 had been running absolutely fine until today when it started giving error "External Component has thrown an exception" when I try to open a new website. Creating a new web application works fine though but I am unable to run any of them.
While trying to run the previously created websites/webapps, its giving error as "Unable to launch ASP.NET development server".
And when I try to debug the website/web app, I am getting error: "Unable to launch ASP.NET development server. An attempt was made to perform an initialization operation when initialization has already been completed".
Similar errors are coming when I try to open Windows Form Applications and other projects.
No errors are getting logged on event viewer and I cannot see any other error information apart from what is mentioned above.
I searched all over internet but no help. I have already trying un-installing VS2010 using the script at this link (provided by MS). But when I re-install VS2010, it still shows me same error. To my surprise, after re-installing VS still shows the previous project list in "Recent Projects". I really doubt if VS is getting uninstalled.
I am totally clueless and any help would be highly appreciated. I am left with no other option but to format my OS if I don't find a solution here :( Please do let me know if any other details are required...
It might be caused by an adding or extension that you've installed, maybe without being aware of.
there are several ways to deal with that - one is to get inside add in manager and remove/ deactivate them.
if VS can't load there is a flag that should do the trick.
check this link for instructions on devenv flags.
you can use: /ResetAddin or /SafeMode

Resources