Bug 21430 - Unauthorized (401) error when running iOS project from Visual Studio
Summary: Unauthorized (401) error when running iOS project from Visual Studio
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 3.1
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-07-18 06:57 UTC by Alexey Bogdanov
Modified: 2015-04-03 09:12 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Alexey Bogdanov 2014-07-18 06:57:44 UTC
I have latest stable Xamarin environment on Mac OS and Windows. Windows is running inside VirtualBox as a guest OS.

Guest OS:

Windows 8.1 64-bit
Visual Studio 2013 Ultimate
Xamarin 3.1.228.0

Host OS:

Mac OS 10.9.4
Xamarin.iOS 7.2.5.5

Steps to reproduce:

1) Launch Xamarin.iOS build host on Mac OS
2) Run VS 2013 on Windows and create new iPhone Blank app project.
3) On pairing request enter manually IP 10.0.2.2 (default IP when connecting from guest to host with VirtualBox). Pairing completes successfully.
4) In VS device's list appears. The project can be build successfully. But when I run a project this error appears in VS:

1>Build started.
1>Server returned an error. The remote server returned an error: (401) Unauthorized.
1>Server error code: 401
1>Unauthorized
1>You are not authorized to run this command
1>
1>Remote build step failed.
1>Build FAILED.

Log from build host console:

[18-Jul-2014 14:54:32] Handling with command: [Info: CommmandUrl=Info] (11)
[18-Jul-2014 14:54:32] Attempting to acquire command execution lock, timeout set to 00:10:00
[18-Jul-2014 14:54:32] mtouch 7.2.5.5 (87026b6)
[18-Jul-2014 14:54:32] Command [Info: CommmandUrl=Info] finished (11)
[18-Jul-2014 14:54:32] Handling with command: [FileManifest: CommmandUrl=FileManifest] (11)
[18-Jul-2014 14:54:32] Attempting to acquire command execution lock, timeout set to 00:10:00
[18-Jul-2014 14:54:32] Error: Invalid authorization data
[18-Jul-2014 14:54:32] Error: Unauthorized request from 127.0.0.1
[18-Jul-2014 14:54:32] Command [FileManifest: CommmandUrl=FileManifest] finished (11)

I've been struggling with this error for several months. Today we renewed our Business license for giving another try for VS integration. But this critical bug is still here.
Comment 1 Sunil Kumar 2014-07-31 08:45:30 UTC
I have tried to reproduce this issue followed by given steps mentioned in bug description but we are not able to reproduce. Window is running inside the VM and We are able to build and run the application from Visual Studio successfully without any authentication error.

Please let me know if we have to follow any other steps to reproduce this issue?

Screencast: http://screencast.com/t/DZSjzroUX8BT

Environment info: 
Microsoft Visual Studio Professional 2013
Version 12.0.21005.1 REL
Microsoft .NET Framework
Version 4.5.50938
Xamarin   3.1.228.0 (2349ba7b70529ea26ba842e1ec32d054bd6abb3b)

Build Host:
X.iOS 7.2.5.5
Xcode 5.1.1
Comment 2 Alexey Bogdanov 2015-04-03 09:12:31 UTC
Works fine in the latest version.