Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mv3] chrome.userScripts is unavailable/undefined #1135

Open
derjanb opened this issue May 22, 2024 · 2 comments
Open

[mv3] chrome.userScripts is unavailable/undefined #1135

derjanb opened this issue May 22, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@derjanb
Copy link

derjanb commented May 22, 2024

Describe the bug
Tampermonkey BETA 5.2.* (mv3 extension) is not working

To Reproduce

Install Tampermonkey BETA [1], which is a manifest v3 extension. Observe the service worker throwing the error
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'configureWorld')

Expected behavior
No error

Workaround
Load Tampermonkey BETA 5.1.6194 (mv2 extension)

Smartphone:

  • Android Version 13
  • Kiwi Browser Version 124.0.6327.4

Additional context

It looks like the userScripts API is not available to mv3 extensions (Developer Mode is enabled).
If debugging into the service worker, then you can see that chrome.userScripts return undefined, while it should throw an error if developer mode is disabled or provide the userScripts API (Chrome 120+) implementation.

[1]
https://chromewebstore.google.com/detail/tampermonkey-beta/gcalenpjmijncebpfijmoaglllgpjagf
https://data.tampermonkey.net/tampermonkey_beta.crx

@RayKoopa
Copy link

For the current workaround, how would one prevent Tampermonkey from automatically updating to the mv3 version that is broken in Kiwi?

@derjanb
Copy link
Author

derjanb commented Jun 25, 2024

In the meantime you can use Tampermonkey Legacy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants