gistpad icon indicating copy to clipboard operation
gistpad copied to clipboard

Errors when existing repository used backlink syntax for tags

Open jmiddour opened this issue 4 years ago • 1 comments

Describe the bug I'm getting error messages when attempting to create, update, or delete files from an existing github repo. however, the actions seem to be working. if I close and reopen the repo, the changes are there. It is a foam repo that I'm trying out gistPad on.

this is the error

[2021-11-11 08:39:33.158] [exthost] [error] TypeError: Cannot read property 'backLinks' of undefined
	at Object.t.updateTree (c:\Users\.vscode-insiders\extensions\vsls-contrib.gistfs-0.3.0\dist\extension.js:51:114858)
	at processTicksAndRejections (internal/process/task_queues.js:93:5)
	at async S (c:\Users\.vscode-insiders\extensions\vsls-contrib.gistfs-0.3.0\dist\extension.js:31:83322)
	at async Object.t.addRepoFile (c:\Users\.vscode-insiders\extensions\vsls-contrib.gistfs-0.3.0\dist\extension.js:31:80604) gistpad.addRepositoryFile {"value":"vsls-contrib.gistfs","_lower":"vsls-contrib.gistfs"}
[2021-11-11 08:40:38.641] [exthost] [error] Error (FileSystemError): Unable to write file 'repo:/journal/2021-11-11.md?repo=githuborg/foam' (TypeError: Cannot read property 'backLinks' of undefined)
	at _handleError (c:\Users\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:94:164295)
	at runMicrotasks (<anonymous>)
	at processTicksAndRejections (internal/process/task_queues.js:93:5) gistpad.openTodayPage {"value":"vsls-contrib.gistfs","_lower":"vsls-contrib.gistfs"}
[2021-11-11 08:42:07.105] [exthost] [error] TypeError (FileSystemError): Cannot read property 'backLinks' of undefined
	at _handleError (c:\Users\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:94:164295)
	at runMicrotasks (<anonymous>)
	at processTicksAndRejections (internal/process/task_queues.js:93:5) gistpad.deleteRepositoryFile {"value":"vsls-contrib.gistfs","_lower":"vsls-contrib.gistfs"}

Desktop (please complete the following information):

  • VS Code Version 1.63.0-insider
  • GistPad Version v0.3.0

Additional context Based on the error and behavior, I suspect that it's something that foam doesn't set when creating a repo, but gistPad does. A decent work around would just be knowing how update the repo so that gistPad is ok. Long term enhancement might be a foam->gistPad repo conversion, but I doubt it's worth the work at this point.

jmiddour avatar Nov 11 '21 13:11 jmiddour

~~To test out, I created a new repo straight from gistPad and do not get the errors. I'm swapping my theory to there being files in the foam repo (maybe because it's meant to be published?) that gistPad doesn't know what to do with.~~

Updating bug report above, I found exactly what the issue is

jmiddour avatar Nov 11 '21 14:11 jmiddour

This should be fixed in the latest release. Let me know if you're still encountering the issue. Thanks!

lostintangent avatar Dec 10 '23 01:12 lostintangent