If the jquery-ui library is specified in a script's @require block, the script crashes with an error in Chrome.
Note that this was not the case in version 2.12.7. This also does not happen if this library is used outside of a userscript, nor is it present in the Firefox version.
Here is a sample script, used to reliably reproduce this issue:
// ==UserScript==
// @name JQuery-UI Test
// @namespace test.jquery-ui
// @version 1.0
// @match *://*/*
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js
// @grant GM.info
// ==/UserScript==
console.log(GM.info);
The script runs normally.
The following error is produced:
JQuery-UI Test.user.js:28 RangeError: Maximum call stack size exceeded
at Set.V (injected-web.js:1)
at Array.filter (<anonymous>)
at Object.ownKeys (injected-web.js:1)
at Function.t.widget.extend (JQuery-UI Test.user.js:9)
at Function.t.widget.extend (JQuery-UI Test.user.js:9)
at Function.t.widget.extend (JQuery-UI Test.user.js:9)
at Function.t.widget.extend (JQuery-UI Test.user.js:9)
at Function.t.widget.extend (JQuery-UI Test.user.js:9)
at Function.t.widget.extend (JQuery-UI Test.user.js:9)
at Function.t.widget.extend (JQuery-UI Test.user.js:9)
This is the same problem we've fixed for Firefox in #861. Apparently Chrome changed its behavior so we'll apply the fix for Chrome too.
@gera2ld :sigh: this probably warrants an early new release...
Thank you!
Will the 2.12.9 update be pushed to the chrome web store anytime soon? In the meantime, I've resorted to switching to TamperMonkey for the scripts broken by this bug. I'd prefer not to use TamperMonkey at all.
The stores are slow. Meanwhile you can install the new release as an unpacked extension in dev mode. When the store is updated you can remove the extension and reinstall it from the store. Don't forget to back up your data.