-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GoogleWebAuthorizationBroker.AuthorizeAsync crash on HoloLens #763
Comments
Thanks for the report. I'll try to take a look as soon as I can. Could you provide a short but complete example demonstrating the problem, so we can see how you're trying to authenticate? |
@jskeet I can, but you'll have to wait till tomorrow. |
That's fine - I'm very unlikely to be able to get to it imminently anyway, I'm afraid. |
OK, I've got example which recreates the problem. Just remember to add your client_secret |
Thanks, will take a look when I can. |
Hmm. Have installed the emulator, downloaded the sample, downloaded a client_secret.json file, put it in the Assets directory and changed it to a build action of Content... and everything works. When I click on "Click me", I'm prompted for my username and password, then 2 factor auth, then permission - everything works fine. At what point does it break for you? |
It throws exception when you give permission to your account |
Right, so it got as far as the screen saying "Are you happy for this application to access Drive"? Does it happen every time, or just occasionally? It's tricky as I'm failing to reproduce it at the moment. I assume you have a working network connection and everything? Just grasping at straws at the moment :( |
One extra quick check - could you use ildasm to have a look at which versions of Google.Apis.Auth and Google.Apis.Auth.PlatformServices are being pulled in? On my box it's 1.11.1.0, which I suspect is what you've got as well, but I thought I'd check... |
Yes, it's v1.11.1 |
Thanks for the video. Will scratch my head and see what I can do to provoke it here :( |
Gah - stupidly, I hadn't actually been launching it in the HoloLens emulator... so I'd just been seeing it working in the UWP version. Now launched HoloLens emulator, and am failing to use it... but hopefully I'll be able to reproduce it now. |
If it's the error about UDP port - I've been there - there is a lot instructions on the internet about how to fix that. But if you have second machine to test it, maybe it will be luckier. I had this problem on one computer, couldn't fix it, but on my second machine emulator worked out-of-the-box. |
No errors about the UDP port - just failing to click on the button at all, despite toggling the "use keyboard and mouse". Will keep trying. |
Okay, good news - I've managed to reproduce your exact error. Next I'll see if I can do that with a debug version of the auth library. |
When you said in the first comment:
Which other issue are you talking about? I can only see one issue in Github from you at the moment. |
This one: |
@Piachu91: Gotcha, thanks. Was confused by Github's time filter. Will edit your first comment to refer to it, for simplicity. |
Okay, it looks like this is Hololens being broken, as far as I can tell. You can reproduce the problem without any Google client code: string clientId = // Insert your client ID here; it's in the JSON file
string approvalUrl = "https://accounts.google.com/o/oauth2/approval";
string escapedScope = "https:%2F%2Fwww.googleapis.com%2Fauth%2Fdrive";
string requestUrl = $"https://accounts.google.com/o/oauth2/auth?access_type=offline&response_type=code&client_id={clientId}&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope={escapedScope}";
WebAuthenticationResult result = await WebAuthenticationBroker.AuthenticateAsync
(WebAuthenticationOptions.UseTitle, new Uri(requestUrl), new Uri(approvalUrl)); Doing this in the Hololens emulator, you end up with a result with:
When running as a desktop app, you end up with a result with:
I suspect it would be worth reporting this to MS. Are you happy to do that? |
Yes, I'll be happy to |
Hello,
I just begin testing my Windows 10 UWP app on HoloLens (emulator). It crashes on login GoogleWebAuthorizationBroker.AuthorizeAsync
When I type (proper) auth data it throws
Exception thrown: 'System.AggregateException' in mscorlib.ni.dll
and in InnerException I get this:
http://i.imgur.com/vObH7s4.jpg
Same code works fine on Windows 10 PC and Mobile.
PS. To reproduce it you'll need Windows 10 machine, VS 2015 Update 2 and HoloLens SDK installed.
PS2. Currently I use Google.Apis.Drive.v3 v1.12.0.455 and I didn't test newer version, because of release config error which I mentioned in #752 .
The text was updated successfully, but these errors were encountered: