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

Linux/Snap: Support underlying directories moved around at runtime #3793

Closed
1 task done
bast1aan opened this issue Dec 5, 2019 · 15 comments
Closed
1 task done

Linux/Snap: Support underlying directories moved around at runtime #3793

bast1aan opened this issue Dec 5, 2019 · 15 comments

Comments

@bast1aan
Copy link

bast1aan commented Dec 5, 2019

  • I have searched open and closed issues for duplicates

Bug Description

The Signal Desktop Snap app in Ubuntu 18.04 crashes after a running for a while with following error message:

Unhandled Error

Error: EACCES: permission denied, rename '/home/bwelmers/snap/signal-desktop/219/.config/Signal/logs/log.log.1' -> '/home/bwelmers/snap/signal-desktop/219/.config/Signal/logs/log.log.2'

When looking in the list of Signal snap versions:

/dev/loop7                              98M   98M     0 100% /snap/signal-desktop/219
/dev/loop10                             98M   98M     0 100% /snap/signal-desktop/235

it looks like the snap is upgraded in the background and somehow the running instance of Signal does not handle this correctly and keeps trying to use the older config directory.

Steps to Reproduce

Unfortunately not easy, but something like this

  1. install signal-desktop snap app and launch it, login to it, use it etc
  2. let it run until a new version is installed by snapd
  3. wait until the log needs to be rotated. Looks like that is done on daily basis.

Actual Result:

Crash

Expected Result:

Should not crash.

Screenshots

Screenshot_20191205_170501

Platform Info

Signal Version:

Name            Version  Rev  Tracking  Publisher     Notes
signal-desktop  1.29.0   235  stable    snapcrafters  -

Operating System:

Ubuntu 18.04

Linked Device Version:

Android: Signal 4.49.18

Link to Debug Log

https://debuglogs.org/604b3bb6f1cc01244899b902643643d3503981433d3377526d5f671b96b89c12

@bast1aan
Copy link
Author

bast1aan commented Dec 5, 2019

Duplicated issue to snapcrafters/signal-desktop#14 as well

@scottnonnenberg-signal scottnonnenberg-signal changed the title Snap app crashes if upgraded in the background Linux/Snap: Support underlying directories moved around at runtime Dec 5, 2019
@bajhn
Copy link

bajhn commented Dec 6, 2019

I am not so sure that an upgrade is necessary for the EACCES error on renaming the logs. I received the error this morning on a Linux Mint system that's been up for 4 days, and I cannot find any evidence that snap or signal was upgraded. The error occurred sometime between 5-dec-19 17:40 (local time, -05:00) and 6-dec-19 09:40. My dpkg.log ends at 5-dec-19 15:35. The journal shows that Snappy daemon restarted at 5-dec-19 11:34, and I don't remember restarting Signal since several days ago. I'm attaching journal output for snapd and the Signal logs. This hasn't happened in a while, but I'll be happy to provide any other info if it's useful.
signal-logs.tar.gz
snapd.service.log.gz

@scottnonnenberg-signal
Copy link
Contributor

We don't need logs - we need the structure and permissions of Signal-related directories when this happens. And ideally, what it was before. The theory is that this is due to directories being moved or deleted.

@Cristian-Bejan
Copy link

Same as @bast1aan ; snap made an update from 1.30.1 -> 1.31.0

Unhandled Error

Error: EACCES: permission denied, rename '/home/blabla/snap/signal-desktop/298/.config/Signal/logs/log.log' -> '/home/blabla/snap/signal-desktop/298/.config/Signal/logs/log.log.0'

@angelgruevski
Copy link

same issue here too.

@scottnonnenberg-signal
Copy link
Contributor

Thanks for your input, everyone. I want to be very clear - as of today we don't officially support the Signal Desktop snap packages available now.

@angelgruevski
Copy link

Will you support the Debian package or are you dropping support for that too?

@scottnonnenberg-signal
Copy link
Contributor

If this bug is reproducing for you outside the context of a snap package, please enter a new bug.

@johnmee
Copy link

johnmee commented Mar 19, 2020

It is trying to rotate the log file; (rename "log.log" to "log.log.0" then continue to writing to log.log) however the "home" plug does not have permission to do it. Is the fix just to add the log directory with "write" permission in the snapcraft.yaml?

https://snapcraft.io/docs/personal-files-interface

@dasistwas
Copy link

dasistwas commented Feb 20, 2021

Bug still there one year later:

Unhandled Error

Error: EACCES: permission denied, rename '/home/user/snap/signal-desktop/349/.config/Signal/logs/log.log.1' -> '/home/user/snap/signal-desktop/349/.config/Signal/logs/log.log.2'

@bajhn
Copy link

bajhn commented Feb 20, 2021

FWIW, I've been using the flatpak distribution from Linux Mint 20 for awhile now, and I haven't seen this error any longer. I had to uninstall the snap for it on one of my machines.

@LeadManPL
Copy link

This error is still present on Signal v5.6.1

Unhandled Error

Error: EACCES: permission denied, open '/home/patben/snap/signal-desktop/358/.config/Signal/ephemeral.json'
    at Object.openSync (fs.js:476:3)
    at Object.func [as openSync] (electron/js2c/asar_bundle.js:5:1846)
    at Object.writeFileSync (fs.js:1467:35)
    at Object.set ([REDACTED]/app.asar/app/base_config.js:48:8)
    at BrowserWindow.captureAndSaveWindowStats ([REDACTED]/app.asar/main.js:447:21)
    at invokeFunc ([REDACTED]/app.asar/node_modules/lodash/lodash.js:10401:23)
    at trailingEdge ([REDACTED]/app.asar/node_modules/lodash/lodash.js:10450:18)
    at Timeout.timerExpired [as _onTimeout] ([REDACTED]/app.asar/node_modules/lodash/lodash.js:10438:18)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7)

@hiqua
Copy link
Contributor

hiqua commented Jun 24, 2021

This is the wrong place to report this. Report it directly to the snap maintainers, unless you can reproduce it with the .deb (see #3793 (comment)).

https://github.com/snapcrafters/signal-desktop/issues

@bast1aan
Copy link
Author

It is alreay reported at snapcrafters/signal-desktop some time ago: snapcrafters/signal-desktop#14

@stale
Copy link

stale bot commented Sep 26, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

No branches or pull requests

10 participants