aleho / gnome-shell-volume-mixer

GNOME Shell Extension allowing separate configuration of PulseAudio devices
https://extensions.gnome.org/extension/858/volume-mixer/
GNU General Public License v2.0
135 stars 32 forks source link

Do not work with Gnome 3.32 #94

Closed Nik-mmzd closed 5 years ago

Nik-mmzd commented 5 years ago
мар 15 23:04:06 Raxacoricofallapatorius gnome-shell[2507]: Some code called array.toString() on a Uint8Array instance. Previously this would have interpreted the bytes of the array as a string, but that is nonstandard. In the future this will return the bytes as comma-separated di>
                                                              (Note that array.toString() may have been called implicitly.)
                                                              0 getCards() ["/home/mcmodder/.local/share/gnome-shell/extensions/shell-volume-mixer@derhofbauer.at/utils.js":98]
                                                              1 _getCardDetails() ["/home/mcmodder/.local/share/gnome-shell/extensions/shell-volume-mixer@derhofbauer.at/mixer.js":336]
                                                              2 wrapper() ["resource:///org/gnome/gjs/modules/_legacy.js":82]
                                                              3 _init() ["/home/mcmodder/.local/share/gnome-shell/extensions/shell-volume-mixer@derhofbauer.at/mixer.js":49]
                                                              4 wrapper() ["resource:///org/gnome/gjs/modules/_legacy.js":82]
                                                              5 _Base.prototype._construct() ["resource:///org/gnome/gjs/modules/_legacy.js":18]
                                                              6 newClass() ["resource:///org/gnome/gjs/modules/_legacy.js":114]
                                                              7 enable() ["/home/mcmodder/.local/share/gnome-shell/extensions/shell-volume-mixer@derhofbauer.at/extension.js":48]
                                                              8 enableExtension() ["resource:///org/gnome/shell/ui/extensionSystem.js":131]
                                                              9 loadExtension() ["resource:///org/gnome/shell/ui/extensionSystem.js":177]
                                                              10 _loadExtensions/<() ["resource:///org/gnome/shell/ui/extensionSystem.js":324]
                                                              11 _emit() ["resource:///org/gnome/gjs/modules/signals.js":142]
                                                              12 _loadExtension() ["resource:///org/gnome/shell/misc/extensionUtils.js":244]
                                                              13 scanExtensions/<() ["resource:///org/gnome/shell/misc/extensionUtils.js":250]
                                                              14 collectFromDatadirs() ["resource:///org/gnome/shell/misc/fileUtils.js":25]
                                                              15 scanExtensions() ["resource:///org/gnome/shell/misc/extensionUtils.js":249]
                                                              16 _loadExtensions() ["resource:///org/gnome/shell/ui/extensionSystem.js":326]
                                                              17 enableAllExtensions() ["resource:///org/gnome/shell/ui/extensionSystem.js":334]
                                                              18 _sessionUpdated() ["resource:///org/gnome/shell/ui/extensionSystem.js":365]
                                                              19 init() ["resource:///org/gnome/shell/ui/extensionSystem.js":373]
                                                              20 _initializeUI() ["resource:///org/gnome/shell/ui/main.js":222]
                                                              21 start() ["resource:///org/gnome/shell/ui/main.js":124]
                                                              22 <TOP LEVEL> ["<main>":1]
мар 15 23:04:06 Raxacoricofallapatorius gnome-shell[2507]: Extension "shell-volume-mixer@derhofbauer.at" had error: TypeError: this._construct is not a function
ElectricPrism commented 5 years ago

This extension had breakage in the last few major versions which caused Gnome Shell Lockups FYI, even if they do get it working on 3.32 someone will need to comb through the logs as there are multiple problems which cause the desktop to not work properly.

It's actually good that it seems like it doesn't work at all instead of silently locking the system up like it did in 3.30.

aleho commented 5 years ago

This extension had breakage in the last few major versions

It worked for me on 3.28. So one last major version, 3.32 has barely seen the light of day.

even if they do get it working on 3.32

"He". There's exactly one developer working on this extension: me.

someone will need to comb through the logs as there are multiple problems which cause the desktop to not work properly.

Good idea! Want to lend a hand? It might just be about 10 or 20 hours of unpaid work provided you find the multiple issues.

Might have gotten it wrong, but you sound bitter. Take a step back, this is an open source project. Hours of unpaid work, Gnome making it hard to love an unwelcoming environment with a steep learning curve, and yet I'm still working on it. In my spare time, for fun. Your comment takes quite some fun out of it.

AlexWayfer commented 5 years ago

"He". There's exactly one developer working on this extension: me.

It's also the pronoun for unknown gender. 😉

Hours of unpaid work, Gnome making it hard to love an unwelcoming environment with a steep learning curve, and yet I'm still working on it. In my spare time, for fun.

Thank you for your efforts. This extension is great. 👏

Your comment takes quite some fun out of it.

I suggest you to not take close any negative. I guess, @ElectricPrism could mean something neutral, like "please, people, help us (and maintainer) to fix these problems". I see no offenses or anything like this, to be honest.

zhanghai commented 5 years ago

Hi Alexander, thanks for your extension! If you had time to dig into this, one of the issues should be:

GNOME Shell 3.32 removed Lang.class() and we should be using ES6 classes instead. See https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/361

I just did a fix for another extension and (if you want) you can take a look at what it would look like https://github.com/localvoid/gnome-shell-emacsmanager/pull/15

You can try my script https://github.com/DreaminginCodeZH/gnome-shell-es6-class-codemod if you want to automatically migrate to ES6 class syntax.

aleho commented 5 years ago

I've already done the ES6 migration, which is not the biggest issue.

The current challenge is to get all my monkey patching back in there, because the GNOME class hacks allowed for (dirty) omissions of super() calls in constructors. Unfortunately GNOME devs are really fond of doing setup in constructors, including widgets and event binding, so every class I extend from has to either not extend and copy/paste code if I don't want to go through the initialization, or go through it. The latter is even more problematic, because they e.g. use arrow functions in constructor bindings without saving the event ID, so I can never extend parent class behavior or unbind events in my classes (which shouldn't be bound in the first place).

Apparently GNOME's widget JS has never been designed for extension by other devs, and that's pretty bad architecture if you ask me.

Moreover there's the stale process of updating UI for the "new" native volume boost support, which I never finished in the dev branch.

jacobmischka commented 5 years ago

I greatly appreciate your work on this extension, thanks for the quick update. Do you have a paypal or other way of donating if someone wishes to? I'd like to show my appreciation in some way. Thanks again.

aleho commented 5 years ago

That's a very kind offer, thank you very much!

I actually don't have any expenses writing this extension (apart from devoting spare time), so please direct your donation towards a charity of your choice.

If you'd ask me, something about children and education would be very nice. If at least one child has the opportunity to get educated and starts hacking away at Open Source projects I'd be incredibly proud having been a tiny part of it.

rdlmda commented 4 years ago

This issue is closed, but I'm having the same issue with v21 (downloaded from Gnome Extensions) on Gnome 3.32.2.

This extension used to run fine until a few days ago. I'm not sure what have changed, but now it won't load, returning the following error message:

TypeError: this._construct is not a function.

I also get a system error alert, here are the relevant logs:

abr 22 18:22:28 bmo gnome-shell[8116]: Some code called array.toString() on a Uint8Array instance. Previously this would have interpreted the bytes of the array as a string, but that is nonstandard. In the future this will return the bytes as comma-separated digits. For the time being, the old behavior has been preserved, but please fix your code anyway to explicitly call ByteArray.toString(array).
(Note that array.toString() may have been called implicitly.)
0 getCards() ["/home/user/.local/share/gnome-shell/extensions/shell-volume-mixer@derhofbauer.at/utils.js":98]
1 _getCardDetails() ["/home/user/.local/share/gnome-shell/extensions/shell-volume-mixer@derhofbauer.at/mixer.js":336]
2 wrapper() ["resource:///org/gnome/gjs/modules/_legacy.js":82]
3 _init() ["/home/user/.local/share/gnome-shell/extensions/shell-volume-mixer@derhofbauer.at/mixer.js":49]
4 wrapper() ["resource:///org/gnome/gjs/modules/_legacy.js":82]
5 _Base.prototype._construct() ["resource:///org/gnome/gjs/modules/_legacy.js":18]
6 newClass() ["resource:///org/gnome/gjs/modules/_legacy.js":114]
7 enable() ["/home/user/.local/share/gnome-shell/extensions/shell-volume-mixer@derhofbauer.at/extension.js":48]
8 enableExtension() ["resource:///org/gnome/shell/ui/extensionSystem.js":131]
9 loadExtension() ["resource:///org/gnome/shell/ui/extensionSystem.js":177]
10 _loadExtensions/<() ["resource:///org/gnome/shell/ui/extensionSystem.js":324]
11 _emit() ["resource:///org/gnome/gjs/modules/signals.js":142]
12 _loadExtension() ["resource:///org/gnome/shell/misc/extensionUtils.js":244]
13 scanExtensions/<() ["resource:///org/gnome/shell/misc/extensionUtils.js":250]
14 collectFromDatadirs() ["resource:///org/gnome/shell/misc/fileUtils.js":25]
15 scanExtensions() ["resource:///org/gnome/shell/misc/extensionUtils.js":249]
16 _loadExtensions() ["resource:///org/gnome/shell/ui/extensionSystem.js":326]
17 enableAllExtensions() ["resource:///org/gnome/shell/ui/extensionSystem.js":334]
18 _sessionUpdated() ["resource:///org/gnome/shell/ui/extensionSystem.js":365]
19 init() ["resource:///org/gnome/shell/ui/extensionSystem.js":373]
20 _initializeUI() ["resource:///org/gnome/shell/ui/main.js":215]
21 start() ["resource:///org/gnome/shell/ui/main.js":124]
22 <TOP LEVEL> ["<main>":1]
abr 22 18:22:28 bmo gnome-shell[8116]: Extension "shell-volume-mixer@derhofbauer.at" had error: TypeError: this._construct is not a function
aleho commented 4 years ago

Are you using the version marked for 3.32 on extensions.gnome.org or a newer release?

rdlmda commented 4 years ago

The day you replied I couldn't find a specific version for 3.32 on extensions.gnome.org; today I removed the extension and found a 3.32 version on the site, which installed and works just fine.

I'm not sure if it was a glitch on my PC or if you upgraded something, but thanks anyway!

aleho commented 4 years ago

There probably was a wrong version delivered because GNOME doesn't block extensions to be used any more if versions mismatch.

I specifically marked the last known-good version for 3.32, so that should be fixed.

Due to extensive refactoring in Shell I currently cannot provide backwards compatible versions, there would be just too much mess to maintain.

rdlmda commented 4 years ago

No worries; it's a great and really useful project that you provide voluntarily. Thanks a lot for that!