sakithb / media-controls

A media indicator for the Gnome shell.
MIT License
236 stars 36 forks source link

Something's gone wrong #57

Closed lucas-montes closed 12 months ago

lucas-montes commented 2 years ago

Ubuntu 20.04 LTS

SyntaxError: expected expression, got '?'

Stack trace: _init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:204:33 OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:122:28 asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:132:13 run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:175:20 main@resource:///org/gnome/Shell/Extensions/js/main.js:19:13 run@resource:///org/gnome/gjs/modules/script/package.js:222:19 start@resource:///org/gnome/gjs/modules/script/package.js:206:5 @/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17

rinovmrn commented 2 years ago

same issue :(

the media controls was running but it can't be configured and showing error like above

thehh commented 2 years ago

Same is happening to me. Extension is working, however settings cannot be accessed

scottTomaszewski commented 1 year ago

I was able to fix this for me. Open the prefs.js file and replace the line

let trackLabelArray = [
            trackLabelOptKeys[trackLabelStart.get_active()] ||
                currentTrackLabel[0],
            trackLabelSep.get_text() ?? currentTrackLabel[1],
            trackLabelOptKeys[trackLabelEnd.get_active()] ||
                currentTrackLabel[2],
        ];

with (what is actually in the main branch)

let trackLabelArray = [
            trackLabelOptKeys[trackLabelStart.get_active()] ||
                currentTrackLabel[0],
            trackLabelSepText !== null || trackLabelSepText !== undefined
                ? trackLabelSepText
                : currentTrackLabel[1],
            trackLabelOptKeys[trackLabelEnd.get_active()] ||
                currentTrackLabel[2],
        ];

Looks like this was already fixed, but the extension hasnt been released: https://github.com/cliffniff/media-controls/issues/39

ChrisLauinger77 commented 12 months ago

Duplicate of #39