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

No logging in case of failure #14

Closed
Gilthans opened this issue Dec 11, 2017 · 13 comments
Closed

No logging in case of failure #14

Gilthans opened this issue Dec 11, 2017 · 13 comments

Comments

@Gilthans
Copy link

Gilthans commented Dec 11, 2017

I've tried running the script (BTW, I recommend adding sudo apt-get install nodejs to the installation instructions :) ), but when I run 'lwsm save', move around a few windows, and 'lwsm restore', nothing happens and nothing is printed.
There weren't logs anywhere I could find, so I guess the request is more verbose failure so that I can know something went wrong (during save? during restore?), and have some tool to figure out the problem.
I'd be glad to post another issue with log information for my particular problem afterwards

@johannesjo
Copy link
Owner

Are you using Wayland by any chance. Pure Wayland applications are simply not recognized (and currently it seems there is no way around it :()

@Gilthans
Copy link
Author

I'm using unity, which isn't over Wayland I believe? Either way it is probably a good idea to check and give an error, maybe?

@johannesjo
Copy link
Owner

Normally error logging should work. There are a lot of promises though. Might be that something gets swallowed there. I'll check tomorrow.

Could you maybe give me a little bit more of context? What applications do you have opened and what is saved inside ~/.lwsm?

@Gilthans
Copy link
Author

Gilthans commented Dec 11, 2017 via email

@johannesjo
Copy link
Owner

Mhh that's interesting. Could you run mkdir ~/.lwsm && mkdir ~/.lwsm/sessionData and try again? If that doesn't work trying to save with just one or two apps might be helpful to be see if the issue is related to a particular app or occurs every time.

@Gilthans
Copy link
Author

Creating the folders didn't seem to help, the folders are still empty after running lwsm save and lwsm restore with no message.
Closing apps would sort of defeat the purpose of trying to save the current setup which takes a while to bring up... But I'll try that later

@johannesjo
Copy link
Owner

I checked all promise occurrences and added catch handlers. Hopefully everything is covered now.

@Gilthans
Copy link
Author

Was it uploaded to npm already or should I clone into the repo?

@johannesjo
Copy link
Owner

johannesjo commented Dec 13, 2017 via email

@Gilthans
Copy link
Author

This didn't work, so I updated nodejs and that seemed to solve the problem.
Now I get this:

/usr/local/lib/node_modules/linux-window-session-manager/cmd.js:3
const base = require('./lib/index');
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3

@johannesjo
Copy link
Owner

Äh what version of nodejs to you have installed now?

@Gilthans
Copy link
Author

node -v returns v0.10.25

@Gilthans
Copy link
Author

Yeah, so it seems there is something wrong with my app repo configurations which gave all this trouble. After manually installing node v8.9.3 everything seems to work perfectly.
Thanks very much!

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

No branches or pull requests

2 participants