Skip to content

Data loss - "ValidationError" #43

@idf3d

Description

@idf3d

The issue is intermitted - I'm not able to isolate reproduction scenario. But I encounter it every few days and it very frustrating.

How it usually happens:

  1. Create a new note (A)
  2. Type some text
  3. Switch to other note (B)
  4. Switch back to note A - verify that text from step 2 is present
  5. Edit text of note A for prolonged period, like 10 minutes or so
  6. Switch to some other note
  7. Switch to note A

Expected results:

All edited text is present.

Actual Results

Note A has only text from step 2. All later edits are lost. This is very frustrating.

Additional info

  • Once the data is lost, changing note A, switching to another note and switching back to A reproduces the issue every time, until restart of Obsidian
  • Once the data is lost, switching to note A does not show the "Decryption in progress..." dialog, but switching to any other note shows it

Errors

Today, after the issue happened again, I opened dev.tools in obsidian and I see this exception:

ValidationError: Мектеп folder not in path, ignoring.
    at FolderInSettingValidator.validate (plugin:gpg-crypt:9759:13)
    at eval (plugin:gpg-crypt:9856:55)
    at t.tryTrigger (app.js:1:801765)
    at t.trigger (app.js:1:801698)
    at t.trigger (app.js:1:2540524)
    at t.onFileContextMenu (app.js:1:2970642)
    at t.openFileContextMenu (app.js:1:2971023)
    at HTMLDivElement.s (enhance.js:1:10558) 'Мектеп'

It is shown twice, I tried to set breakpoint in the validate function and it is not invoked.
The Мектеп is actual name of the folder, which contains affected note. After restart I am able to create and edit notes in this folder.

It looks like the error is from the main.ts, another invocation of it is covered with encryptAll check. But I'm not sure if this is actually cause the issue. I tried to do right-click on the Мектеп folder and I see this exception, but Obsidian works properly, it does not causes immediate reproduction of the scenario.

Apart from that, I see following error:

GET app://3[...]1/Users/[...]/../vault_name/private.asc?[..some numbers...] net::ERR_FILE_NOT_FOUND, it is thrown loadKeyPair->getFileContentExternal, but seems like this error is shown every time on start, regardless if plugin works properly or not. So I guess this one is harmless. Note, that private.asc does not exists - I don't know why plugin tries to load it.

Configuration

  • encrypt all notes - on
  • encrypt folder - I didn't added any
  • use gpg extension - off
  • file recovery format - "encrypted"
  • compatibility mode - off
  • backend - CLI wrapper
  • executable - /opt/local/bin/gpg
  • always trust - turned off
  • compression - on
  • cache - off
  • show decryption dialog - on

Obsidian 1.9.12, gpgCrypt 0.6.0, gpg 2.4.8.
I update everything regularly, the issue was present in older versions also.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions