question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Most of applications don't recover

See original GitHub issue
  • Ubuntu 19.04
  • Node v10.16.3

Opera:

zerdox@zerdox-A320M-H:~$ lwsm restore
Status: "Opera developer.Opera developer" is running: false 1 0
Starting: Opera developer.desktop
Status: "google-chrome-unstable.Google-chrome-unstable" is running: false 1 0
Starting: google-chrome-unstable.desktop
Status: "gnome-terminal-server.Gnome-terminal" is running: true 1 0
Wait for all applications to start
events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: spawn Opera ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Visual Studio:

zerdox@zerdox-A320M-H:~$ lwsm restore
Status: "gnome-terminal-server.Gnome-terminal" is running: true 1 0
Status: "Opera developer.Opera developer" is running: true 1 0
Status: "code - insiders.Code - Insiders" is running: false 1 0
Starting: code - insiders.desktop
Wait for all applications to start
events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: spawn code ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)

I guess 19.04 is not supported? Any alternatives?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:23 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ZerdoX-xcommented, Sep 28, 2019

And using xprop in this case is bad practise:

zerdox@zerdox-A320M-H:~$ xprop | grep "WM_CLASS(STRING)"
WM_CLASS(STRING) = "Opera developer", "Opera developer"

But I would need “Opera developer.Opera developer”

I tried just to copy result of xprop and just put dot between to names, but this is not working with other apps, it’s more reliable to copy name from lwsm log after saving session

1reaction
ZerdoX-xcommented, Sep 28, 2019

How to recognise problem:

  • Your applications can’t restore (e.g. Error: spawn Opera ENOENT)
  • When you save session there are a lot of lines of text (screenshot below)

image

DO NOT TRUST LAST LINE SAVED SESSION: test — that’s not true.

How to fix problem:

  1. Find name of your application in this log (e.g. “Opera developer.Opera developer”) image

  2. Find .desktop file of your application

    • You can do it like this from cli: locate *<keyword of application's name>*.desktop
      zerdox@zerdox-A320M-H:~$ locate *opera*.desktop
      /usr/share/applications/opera-developer.desktop
      
    • Or you can locate into your applications directory and find it there: image
  3. Write name of your application from first paragraph and your .desktop file’s name into ~/.lwsm/config.json like this Find “WM_CLASS_AND_EXECUTABLE_FILE_MAP” object and put in it a new value

"WM_CLASS_AND_EXECUTABLE_FILE_MAP": {
    ...
    ...
    "Opera developer.Opera developer": "opera-developer.desktop",
},
  1. Save session again (make sure you have closed every window except problematic application)
zerdox@zerdox-A320M-H:~$ lwsm save test
SAVED SESSION: test

Now, when you got only one line SAVED SESSION: test you can restore session. Now you have added this application to config.

If you will try to save and restore session with two or more problematic apps, your config.json may resets to it’s default, you need to add applications one by one.

And finally, when you have added all apps to config, you can use lwsm correctly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to recover the programs disappeared from the All ...
First find the running file of the specific program, create a shortcut, and then paste it under the path of "C:\Documents and Settings\All...
Read more >
How to restore game data & fix other errors in Google Play ...
On your Android phone or tablet, open the Play Store app · Search for the game and open its detail page. · Under...
Read more >
Windows 11 Apps Not Opening/Working! Here Are the Fixes
Repair/Reset/Reinstall the app that won't work or open. Run the Application Identity service. Run the Windows Update Service.
Read more >
Built-in apps that you can delete from your device
Restore a built-in app that you deleted · On your iOS or iPadOS device, go to the App Store. · Search for the...
Read more >
How to restore apps on iPhone? | [Updated 2022 Solutions]
The most useful way to recover purchased apps is via the Purchased ... Often restoring lost apps is not enough if you don't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found