Quantcast
Viewing all articles
Browse latest Browse all 6180

"Expected type string for argument 'domain' but got type undefined" error in gnome shell extension

I'm trying to run a gnome extension using the code from this guide https://gjs.guide/extensions/upgrading/legacy-documentation.html#extensionUbuntu 22.04, GNOME 42.9, wayland

contents of extension.js (copied from the above link):

const St = imports.gi.St;const ExtensionUtils = imports.misc.extensionUtils;const Me = ExtensionUtils.getCurrentExtension();const Main = imports.ui.main;const PanelMenu = imports.ui.panelMenu;const {gettext: _,} = ExtensionUtils;class Extension {enable() {    // Create a panel button    this._indicator = new PanelMenu.Button(0.0, Me.metadata.name, false);    // Add an icon    const icon = new St.Icon({        icon_name: 'face-laugh-symbolic',        style_class: 'system-status-icon',    });    this._indicator.add_child(icon);    // Add the indicator to the panel    Main.panel.addToStatusArea(Me.metadata.uuid, this._indicator);    // Add a menu item to open the preferences window    this._indicator.menu.addAction(_('Preferences'),        () => ExtensionUtils.openPrefs());    this._count = 0;}disable() {    if (this._indicator) {        this._indicator.destroy();        this._indicator = null;    }}}function init() {ExtensionUtils.initTranslations();return new Extension();}

contents of metadata.json:

{"uuid": "example@gjs.guide","name": "Example Extension","description": "An example extension","shell-version": [ "42.9" ],"url": "https://gjs.guide/extensions"}

The error:

Image may be NSFW.
Clik here to view.
enter image description here


Viewing all articles
Browse latest Browse all 6180

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>