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

**URL:** <https://community.auth0.com/t/title-aswebauthenticationsession-fails-when-chrome-is-open-safari-is-closed-scheme-null-is-not-valid-as-per-rfc-3986/192238>\
**Category:** Get Help\
**Tags:** authentication-sessions, sessions\
**Created:** [September 22, 2025, 2:20pm UTC](https://community.auth0.com/t/title-aswebauthenticationsession-fails-when-chrome-is-open-safari-is-closed-scheme-null-is-not-valid-as-per-rfc-3986/192238 "2025-09-22T14:20:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lam1310](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lam1310/32/72761_2.png) [@lam1310](https://community.auth0.com/u/lam1310)\
**Post date:** [September 22, 2025, 2:20pm UTC](https://community.auth0.com/t/title-aswebauthenticationsession-fails-when-chrome-is-open-safari-is-closed-scheme-null-is-not-valid-as-per-rfc-3986/192238/1 "2025-09-22T14:20:16Z")

</div>

**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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [September 25, 2025, 3:56pm UTC](https://community.auth0.com/t/title-aswebauthenticationsession-fails-when-chrome-is-open-safari-is-closed-scheme-null-is-not-valid-as-per-rfc-3986/192238/3 "2025-09-25T15:56:46Z")

</div>

Hi @lam1310

Welcome to the Auth0 Community!

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

```auto
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](https://github.com/auth0/auth0-flutter/issues) on the SDKs Github page or you can try opening a [support ticket](https://support.auth0.com/tickets/new) 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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [October 9, 2025, 3:57pm UTC](https://community.auth0.com/t/title-aswebauthenticationsession-fails-when-chrome-is-open-safari-is-closed-scheme-null-is-not-valid-as-per-rfc-3986/192238/4 "2025-10-09T15:57:28Z")

</div>

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