pajoma / vscode-journal

Lightweight journal and simple notes support for Visual Studio Code

Home Page:https://marketplace.visualstudio.com/items?itemName=pajoma.vscode-journal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error opening/creating journal files over remote connection

jannek opened this issue · comments

If a remote development method is used (ssh in this case), new journal file creation gives an error, but apparently succeeds as subsequent access to file location works fine.

Repro:

  • Open remote development connection to any Linux server over ssh with vscode-journal extension installed
  • Ctrl+Shift+J -> Today

If file does not already exist, following error is logged:

[09:58:07.054] [ERROR] 
[09:58:07.059] [ERROR] Failed to process input. See Exception below.
Error: cannot open vscode-remote://ssh-remote%2Bhost/path/to/Journal/2019/10/24.md. Detail: Unable to read file (Error: File not found (vscode-remote://ssh-remote+host/path/to/Journal/2019/10/24.md))
    at n.then.e (file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:4707:361)
    at process._tickCallback (internal/process/next_tick.js:68:7)

I was able to reproduce the error in a wsl-remote session, I got (standard installation in win10):

[10:52:00.454] [ERROR] 
[10:52:00.456] [ERROR] Failed to process input. See Exception below.
Error: cannot open vscode-remote://wsl%2Bubuntu/c/Users/[my user]/.vscode/extensions/ms-vscode-remote.remote-wsl-0.39.9/C%3A/Users/[my user]/Synced/Notizen/Journal/2019/10/24.md. Detail: Unable to read file (Error: File not found (vscode-remote://wsl+ubuntu/c/Users/[my user]/.vscode/extensions/ms-vscode-remote.remote-wsl-0.39.9/C:/Users/[my user]/Documents/Synced/Notizen/Journal/2019/10/24.md))
    at n.then.e (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4707:361)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Do you expect the journal file to be created in your local environment or on the remote server? The journal path from the settings is configured for your local environment only, it makes sense that the extension cannot find the path on the remote server.

In this case I expect the file to open on the remote server (my workspace is opened there), not sure how to properly configure this for general use case.

Did you notice that the file is created after all on remote, and can be opened without errors next time?

@jannek I am having the same issue. When I first try and open a new file, I get an error but after that if I try a second time it works without a problem. Hopefully this can be fixed because its a pain.

+1 I am also seeing the same issue. Here's what I see:

  1. I hit CTRL + Shift + J
  2. Error pops up
  3. After maybe 1 or 2 seconds, I see the file pop up in the file tree
  4. I hit CTRL + Shift + J again
  5. I get into my note for the day
  6. I close the big error message and move on with my day

It's livable, but annoying enough that I thought I would comment on the issue and see if I could help. Thanks!