Error 3 on iOS from showUrl when trying to do login in some conditions
See original GitHub issueDescribe the problem
Authorize call doesn’t prompt for login when it should on iOS hardware. With changes in #381 I see the following error occuring from the iOS native code:
LOG {"error": "The operation couldn’t be completed. (com.apple.AuthenticationServices.WebAuthenticationSession error 3.)", "error_code": 3}
It doesn’t seem to happen on initial login. It is happening when I am trying to migrate our app to a new version where we added a couple of new scopes to the request. I have been able to reproduce by deleting the app from my phone and starting over (which results in a successful login) that only breaks when I attempt to add scopes.
What was the expected behavior?
Prompted for login via auth0
Reproduction
Here is the call to authorize:
.authorize({
audience: 'https://foo.bar.com/api',
scope: 'offline_access openid email profile',
},
{ ephemeralSession: true })
- Log in with a given set of scopes.
- Close the running app.
- Change the code to add a new scope and rebuild.
- Run again and attempt to login
Environment
- Version of this library used: 2.8.3
- Which framework are you using, if applicable: React Native 0.64.1, iOS 14.4.2
- Other modules/plugins/libraries that might be involved:
- Any other relevant information you think would be useful: Unable to reproduce on the iOS simulator, only on device.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
The operation couldn't be complete… | Apple Developer Forums
The operation couldn't be completed. Unable to log in with account 'myappleid'. An unexpected failure occurred while logging in (Underlying error code 1100)....
Read more >How to Fix iOS 16 Update Stuck on Terms and ... - YouTube
iOS 16 update stuck at Terms and Conditions, Cannot agree the ... Create Account Your Account Cannot Be Created at this time iOS...
Read more >Troubleshooting iOS/iPadOS device enrollment errors in ...
Suggestions for troubleshooting some of the most common enrollment and sync token errors when enrolling iOS/iPadOS devices in Intune.
Read more >There Was an Error Connecting to the Apple ID Server: 7 Fixes
1. Start the Settings app and tap General. · 2. Tap Transfer or Reset iPhone. · 3. Tap Reset. · 4. In the...
Read more >An unknown error occurred when I was trying to use an iPad ...
Like anyother devices I used for development, I attached the device and pressed "Use For Development" is XCode Organizer. The process started but...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s not an overly outdated app - I have made recent changes to it over the last year that have been tested on device.
However, your second question I think may be on to something with it being timing related. This is happening from react native so it isn’t in
viewDidLoad
itself but I think in this case we were having UI changes happen at the same time as the login was initiated (Auth0 was actually being called from an async process outside of the component lifecycle).To confirm this I tried adding an intentional delay before calling
authorize
and that seems to alleviate the error which leads me to believe it has to do with views changing on the screen when the login was initiated.Assuming my understanding is correct I will head down that path of restructuring that workflow to make sure the views are not changing at the time of the call to
authorize
.Thanks for your help!
Glad you were able to start pinpointing the issue. Will close this, please ping if you’d like to reopen.