PaperWM icon indicating copy to clipboard operation
PaperWM copied to clipboard

JS ERROR: TypeError: overlay.raise is not a function

Open mogenson opened this issue 4 years ago • 9 comments

Hello, I started getting some overlapping and transparent tiled windows this morning.

I see the following error messages in journalctl:

JS ERROR: TypeError: overlay.raise is not a function
setTarget@/usr/share/gnome-shell/extensions/paperwm@hedning:matrix.org/stackoverlay.js:411:21
fixOverlays@/usr/share/gnome-shell/extensions/paperwm@hedning:matrix.org/tiling.js:918:25
move_to@/usr/share/gnome-shell/extensions/paperwm@hedning:matrix.org/tiling.js:2623:11
ensureViewport@/usr/share/gnome-shell/extensions/paperwm@hedning:matrix.org/tiling.js:2570:5
switch@/usr/share/gnome-shell/extensions/paperwm@hedning:matrix.org/tiling.js:762:9
switchLeft@/usr/share/gnome-shell/extensions/paperwm@hedning:matrix.org/tiling.js:723:25
init/<@/usr/share/gnome-shell/extensions/paperwm@hedning:matrix.org/keybindings.js:137:63
_doAction@/usr/share/gnome-shell/extensions/paperwm@hedning:matrix.org/navigator.js:162:20
show@/usr/share/gnome-shell/extensions/paperwm@hedning:matrix.org/navigator.js:79:14
preview_navigate@/usr/share/gnome-shell/extensions/paperwm@hedning:matrix.org/navigator.js:327:14
asKeyHandler/<@/usr/share/gnome-shell/extensions/paperwm@hedning:matrix.org/keybindings.js:268:20
JS ERROR: TypeError: overlay.raise is not a function
setTarget@/usr/share/gnome-shell/extensions/paperwm@hedning:matrix.org/stackoverlay.js:411:21
fixOverlays@/usr/share/gnome-shell/extensions/paperwm@hedning:matrix.org/tiling.js:918:25
moveDone@/usr/share/gnome-shell/extensions/paperwm@hedning:matrix.org/tiling.js:859:14
_makeEaseCallback/<@resource:///org/gnome/shell/ui/environment.js:73:13
_easeActor/<@resource:///org/gnome/shell/ui/environment.js:147:56

I'm on the latest commit (as of now) on the develop branch. Gnome Shell 3.36.0, Arch Linux, and Wayland (edit 3/19).

mogenson avatar Mar 18 '20 15:03 mogenson

Hmm, that's pretty strange. We polyfill ClutterActor to provide raise (it was removed in 3.36), and if the polyfill actually failed things would crash on startup. overlay can't be undefined either, as we reference objects on it before we run raise.

Now arch have pulled in a bunch of commits from upstream on top of 3.36. So it's possible there's something there that cased the breakage, though I can't see anything obvious.

The errors could be incidental to the issue you describe though. I saw something similar today, but I'm running the clutter-dnd branch so assumed it was that (or some other code I had loaded).

hedning avatar Mar 18 '20 21:03 hedning

I've been trying to find a reliable way to reproduce this, but I cannot. Sometimes this behaviour will occur, and a log-out or reboot will solve it. I've been switching back and forth between the develop branch and this Arch AUR package (which is just the develop branch with an install script). I've been enabling and disabling combinations of other extensions to see if it's a conflict. Finally, I've been seeing if tiling one particular application triggers the exception. Wish I had more concrete information to provide.

I'll close this issue in a few days if I can't reproduce or the errors disappear.

mogenson avatar Mar 19 '20 13:03 mogenson

I've the same issue, it happened today after a reboot and I wasn't able to fix it. I'm also on arch and PaperWM is installed from the AUR package linked by @mogenson.

edoars avatar Apr 26 '20 17:04 edoars

It's worth trying a lock screen/relogin, that will trigger a disable/enable cycle, which can fix things. Though obviously not ideal.

hedning avatar Apr 26 '20 18:04 hedning

I tried logging out and rebooting with no luck, but after re-installing it manually the issue seems to be fixed. Strange, since the only difference from the AUR package should be a user extension rather than global.

edoars avatar Apr 26 '20 18:04 edoars

Right, if the extension didn't start correctly at all and there were messages about eg. raise not being a method I'd guess the aur extension was for some reason outdated.

hedning avatar Apr 26 '20 18:04 hedning

I've found a way to reliably trigger this error on Ubuntu 20.04.

I have 2 monitors:

  • left - 1920x1200 22 inch,
  • right - 1920x1200 24 inch.

How to reproduce:

  1. Close all windows/apps.
  2. Open Extensions app - it will be used to enable/disable PaperWM.
  3. Disable PaperWM using Extensions app.
  4. Open some other app, e.g. gedit.
  5. Enable PaperWM again.

The error below is raised.

If I have just Extensions application started then enabling PaperWM won't produce such error.

Error occured in paperwm startup:

overlay.raise is not a function

setTarget@/home/tester/.local/share/gnome-shell/extensions/paperwm@hedning:matrix.org/stackoverlay.js:414:21
fixOverlays@/home/tester/.local/share/gnome-shell/extensions/paperwm@hedning:matrix.org/tiling.js:918:25
moveDone@/home/tester/.local/share/gnome-shell/extensions/paperwm@hedning:matrix.org/tiling.js:859:14
layout@/home/tester/.local/share/gnome-shell/extensions/paperwm@hedning:matrix.org/tiling.js:477:18
init@/home/tester/.local/share/gnome-shell/extensions/paperwm@hedning:matrix.org/tiling.js:212:14
init/<@/home/tester/.local/share/gnome-shell/extensions/paperwm@hedning:matrix.org/tiling.js:1327:37
init@/home/tester/.local/share/gnome-shell/extensions/paperwm@hedning:matrix.org/tiling.js:1327:14
initWorkspaces@/home/tester/.local/share/gnome-shell/extensions/paperwm@hedning:matrix.org/tiling.js:2210:20

See attached (zipped) screencast screencast_ubuntu.zip. It also shows that when I move gedit to another workspace then another error metaWindow is undefined is raised.

Sometimes - rarely - I won't get an error when enabling PaperWM with two apps/windows. Overall I've found that enabling PaperWM with many apps/windows leads to really weird results.

Note that if PaperWM is already enabled then logging to Gnome does not raise any errors.

hipnoizz avatar Apr 27 '20 18:04 hipnoizz

I am also getting this consistently on Arch, but installed manually as per instructions on the README (though I have in the past had it installed via AUR so can't rule out an interaction there).

For me, it happens as soon as I open VS Code Insiders. That window becomes transparent, except while using Super+./, but then is transparent again as soon as shortcut is released. After that, multiple windows I attempt to open become transparent and inaccessible when focused. If I then disable PaperWM via the Terminal, the previously transparent window is kind of... vibrating?. It's like it's got conflicting coordinates and is jumping around erratically within a maybe 30px radius of it's correct location.

After re-enabling PaperWM, this is when I see the overlay.raise is not a function error, but I didn't see that until trying to restart PaperWM to resolve this issue. Unfortunately I am unable to not reproduce it, which means I have to keep PaperWM disabled in order to work.

This happened after about 2 months of not using this machine and doing an update of everything at once, so I made probably a pretty big version jump. Not sure if that has played a factor but mentioning in case it could be related...

bjeanes avatar Jul 03 '20 05:07 bjeanes

Got this on my Arch and did some tiny investigation with lg. It seems that raise_top is available on my installation (maybe some other extension?) so branch with prototype patching was never executed. Switching to if for each function fixed things for me

xanf avatar Jul 09 '20 07:07 xanf

Hey all, I suspect this issue is no longer valid due to #327. Please let us know if you are still seeing this, or are able to reproduce this.

jtaala avatar Mar 04 '23 02:03 jtaala