[dropbox-linux] File closes automatically for no reason while typing

Steps to reproduce

  • Open obsidian
  • Open any file
  • Start typing
  • The file closes while typing at irregular intervals

Expected result

  • I expect the file not to close

Actual result

  • The file closes

Environment

  • Operating system: NixOS
  • Obsidian version: 0.8.2
  • Syncing with: Dropbox

Additional information

I’ve taken a screen recording of the file closing, also showing the console (which shows no output). I couldn’t upload the file here in this forum, but I’ve uploaded it to these two services:

This does not appear to happen when Dropbox is not running. So there must be some interference with dropbox that’s causing the files in obsidian to close.

are you executing some keyboard shortcut, either in normal mode or vim mode, to close the pane?

I’m in vim mode, just typing. Since it doesn’t happen as long as Dropbox is closed I assume that I’m not accidentally hitting some keyboard shortcut to close it.

does this happen if you keep dropbox open but not syncing?

I tried creating a new page with Dropbox running and syncing and the pane closes. For some reason I end up with conflicting files in my dropbox folder:

.rw-r--r--@   23 stian 12 Aug 16:18 test page (nixos-node's conflicted copy 2020-08-12).md
.rw-r--r--@   27 stian 12 Aug 16:18 test page (nixos-node's conflicted copy 2020-08-12 1).md
.rw-r--r--@   18 stian 12 Aug 16:18 test page.md

I also tried to keep Dropbox running and pause syncing. Then everything works as expected. The pane does not close. I’m able to create a new file and type without the file closing.

this may be a problem of dropbox. Why do you have conflicted copies?
Are you editing the same file in two computers at the same time?

No, I’m not editing the same file in two computers at the same time. I do have Dropbox in multiple units, but only one has been on at the same time.

I imagine that I get conflicting copies due to some conflict between obsidian and dropbox. Note that this started happening yesterday. I think I got version 0.8.2 and then this started happening.

How do you run Obsidian in Nix, with Appimage-run? I wonder if it’s a weirdness from there conflicting with Dropbox somehow

Here’s the current derivation: https://github.com/NixOS/nixpkgs/blob/48dfc9fa97d762bce28cc8372a2dd3805d14c633/pkgs/applications/misc/obsidian/default.nix. The logic that handles the appimage is here: https://github.com/NixOS/nixpkgs/blob/48dfc9fa97d762bce28cc8372a2dd3805d14c633/pkgs/build-support/appimage/default.nix. That logic seems to trigger this bash script: https://github.com/NixOS/nixpkgs/blob/48dfc9fa97d762bce28cc8372a2dd3805d14c633/pkgs/build-support/appimage/appimage-exec.sh.

I suspect however that it’s the way I’m running Dropbox that’s the issue; That I somehow end up with two Dropbox-instances running which complicates things. I’ll try to monitor things more closely.

I do remember that I did have a case of 2 dropbox instance running at the same time since I added dropbox and dropbox-cli, I though the CLI would just give me cli access but apparently it also pulls the full thing in Nix. So it could be possible that you have something else pulling dropbox somewhere yeah. I’m still fairly new at Nix though so not sure I can help debug more than that

1 Like

Thank you for the help! I’m still quite new to nix myself so I won’t be surprised if I’ve done something wrong. I’ll report back what I figure out.