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.

Cannot save session

See original GitHub issue

👻 Brief Description

Saving session with som applications fails

🥞 Action version

lwsm save SESSION_NAME

Steps To Reproduce

Steps to reproduce the behavior:

  1. Open lots of apps (Tilix, Nautilus, Gedit perhaps the culprits)
  2. lwsm save SESSION_NAME

🚓 Expected behavior

Session should be saved and later restored by lwsm restore SESSON_NAME

➕ Additional context

Pop!_OS 20.04, 20.10 Kernel 5.8, 5.11

Here’s the stdout from a save after I removed the re-throw of the exception (so that it would proceed with save and throw all exceptions):

lwsm save common-energy
lwsm 4.0.5 --> save Tue Jul 06 2021 10:18:06 GMT-0400 (Eastern Daylight Time)

 Trying alternative guessing approach for "gnome".....
ERR: findDesktopFile() cant find file "gnome-calendar.desktop"! Searched desktopFileLocations: [
  '{home}/.local/share/applications',
  '{home}/.gnome/apps',
  '/usr/share/applications',
  '/usr/local/share/applications',
  '/usr/share/app-install',
  '{home}/.config/autostart',
  '/var/lib/snapd/desktop/applications',
  '/var/lib/flatpak/app',
  '/var/lib/flatpak/exports/share/applications',
  '{home}/.local/share/flatpak/exports/share/applications',
  '/snap/bin',
  '{home}/.local/share/applications',
  '{home}/.gnome/apps',
  '/usr/share/applications',
  '/usr/local/share/applications',
  '/usr/share/app-install',
  '{home}/.config/autostart',
  '/var/lib/snapd/desktop/applications',
  '/var/lib/flatpak/app',
  '/var/lib/flatpak/exports/share/applications',
  '/snap/bin'
]
ERR: findDesktopFile() cant find file "tilix.desktop"! Searched desktopFileLocations: [
  '{home}/.local/share/applications',
  '{home}/.gnome/apps',
  '/usr/share/applications',
  '/usr/local/share/applications',
  '/usr/share/app-install',
  '{home}/.config/autostart',
  '/var/lib/snapd/desktop/applications',
  '/var/lib/flatpak/app',
  '/var/lib/flatpak/exports/share/applications',
  '{home}/.local/share/flatpak/exports/share/applications',
  '/snap/bin',
  '{home}/.local/share/applications',
  '{home}/.gnome/apps',
  '/usr/share/applications',
  '/usr/local/share/applications',
  '/usr/share/app-install',
  '{home}/.config/autostart',
  '/var/lib/snapd/desktop/applications',
  '/var/lib/flatpak/app',
  '/var/lib/flatpak/exports/share/applications',
  '/snap/bin'
]
ERR: findDesktopFile() cant find file "chromium-browser.desktop"! Searched desktopFileLocations: [
  '{home}/.local/share/applications',
  '{home}/.gnome/apps',
  '/usr/share/applications',
  '/usr/local/share/applications',
  '/usr/share/app-install',
  '{home}/.config/autostart',
  '/var/lib/snapd/desktop/applications',
  '/var/lib/flatpak/app',
  '/var/lib/flatpak/exports/share/applications',
  '{home}/.local/share/flatpak/exports/share/applications',
  '/snap/bin',
  '{home}/.local/share/applications',
  '{home}/.gnome/apps',
  '/usr/share/applications',
  '/usr/local/share/applications',
  '/usr/share/app-install',
  '{home}/.config/autostart',
  '/var/lib/snapd/desktop/applications',
  '/var/lib/flatpak/app',
  '/var/lib/flatpak/exports/share/applications',
  '/snap/bin'
]
ERR: findDesktopFile() cant find file "gedit.desktop"! Searched desktopFileLocations: [
  '{home}/.local/share/applications',
  '{home}/.gnome/apps',
  '/usr/share/applications',
  '/usr/local/share/applications',
  '/usr/share/app-install',
  '{home}/.config/autostart',
  '/var/lib/snapd/desktop/applications',
  '/var/lib/flatpak/app',
  '/var/lib/flatpak/exports/share/applications',
  '{home}/.local/share/flatpak/exports/share/applications',
  '/snap/bin',
  '{home}/.local/share/applications',
  '{home}/.gnome/apps',
  '/usr/share/applications',
  '/usr/local/share/applications',
  '/usr/share/app-install',
  '{home}/.config/autostart',
  '/var/lib/snapd/desktop/applications',
  '/var/lib/flatpak/app',
  '/var/lib/flatpak/exports/share/applications',
  '/snap/bin'
]
ERR: findDesktopFile() cant find file "gedit.desktop"! Searched desktopFileLocations: [
  '{home}/.local/share/applications',
  '{home}/.gnome/apps',
  '/usr/share/applications',
  '/usr/local/share/applications',
  '/usr/share/app-install',
  '{home}/.config/autostart',
  '/var/lib/snapd/desktop/applications',
  '/var/lib/flatpak/app',
  '/var/lib/flatpak/exports/share/applications',
  '{home}/.local/share/flatpak/exports/share/applications',
  '/snap/bin',
  '{home}/.local/share/applications',
  '{home}/.gnome/apps',
  '/usr/share/applications',
  '/usr/local/share/applications',
  '/usr/share/app-install',
  '{home}/.config/autostart',
  '/var/lib/snapd/desktop/applications',
  '/var/lib/flatpak/app',
  '/var/lib/flatpak/exports/share/applications',
  '/snap/bin'
]
ERR: findDesktopFile() cant find file "mattermost.desktop"! Searched desktopFileLocations: [
  '{home}/.local/share/applications',
  '{home}/.gnome/apps',
  '/usr/share/applications',
  '/usr/local/share/applications',
  '/usr/share/app-install',
  '{home}/.config/autostart',
  '/var/lib/snapd/desktop/applications',
  '/var/lib/flatpak/app',
  '/var/lib/flatpak/exports/share/applications',
  '{home}/.local/share/flatpak/exports/share/applications',
  '/snap/bin',
  '{home}/.local/share/applications',
  '{home}/.gnome/apps',
  '/usr/share/applications',
  '/usr/local/share/applications',
  '/usr/share/app-install',
  '{home}/.config/autostart',
  '/var/lib/snapd/desktop/applications',
  '/var/lib/flatpak/app',
  '/var/lib/flatpak/exports/share/applications',
  '/snap/bin'
]
ERR: findDesktopFile() cant find file "tilix.desktop"! Searched desktopFileLocations: [
  '{home}/.local/share/applications',
  '{home}/.gnome/apps',
  '/usr/share/applications',
  '/usr/local/share/applications',
  '/usr/share/app-install',
  '{home}/.config/autostart',
  '/var/lib/snapd/desktop/applications',
  '/var/lib/flatpak/app',
  '/var/lib/flatpak/exports/share/applications',
  '{home}/.local/share/flatpak/exports/share/applications',
  '/snap/bin',
  '{home}/.local/share/applications',
  '{home}/.gnome/apps',
  '/usr/share/applications',
  '/usr/local/share/applications',
  '/usr/share/app-install',
  '{home}/.config/autostart',
  '/var/lib/snapd/desktop/applications',
  '/var/lib/flatpak/app',
  '/var/lib/flatpak/exports/share/applications',
  '/snap/bin'
]
Generic Error in Meta Wrapper ERR: findDesktopFile() cant find file "gnome-calendar.desktop"! Searched desktopFileLocations: undefined
Generic Error in Meta Wrapper ERR: findDesktopFile() cant find file "tilix.desktop"! Searched desktopFileLocations: undefined
Generic Error in Meta Wrapper ERR: findDesktopFile() cant find file "chromium-browser.desktop"! Searched desktopFileLocations: undefined
Generic Error in Meta Wrapper ERR: findDesktopFile() cant find file "gedit.desktop"! Searched desktopFileLocations: undefined
Generic Error in Meta Wrapper ERR: findDesktopFile() cant find file "gedit.desktop"! Searched desktopFileLocations: undefined
Generic Error in Meta Wrapper ERR: findDesktopFile() cant find file "mattermost.desktop"! Searched desktopFileLocations: undefined
Generic Error in Meta Wrapper ERR: findDesktopFile() cant find file "tilix.desktop"! Searched desktopFileLocations: undefined

 Trying alternative guessing approach for "Gnome-calendar".....

 Trying alternative guessing approach for "Tilix".....

 Trying alternative guessing approach for "Chromium-browser".....

 Trying alternative guessing approach for "Gedit".....

 Trying alternative guessing approach for "Gedit".....

 Trying alternative guessing approach for "Mattermost".....

 Trying alternative guessing approach for "Tilix".....
ERR _guessFilePath() null
(node:930146) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'stack' of null
    at _catchGenericErr$1 (/home/curiouser/.nvm/versions/node/v14.16.0/lib/node_modules/linux-window-session-manager/dist/index.js:1084:61)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:930146) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 8)
(node:930146) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

 Alternative guessing approach for "Gedit" SUCCESS -> /usr/bin/gedit

 Alternative guessing approach for "Gedit" SUCCESS -> /usr/bin/gedit
ERR _guessFilePath() null
(node:930146) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'stack' of null
    at _catchGenericErr$1 (/home/curiouser/.nvm/versions/node/v14.16.0/lib/node_modules/linux-window-session-manager/dist/index.js:1084:61)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:930146) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 9)

 Alternative guessing approach for "Tilix" SUCCESS -> tilix

 Alternative guessing approach for "Gnome-calendar" SUCCESS -> /usr/bin/gnome-calendar

 Alternative guessing approach for "gnome" SUCCESS -> /usr/bin/nautilus
Generic Error in Main Handler TypeError: Cannot read property 'stack' of null
    at _catchGenericErr$1 (/home/curiouser/.nvm/versions/node/v14.16.0/lib/node_modules/linux-window-session-manager/dist/index.js:1084:61)
    at processTicksAndRejections (internal/process/task_queues.js:93:5) TypeError: Cannot read property 'stack' of null
    at _catchGenericErr$1 (/home/curiouser/.nvm/versions/node/v14.16.0/lib/node_modules/linux-window-session-manager/dist/index.js:1084:61)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
Generic Error in Main Handler TypeError: Cannot read property 'stack' of null
    at _catchGenericErr$1 (/home/curiouser/.nvm/versions/node/v14.16.0/lib/node_modules/linux-window-session-manager/dist/index.js:1084:61)
    at processTicksAndRejections (internal/process/task_queues.js:93:5) TypeError: Cannot read property 'stack' of null
    at _catchGenericErr$1 (/home/curiouser/.nvm/versions/node/v14.16.0/lib/node_modules/linux-window-session-manager/dist/index.js:1084:61)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:930146) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 9)
(node:930146) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 8)

 Alternative guessing approach for "Tilix" SUCCESS -> tilix
saveSessionForDisplayToDb: no session file present yet for "common-energy", creating a new one...
SAVED SESSION: common-energy

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
curiousercreativecommented, Jul 7, 2021

@johannesjo it would be a separate PR, but I have added this mapping to my config file for user installed flatpak Chromium: "chromium-browser.Chromium-browser": "org.chromium.Chromium.desktop"

0reactions
johannesjocommented, Dec 12, 2021

Thanks. How you can work around this is to manually provide a mapping for gedit in the main config file under ~/.config/lwsm/config.json. There under the key WM_CLASS_AND_EXECUTABLE_FILE_MAP you should add "gedit.Gedit": "org.gnome.gedit.desktop",.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PHP Session not Saving - Stack Overflow
session_save_path is defined in php.ini file. Probably in your testing server it is a folder writable by apache but in your server it...
Read more >
Fix: PHP sessions not saving. - This Interests Me
This is the most common cause of session data not saving. It is also the easiest to fix. Basically, PHP's session_start function MUST...
Read more >
Can't save sessions · Issue #866 · sienori/Tab-Session-Manager
Installed it once because of tab group support and managed to save 1 session a couple months ago. Now it just fails to...
Read more >
I cannot save a Circuit Session - Novation Help Centre
If you turn on Circuit and the save button is NOT lit, this means saving is disabled. To enable save just hold SHIFT...
Read more >
Error :Session state has created a session id, but cannot save ...
Exception message: Session state has created a session id, but cannot save it because the response was already flushed by the application. I...
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