ionic-appauth icon indicating copy to clipboard operation
ionic-appauth copied to clipboard

Error: Uncaught (in promise): No active window to close!

Open mraible opened this issue 2 years ago • 13 comments

After upgrading to the latest release (v0.8.4), I get this error when the callback component is called.

ERROR Error: Uncaught (in promise): No active window to close!
    at resolvePromise (zone.js:1255)
    at zone.js:1162
    at web.js:18
    at new ZoneAwarePromise (zone.js:1340)
    at BrowserWeb.close (web.js:11)
    at index.js:171
    at ZoneDelegate.invoke (zone.js:400)
    at Object.onInvoke (core.js:28705)
    at ZoneDelegate.invoke (zone.js:399)
    at Zone.run (zone.js:160)

If I switch from using CapacitorBrowser to DefaultBrowser, it closes the tab I'm using and the app is gone from my browser.

mraible avatar Aug 03 '21 04:08 mraible

I also see this warning in my browser console.

Capacitor WebPlugin "SecureStoragePlugin" config object was deprecated in v3 and will be removed in v4.

If I use CapacitorStorage instead of CapacitorSecureStorage, the problem goes away.

mraible avatar Aug 03 '21 14:08 mraible

I also see this warning in my browser console.

Capacitor WebPlugin "SecureStoragePlugin" config object was deprecated in v3 and will be removed in v4.

If I use CapacitorStorage instead of CapacitorSecureStorage, the problem goes away.

This is a problem with the secure storage plugin, I have been keeping an eye as there is already a bug raised.

wi3land avatar Aug 06 '21 09:08 wi3land

After upgrading to the latest release (v0.8.4), I get this error when the callback component is called.

ERROR Error: Uncaught (in promise): No active window to close!
    at resolvePromise (zone.js:1255)
    at zone.js:1162
    at web.js:18
    at new ZoneAwarePromise (zone.js:1340)
    at BrowserWeb.close (web.js:11)
    at index.js:171
    at ZoneDelegate.invoke (zone.js:400)
    at Object.onInvoke (core.js:28705)
    at ZoneDelegate.invoke (zone.js:399)
    at Zone.run (zone.js:160)

If I switch from using CapacitorBrowser to DefaultBrowser, it closes the tab I'm using and the app is gone from my browser.

I think I may have to get rid of the close browser feature as it seems to be causing more issues than it solves

wi3land avatar Aug 06 '21 09:08 wi3land

I'd like to know if there is any progress regarding this issue? Cause my app also doesn't redirect back to the app on a Android phone.

Or is there any temporary solution to bypass this issue?

Elite40 avatar Aug 22 '21 17:08 Elite40

@mraible @wi3land We just started seeing this in our error monitoring. Has this been resolved yet? Do you have any suggestions on what we can do to address this issue? Thank you!

zsyphon avatar Oct 14 '21 15:10 zsyphon

@zsyphon I thought this would be fixed in v0.8.5 with https://github.com/wi3land/ionic-appauth/pull/52. Are you using the latest version?

mraible avatar Oct 14 '21 15:10 mraible

@mraible Yes we are using 0.8.5

zsyphon avatar Oct 14 '21 16:10 zsyphon

Then I'm not sure what the problem might be.

mraible avatar Oct 14 '21 16:10 mraible

I am also having the same issue on 0.8.5

allidoisace avatar Oct 18 '21 23:10 allidoisace

Me as well!

Just upgraded from Capacitor V2 to Capacitor V3 and with this upgraded all my dependencies to latest.

I'm also seeing the warning "Capacitor WebPlugin "SecureStoragePlugin" config object was deprecated in v3 and will be removed in v4." and get the error "Uncaught (in promise): No active window to close! at resolvePromise"

wrzr123 avatar Dec 13 '21 13:12 wrzr123

I get this error too i.e after a signinWithRedirect we always see this in the console (although everything seems to work ok)

ERROR Error: Uncaught (in promise): No active window to close!

Is there anything we can do to not see this?

richardkshergold avatar May 20 '22 14:05 richardkshergold

still here

Sotatek-DaiNguyen4 avatar Jun 13 '23 10:06 Sotatek-DaiNguyen4

any updates or any workaround so far?

muhrifqii avatar Jun 19 '23 05:06 muhrifqii