Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sound.js imports from bad path, on x86_64 #5

Closed
ferdnyc opened this issue Nov 20, 2017 · 1 comment
Closed

sound.js imports from bad path, on x86_64 #5

ferdnyc opened this issue Nov 20, 2017 · 1 comment
Labels
bug An issue that is confirmed as a bug

Comments

@ferdnyc
Copy link
Member

ferdnyc commented Nov 20, 2017

sound.js contains the following code, to force the import path for Gvc:

const GIRepository = imports.gi.GIRepository;
GIRepository.Repository.prepend_search_path("/usr/lib/gnome-shell");
GIRepository.Repository.prepend_library_path("/usr/lib/gnome-shell");
const Gvc = imports.gi.Gvc;

That fails, at least on my system (Fedora 26 x86_64), with the following message logged to the journal:

Nov 20 01:10:06 teevey gjs[24225]: JS ERROR: Error: Requiring Gvc, version none: Typelib file for namespace 'Gvc' (any version) not found
                                   @/home/ferd/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/sound.js:14:7
                                   @/home/ferd/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/service/plugins/telephony.js:33:7
                                   Daemon<._getIdentityPacket@/home/ferd/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/service/daemon.js:17
                                   wrapper@resource:///org/gnome/gjs/modules/lang.js:178:22
                                   Daemon<.vfunc_startup@/home/ferd/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/service/daemon.js:605:25
                                   wrapper@resource:///org/gnome/gjs/modules/lang.js:178:22
                                   Daemon<._init@/home/ferd/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/service/daemon.js:90:9
                                   wrapper@resource:///org/gnome/gjs/modules/lang.js:178:22
                                   @/home/ferd/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/service/daemon.js:649:2

This is because /usr/lib/gnome-shell/ is an invalid path, and the Gvc-1.0.typelib file lives in /usr/lib64/gnome-shell/. Changing sound.js to use /usr/lib64/gnome-shell eliminates the error.

@andyholmes andyholmes added the bug An issue that is confirmed as a bug label Nov 20, 2017
@andyholmes
Copy link
Collaborator

prepend_search_path() and prepend_library_path() don't throw exceptions, so it should be safe just to add more. I think this will fix it, thanks for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that is confirmed as a bug
Projects
None yet
Development

No branches or pull requests

2 participants