Skip to content
← Back to activity

Public problem

DevCycle js-client-sdk depends on window object breaks browser extension manifest v3 service workers

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

The @devcycle/js-client-sdk references the window object (window.localStorage, window.navigator.userAgent, window.addEventListener), which does not exist in Manifest V3 browser extension service workers. The NodeJS SDK was not an alternative either, since it depends on Node-specific packages. This left no DevCycle SDK usable in extension service workers.

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 @devcycle/js-client-sdk v1.23.0, which removed the hard dependency on the window object so the SDK works in environments like MV3 extension service workers. Upgrade to v1.23.0 or later.

Source: https://github.com/DevCycleHQ/js-sdks/issues/708

Source: https://github.com/DevCycleHQ/js-sdks/issues/708