Wayland sessions crash with Gjs:ERROR:../gi/interface.cpp:101:bool InterfacePrototype::has_instance_impl(JSContext*, const JS::CallArgs&): assertion failed: (args[0].isObject()) from <email address hidden>/locations.js:1108

Bug #1960898 reported by AdlerHorst
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gjs (Ubuntu)
Fix Released
High
Marco Trevisan (Treviño)
gnome-shell-extension-ubuntu-dock (Ubuntu)
Fix Released
Low
Marco Trevisan (Treviño)

Bug Description

Hardware: https://linux-hardware.org/?probe=1055dc7082

Worked without Problem in 21.04
Had some flicker and problem with the left dock in 21.10
not working since updating to 22.04

now I'm running xorg.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: gnome-shell 41.3-1ubuntu1
ProcVersionSignature: Ubuntu 5.15.0-18.18-generic 5.15.12
Uname: Linux 5.15.0-18-generic x86_64
ApportVersion: 2.20.11-0ubuntu76
Architecture: amd64
CasperMD5CheckMismatches: ./pool/restricted/n/nvidia-graphics-drivers-450/libnvidia-gl-450_450.102.04-0ubuntu2_amd64.deb
CasperMD5CheckResult: fail
CurrentDesktop: ubuntu:GNOME
Date: Tue Feb 15 08:07:04 2022
DisplayManager: gdm3
InstallationDate: Installed on 2021-08-15 (183 days ago)
InstallationMedia: Ubuntu 21.04 "Hirsute Hippo" - Release amd64 (20210420)
RelatedPackageVersions: mutter-common 41.3-1ubuntu1
SourcePackage: gnome-shell
UpgradeStatus: Upgraded to jammy on 2022-02-14 (0 days ago)

Revision history for this message
AdlerHorst (adlerhorst) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks for the bug report.

Can you explain in more detail what is not working? Maybe with a photo or video?

Changed in gnome-shell (Ubuntu):
status: New → Incomplete
affects: gnome-shell (Ubuntu) → ubuntu
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Oh sorry, I see the problem:

[ 76.192764] Klappi org.gnome.Shell.desktop[3287]: Gjs:ERROR:../gi/interface.cpp:101:bool InterfacePrototype::has_instance_impl(JSContext*, const JS::CallArgs&): assertion failed: (args[0].isObject())
[ 76.201950] Klappi org.gnome.Shell.desktop[3287]: Bail out! Gjs:ERROR:../gi/interface.cpp:101:bool InterfacePrototype::has_instance_impl(JSContext*, const JS::CallArgs&): assertion failed: (args[0].isObject())
[ 76.202235] Klappi org.gnome.Shell.desktop[3287]: GNOME Shell crashed with signal 6
[ 76.202346] Klappi org.gnome.Shell.desktop[3287]: == Stack trace for context 0x560ede973210 ==
[ 76.202456] Klappi org.gnome.Shell.desktop[3287]: #0 560ee0d94590 i /<email address hidden>/locations.js:1108 (32b00966a330 @ 13)
[ 76.202558] Klappi org.gnome.Shell.desktop[3287]: #1 560ee0d944e8 i /<email address hidden>/locations.js:1180 (32b009663e70 @ 33)
[ 76.202650] Klappi org.gnome.Shell.desktop[3287]: #2 560ee0d94448 i /<email address hidden>/locations.js:1235 (32b009663ce0 @ 127)
[ 76.202743] Klappi org.gnome.Shell.desktop[3287]: #3 560ee0d943b8 i /<email address hidden>/locations.js:1150 (32b00966a150 @ 15)

affects: ubuntu → mutter (Ubuntu)
affects: mutter (Ubuntu) → gnome-shell (Ubuntu)
Changed in gnome-shell (Ubuntu):
status: Incomplete → New
summary: - Since Update to Jelly Wayland do not work
+ Wayland sessions crash with Gjs:ERROR:../gi/interface.cpp:101:bool
+ InterfacePrototype::has_instance_impl(JSContext*, const JS::CallArgs&):
+ assertion failed: (args[0].isObject())
Revision history for this message
AdlerHorst (adlerhorst) wrote (last edit ): Re: Wayland sessions crash with Gjs:ERROR:../gi/interface.cpp:101:bool InterfacePrototype::has_instance_impl(JSContext*, const JS::CallArgs&): assertion failed: (args[0].isObject())

1.) Start Ubuntu
2.) Login
3.) Gnome-Shell appear for a short time
4.) I end back on the login screen
5.) I change to xorg and log in succesfully

I reportat this on:
https://discourse.ubuntu.com/t/since-update-to-jelly-wayland-do-not-anymore-work/26681

According to the feedback i got I Created this bug-report with 'ubuntu-bug gnome-shell'
now I try to do 'ubuntu-bug /var/crash/_usr_bin_gnome-shell.1000.crash'

I got the feedback, that it was already reportet on:
https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1959507

So I'm currently not sure if it is a duplicate or not.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please run this command:

  gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false

and then reboot. Has that solved the problem?

no longer affects: gnome-shell (Ubuntu)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

If the problem is not fixed by comment #5 then please log into a Xorg session and run:

  journalctl -b0 > journal.txt

and attach the resulting text file here.

Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
status: New → Incomplete
summary: Wayland sessions crash with Gjs:ERROR:../gi/interface.cpp:101:bool
InterfacePrototype::has_instance_impl(JSContext*, const JS::CallArgs&):
- assertion failed: (args[0].isObject())
+ assertion failed: (args[0].isObject()) from ubuntu-
+ dock@ubuntu.com/locations.js:1108
Revision history for this message
AdlerHorst (adlerhorst) wrote :

#5 "gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false" helped. Login now work.

Thanks a lot.

tags: added: rls-jj-incoming
Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
importance: Undecided → High
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
status: Incomplete → New
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Once you've enabled the mount point again, could you please tell me what are you mountable devices?

In any case it would be helpful if you could manually edit (just use sudo with your editor) the file /<email address hidden>/locations.js so that it contains at around line 1108 (just after the initVolumePromises() definition):

print('o', object)
print('oc', object?.constructor)
print('ocp', object?.constructor?.prototype)

Then post the content of your journal here.

Another test you could do is try to remove these lines at all:

  if (!(object instanceof Gio.Volume) || object.constructor.prototype._d2dPromisified)
    return;

(or probably just remove '!(object instanceof Gio.Volume) ||').

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This bug shouldn't be given High priority. There are no other reports of it, even on errors.ubuntu.com

Revision history for this message
AdlerHorst (adlerhorst) wrote :

1.) Did first test from Marco trevisan
2.) after that I run 'gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts true'
3.) than restarted to Wayland
4.) got back to xorg exported the data with journalctl -b0 >Journal.txt
5.) this file is around 3MB in size so I compacted it to journal.tar.xz

Revision history for this message
AdlerHorst (adlerhorst) wrote :

May importante. I use Wireguard and have a mounted sft there. Since my update to 21.10 it do not work anymore.
Goal here is to have imediately after login a mounted drive.
I never found a recommended way how to automount a network drive in Ubuntu.

$HOME/.local/share/systemd/user/
contain a .mount and .automout file with folowing content.

.mount
___________
[Unit]
Description=Speicher einbinden

[Install]
WantedBy=multi-user.target

[Mount]
What=USER@SERVER-IP:/
Where=/media/USER/Mountpoint
Type=fuse.sshfs
Options=_netdev,allow_other,IdentityFile=/home/USER/.ssh/SSH-FILE,reconnect,ServerAliveInterval=15,ServerAliveCountMax=10,uid=1000,gid=1000
TimeoutSec=60

.automount
___________
[Unit]
Description=Auto Speicher einbinden

[Install]
WantedBy=multi-user.target

[Automount]
Where=/media/USER/sieben

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote (last edit ):

AlderHorst, thanks for the feedback.

So gjs in this case should definitely not crash, and I've fixed it there [1] (will prepare a package soon).

I'm quite curious to understand how is possible that Gio would emit a null device in such case, but that's another issue I'll have to handle.

I'll try to simulate your setup but maybe can you provide the output of this script?
https://www.pastery.net/menmxf/

Just save it in disk and run it with `gjs gio-mounts-debug.js`.

IIRC I noticed during development that it could happen that we may get a case where a Mount is added but its relative GVolume isn't set (yet).

[1] https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/726
[1a] https://gitlab.gnome.org/GNOME/gjs/-/issues/464

Changed in gjs (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
status: New → In Progress
Changed in gjs (Ubuntu):
status: In Progress → Fix Committed
tags: added: fixed-in-gjs-1.71.2 fixed-upstream
Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
status: New → Opinion
Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
status: Opinion → Won't Fix
Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
status: Won't Fix → In Progress
Changed in gjs (Ubuntu):
importance: Medium → High
Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
importance: High → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-shell-extension-ubuntu-dock - 72~ubuntu2

---------------
gnome-shell-extension-ubuntu-dock (72~ubuntu2) jammy; urgency=medium

  [ Marco Trevisan (Treviño) ]
  * schemas/10_ubuntu-dock.gschema.override: Remove hardcoded theme
  * debian/rules: Also provide an empty yaru.css file
  * debian: Support make check via eslint
  * locations: Assign location to a const variable
  * cleanup: Fix style to follow basic eslint rules
  * cleanup: Fix case declaration scope
  * .eslintrc: Add basic eslint rule to check main issues
  * make: Add check case and use it before generating zip-file
  * docking: Try to use g-s current-workspace-only before monitor isolation
  * utils: Only block signal events for GObject classes
  * locations: Do not try to add null volumes from valid mounts (LP: #1960898)
  * locations: Ensure that cancellable is set during finally stanza
  * prefs: Ensure display combo box is updated on settings changes
  * prefs: Add support to show in GNOME 42 libadwaita-based dialog
  * utils: Support vfunc injections on newer GObject classes as per gjs 1.71
  * stylesheet: Use the same padding in both the sides in extended mode
  * stylesheet: Do not shrink too much border radius and edge paddings
  * stylesheet: Increase the side margin in shrink floating mode
  * appIconIndicators: Use native actor rotation to rotate the drawing area
  * appIconIndicators: Ensure that the drawing area is always a square

  [ Stephen Gibbel ]
  * Adds an intellihide mode for always-on-top (on non-fullscreen windows)

  [ Sergio Costas ]
  * Reset margins when 'intellihide' is disabled

 -- Marco Trevisan (Treviño) <email address hidden> Thu, 24 Feb 2022 22:33:25 +0100

Changed in gnome-shell-extension-ubuntu-dock (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gjs - 1.71.1-1

---------------
gjs (1.71.1-1) experimental; urgency=medium

  * New upstream release:
    - New JavaScript features! This version of GJS is based on SpiderMonkey 91
      For more information, look them up on MDN or devdocs.io
    - It's now possible to pass BigInt values to GObject-introspected functions
      with 64-bit parameters
  * debian/patches: Cherry-pick upstream test fixes
  * debian/patches: Do not crash on instanceof checks on interfaces
    (LP: #1960898)
  * debian/patches: Correctly handle later handled promises rejections
  * debian/control: Bump dependency on mozjs-91
  * debian/libgjs0g.symbols: Include new symbols

 -- Marco Trevisan (Treviño) <email address hidden> Tue, 22 Feb 2022 12:26:43 +0100

Changed in gjs (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers