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

Snap leads to Error: Cannot find module '../dialog' #30

Closed
johannesjo opened this issue Nov 22, 2017 · 12 comments
Closed

Snap leads to Error: Cannot find module '../dialog' #30

johannesjo opened this issue Nov 22, 2017 · 12 comments
Labels

Comments

@johannesjo
Copy link
Owner

@HarmtH

Your Environment

  • Version used: 1.4.2 (snap)
  • Operating System and version: Ubuntu 17.10
  • Desktop Environment: Gnome

Expected Behavior

Should not throw an error.

Current Behavior

I don't know if this is the same issue, but if I try to start the application, while it is still running (window is closed, but icon still in the notification area), it won't show the main window. This is with the Ubuntu snap package under Ubuntu 17.10.

blackbox ~% superproductivity 
Gtk-Message: Failed to load module "overlay-scrollbar"
Gtk-Message: Failed to load module "gail"
Gtk-Message: Failed to load module "atk-bridge"
Gtk-Message: Failed to load module "canberra-gtk-module"
module.js:487
    throw err;
    ^

Error: Cannot find module '../dialog'
    at Module._resolveFilename (module.js:485:15)
    at Function.Module._resolveFilename (/snap/superproductivity/5/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.get [as dialog] (/snap/superproductivity/5/resources/electron.asar/browser/api/exports/electron.js:11:16)
    at process.<anonymous> (/snap/superproductivity/5/resources/electron.asar/browser/init.js:54:31)
    at emitOne (events.js:115:13)
    at process.emit (events.js:210:7)
    at process._fatalException (bootstrap_node.js:338:26)

Steps to Reproduce (for bugs)

@johannesjo
Copy link
Owner Author

This is likely related to #27.

@johannesjo johannesjo added the bug label Nov 22, 2017
@johannesjo
Copy link
Owner Author

johannesjo commented Nov 23, 2017

Does installing some dependencies help: apt-get install libatk-adaptor libgail-common as pointed out here: https://askubuntu.com/questions/548557/how-to-install-gail-and-atk-bridge? I just tried it with a fresh ubuntu install and only the canberra-gtk-module is missing there (which doesn't seem to be required anyway).

@johannesjo
Copy link
Owner Author

Also I am curios if maybe the deb package is working for you. Could you check if installing the dependencies doesn't help?

@Stolexiy
Copy link

I faced the same issue on Fedora 27

Gtk-Message: Failed to load module "pk-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
module.js:487
    throw err;
    ^

Error: Cannot find module '../dialog'
    at Module._resolveFilename (module.js:485:15)
    at Function.Module._resolveFilename (/snap/superproductivity/5/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.get [as dialog] (/snap/superproductivity/5/resources/electron.asar/browser/api/exports/electron.js:11:16)
    at process.<anonymous> (/snap/superproductivity/5/resources/electron.asar/browser/init.js:54:31)
    at emitOne (events.js:115:13)
    at process.emit (events.js:210:7)
    at process._fatalException (bootstrap_node.js:338:26)

@johannesjo
Copy link
Owner Author

johannesjo commented Nov 29, 2017

Could you try installing the newest version? The issue should be fixed there. Closing this for now. Please let me know if the issue persists.

@v6ak
Copy link

v6ak commented Mar 5, 2018

I've tried the latest version on Debian 9, but it fails the same way:

~% superproductivity 
module.js:487
    throw err;
    ^

Error: Cannot find module '../dialog'
    at Module._resolveFilename (module.js:485:15)
    at Function.Module._resolveFilename (/snap/superproductivity/5/resources/electron.asar/common/reset-    search-paths.js:35:12)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.get [as dialog] (/snap/superproductivity/5/resources/electron.asar/browser/api/exports    /electron.js:11:16)
at process.<anonymous> (/snap/superproductivity/5/resources/electron.asar/browser/init.js:54:31)
at emitOne (events.js:115:13)
at process.emit (events.js:210:7)
at process._fatalException (bootstrap_node.js:338:26)

@johannesjo
Copy link
Owner Author

Thanks for reporting! I'll try to look into this weekend.

@v6ak
Copy link

v6ak commented Mar 5, 2018

However, deleting ~/snap has fixed the issue. I hope it will not occur again.

@johannesjo
Copy link
Owner Author

That's... Interesting! Deleting snap in your home folder fixed the issue??

@v6ak
Copy link

v6ak commented Mar 5, 2018 via email

@v6ak
Copy link

v6ak commented Mar 5, 2018

Hmm, so I have tried to create 10 disposable VMs and install and run SP using the following command:

qvm-run '$dispvm' 'sudo snap install superproductivity && while true; do /snap/bin/superproductivity; done'

I've also tried to close all the instances of SP (so they were restarted due to the while cycle), still cannot reproduce.

But I can reproduce it simply by trying to run two instances. Well, if I had read the original post better… Also, removing the ~/snap “helps”, because it allows to run a second instance, probably due to removing some pidfile/lockfile…

@johannesjo
Copy link
Owner Author

johannesjo commented Mar 5, 2018

Weird definitely! Thanks for digging into this. I'm pretty new to snap and I don't really use it myself, so I'm unfortunately not able to do much with that info atm, but I'm sure it will be very useful if someone else encounters that error (I understood that it is kind of working for you now). Until then I just hope that this more of a rare edge case ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants