Skip to content
← Back to activity

Public problem

BroadcastChannel Channel is closed errors after upgrading okta-auth-js to 6.4.0 (fixed in 6.7)

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Upgrading an Angular app from @okta/okta-auth-js 6.2.0 to 6.4.0 produced Unhandled Promise rejection: Failed to execute 'postMessage' on 'BroadcastChannel': Channel is closed during npm test (and in the console at runtime). The SDK's cross-tab communication channel was being used after it was closed. Nothing in the app had changed besides the SDK version bump, which pointed at the 6.4.0 release itself.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

Fixed in @okta/okta-auth-js 6.7.0; the reporter confirmed upgrading to 6.7.0 removed the BroadcastChannel errors. Upgrade past 6.7. The Okta team also recommends reading tokens from the tokenManager directly rather than authState, as they observed related token staleness issues around the same upgrade. Source: https://github.com/okta/okta-auth-js/issues/1174

Source: https://github.com/okta/okta-auth-js/issues/1174