Skip to content
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

Instagram Authentication on MacOS - NSURLErrorDomain error -999 #98

Open
allan-chin opened this issue Jul 16, 2019 · 7 comments
Open

Instagram Authentication on MacOS - NSURLErrorDomain error -999 #98

allan-chin opened this issue Jul 16, 2019 · 7 comments

Comments

@allan-chin
Copy link
Contributor

Hey @Clancey, I tried the new 1.0.52 on both my UWP and Xamarin.Mac apps. All previous issues seems to be behaving nicely now. However, Instagram authentication is now failing on MacOS only with that same -999 URL error. But this time, it's being thrown in the SimpleAuth.Mac WebAuthenticatorWebView.MonitorAuthenticator() method rather than in FailedProvisionalLoad(), which happened for Dropbox. Here's the exception from the Sample.Mac app included in the SimpleAuth project.

2019-07-16 09:14:19.910 Sample.Mac[2497:45629] *** WARNING: Method convertPointToBase: in class NSView is deprecated on 10.7 and later. It should not be used in new applications.
Exception: The operation couldn’t be completed. (NSURLErrorDomain error -999.)
System.Exception: The operation couldn’t be completed. (NSURLErrorDomain error -999.)
at SimpleAuth.Mac.WebAuthenticatorWebView.MonitorAuthenticator () [0x0002e] in /Users/allan/Projects/GitHub/SimpleAuth/src/SimpleAuth.Mac/WebAuthenticator.cs:32

I downgraded the SimpleAuth Nuget on Mac back to 1.0.51 and the -999 error didn't occur. It seems something bad got introduced in 1.0.52 in this area. Can you please take a look at this?

Thanks

@Clancey
Copy link
Owner

Clancey commented Jul 16, 2019

I wonder if the patch somehow didn't make it into the update. That would be weird. Does it work for you when you use the source?

@allan-chin
Copy link
Contributor Author

allan-chin commented Jul 16, 2019 via email

@Clancey
Copy link
Owner

Clancey commented Jul 16, 2019 via email

@allan-chin
Copy link
Contributor Author

allan-chin commented Jul 16, 2019 via email

@allan-chin
Copy link
Contributor Author

Hi @Clancey - I tested both my TH and the Sample.Mac app again and I want to say it's "intermittent". I quote "intermittent" because I saw it work once on both apps. Once it fails, it seems to fail forever. And I can't seem to make it succeed again. Here's what I see in the output window.

2019-07-16 13:50:14.000 Sample.Mac[6639:170976] *** WARNING: Method convertPointToBase: in class NSView is deprecated on 10.7 and later. It should not be used in new applications.
Exception: The operation couldn’t be completed. (NSURLErrorDomain error -999.)
System.Exception: The operation couldn’t be completed. (NSURLErrorDomain error -999.)
at SimpleAuth.Mac.WebAuthenticatorWebView.MonitorAuthenticator () [0x0002e] in /Users/allan/Projects/GitHub/SimpleAuth/src/SimpleAuth.Mac/WebAuthenticator.cs:32

I've attached a zipped file of the 3 files I changed in your Sample.Mac app which implements an Instagram authentication. I'm running Visual Studio for Mac v8.1.5. You can set a breakpoint on line 45 in the WebAuthenticator file in the SimpleAuth.Mac project.

Thanks

Archive.zip

@allan-chin
Copy link
Contributor Author

Hi @Clancey - I'm not sure what's going on here now. Today, I can't even get 1.0.51 working anymore for Instagram:(. My TH code has not changed, except for removing and re-adding your Nuget package to toggle between 51 and 52 (I delete the package under packages, and delete the bin and obj folders before re-adding). Could this possibly be a transient Instagram server issue? Are you still not seeing the problem?

I've attached another zip of the files I changed in your Sample.Mac project. I realized my 1st zip was missing a file or 2.

Thanks
Archive 2.zip

allan-chin added a commit to allan-chin/SimpleAuth that referenced this issue Jul 25, 2019
Ignore the ""NSURLErrorDomain -999" authentication error with Instagram. Issue Clancey#98
@allan-chin
Copy link
Contributor Author

Hi @Clancey - I just submitted another pull request for this Instagram issue on MacOS. Turns out there is another place where we have to ignore the -999 error.

Thanks

Clancey added a commit that referenced this issue Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants