deltachat-desktop icon indicating copy to clipboard operation
deltachat-desktop copied to clipboard

No logfolder or logfile created in Windows (store) version

Open havet opened this issue 3 years ago • 7 comments

Hi, wanted to have a look in the logfile because some messages got lost. Couldn't find any logs.

  • Operating System (Linux/Mac/Windows/iOS/Android): Windows 10

  • Delta Chat Version: 1.15.3

  • Expected behavior: logfile/logfolder opened in explorer with: View - Developer - Open the log folder/current logfile

  • Actual behavior: Error message: C:\users ... DeltaChat/logs is not accessible ...

  • Steps to reproduce the problem: Se expected behavior

  • Screenshots: see below Error

  • Logs: NO.

havet avatar Apr 06 '21 14:04 havet

Maybe the windows store version saves its files somewhere else? we should investigate this further

Simon-Laux avatar Apr 07 '21 12:04 Simon-Laux

I've looked in various places, but have not found anything related to Delta Chat. Maybe you'll have to look in the code? I haven't so far.

On Wed, Apr 7, 2021, at 14:22, Simon Laux wrote:

Maybe the windows store version saves its files somewhere else? we should investigate this further

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/deltachat/deltachat-desktop/issues/2209#issuecomment-814870257, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZJY2LWRWDCHCLXTAVP6VTTHRFAZANCNFSM42OZ66VQ.

havet avatar Apr 07 '21 14:04 havet

Looking for in deltachat code would be a waste of time, because its not in it - we get the directories from https://www.npmjs.com/package/application-config#config-location, so maybe its somewhere in there or just some kind of appx-sandboxing applies by windows: My thinking was that the windows store version might use some sandboxing and stores the apps files in a separate location - in that case we need to adjust the logic in our code that the button also works correctly in the windows store version.

Simon-Laux avatar Apr 07 '21 19:04 Simon-Laux

so appx does include additional sandboxing: https://docs.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-behind-the-scenes but I couldn't find where it saves the appdata files to on that docpage other than that it is a private per-user, per-app location

Simon-Laux avatar Sep 19 '21 15:09 Simon-Laux

found them: C:\Users\XXXXXX\AppData\Local\Packages\merlinux.DeltaChat_v2ry5hvxhdhyy\LocalCache\Local\DeltaChat\logs

looks like we need an if statement to change the path when on the windows store version.

Simon-Laux avatar Sep 19 '21 18:09 Simon-Laux

Just found out that this also affects opening blob files: they cannot be found, because the application opening them is not in the sandbox Deltachat is in (with being an appx/uwp) HTML emails work, because they are copies in a temporary directory first.

But this particular issue will probably disappear once core moves the blobfiles to the db, because then we have to copy those files to temporary directories anyway.

CC @r10s @link2xt @hpk42

Simon-Laux avatar Jan 09 '22 00:01 Simon-Laux

so in the new version it works (open the right logfile), but only if deltachat was not installed before not via installer.

Simon-Laux avatar Apr 08 '22 12:04 Simon-Laux