Title: ASWebAuthenticationSession fails when Chrome is open & Safari is closed → Scheme '(null)' is not valid as per RFC 3986

Environment

  • App: Flutter desktop (macOS primary; Windows/Linux also used)

  • SDK/Packages: auth0_flutter

  • Platforms: macOS, Windows/Linux unaffected

  • Browser state: Chrome open, Safari closed (Chrome default)

Summary

Login via auth0_flutter works in all other cases, but fails only when Chrome is freshly open and Safari is closed on macOS.

Errors observed

  1. First attempt (useHTTPS: true) throws:
WebAuthenticationException (OTHER: An unexpected error occurred.
CAUSE: Error Domain=com.apple.AuthenticationServices.WebAuthenticationSession Code=3
"Scheme '(null)' is not valid as per RFC 3986."
UserInfo={NSDebugDescription=Scheme '(null)' is not valid as per RFC 3986.})

  1. Fallback attempt (useHTTPS: false, custom scheme) immediately completes as canceled (SDK surfaces “User cancelled session.”) after Chrome’s “open this app?” prompt flashes.

Hi @lam1310

Welcome to the Auth0 Community!

Could you try adding in your .gradle file this following line or confirm if you already have:

manifestPlaceholders = [auth0Domain: "your_domain", auth0Scheme: "https"]

Otherwise, it is quite hard to troubleshoot the issue itself without taking a look at your code and understand exactly what is your configuration and where this error is being thrown.
I would highly recommend to open an issue on the SDKs Github page or you can try opening a support ticket since your account is under a free trial at this time for live support and troubleshooting.

If you have any other questions, let me know!

Kind Regards,
Nik

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.