dendronhq / dendron

The personal knowledge management (PKM) tool that grows as you do!
https://wiki.dendron.so
Apache License 2.0
6.77k stars 260 forks source link

Extension not working #3099

Open boazdori opened 2 years ago

boazdori commented 2 years ago

Please select the area your bug applies to. (Multiple selections are Possible. You can leave blank if you're not sure.)

Describe the bug

  1. When starting VS Code, I am getting an error message {} with no description in the pop-up messages. The Extension it maps to is the dendron extension.
  2. I leave VS Code OPEN and remove the dendron extension after which I run reload.
  3. I reinstalled the extension and the extension starts working.

To Reproduce

Steps to reproduce the behavior:

  1. Start Dendron
  2. Get {}
  3. Uninstall Dendron and reload
  4. reinstall Dendron and it starts working

Expected behavior

Open VS Code and Dendron works

Screenshots

image

Desktop (please complete the following information)

Additional context

Add any other context about the problem here.

Dendron Log file

Please attach the output of > Dendron:Dev: Open Logs here

jonathanyeung commented 2 years ago

Thanks for the report @boazdori - the next time you encounter the issue, could you run > Dendron: Dev: Open Logs and include the output here?

Could you also include the contents of your dendron.yml file? This should be in the same directory as the dendron.code-workspace file that is the workspace file VS Code has open when you're in a Dendron workspace.

boazdori commented 2 years ago

Jonathan hi,

  1. How do I run the dev or is it a folder in ~Documents/Dendron? If so, I have a Log folder under the Dendron directory but the files there are dated 24/12/2021 they are not current.
  2. dendron.yml version: 5 dev: enablePreviewV2: true commands: lookup: note: selectionMode: extract confirmVaultOnCreate: false leaveTrace: false bubbleUpCreateNew: true fuzzThreshold: 0.2 vaultSelectionModeOnCreate: smart randomNote: {} insertNote: initialValue: templates insertNoteLink: aliasMode: none enableMultiSelect: false insertNoteIndex: enableMarker: false copyNoteLink: {} workspace: vaults:

        fsPath: vault

    journal: dailyDomain: daily name: journal dateFormat: y.MM.dd addBehavior: childOfDomain scratch: name: scratch dateFormat: y.MM.dd.HHmmss addBehavior: asOwnDomain task: name: '' dateFormat: '' addBehavior: childOfCurrent statusSymbols: '': ' ' wip: w done: x assigned: a moved: m blocked: b delegated: l dropped: d pending: 'y' prioritySymbols: H: high M: medium L: low todoIntegration: false createTaskSelectionType: selection2link graph: zoomSpeed: 1 enableAutoCreateOnDefinition: false enableXVaultWikiLink: false enableRemoteVaultInit: true enableUserTags: true enableHashTags: true workspaceVaultSyncMode: noCommit enableAutoFoldFrontmatter: false enableEditorDecorations: true maxPreviewsCached: 10 maxNoteLength: 204800 dendronVersion: 0.83.0 preview: enableFMTitle: true enableNoteTitleForLink: true enableMermaid: true enablePrettyRefs: true enableKatex: true automaticallyShowPreview: false publishing: enableFMTitle: true enableNoteTitleForLink: true enableMermaid: true enablePrettyRefs: true enableKatex: true copyAssets: true siteHierarchies:

    • root enableSiteLastModified: true siteRootDir: docs enableFrontmatterTags: true enableHashesForFMTags: false enableRandomlyColoredTags: true duplicateNoteBehavior: action: useVault payload:
      • vault writeStubs: false seo: title: Dendron description: Personal knowledge space github: enableEditLink: true editLinkText: Edit this page on GitHub editBranch: main editViewMode: tree enablePrettyLinks: true
  3. Currently the problem happens every time I start the computer and freshly start VS Code. Thanks Boaz
boazdori commented 2 years ago

I tried running Dendron: Dev after opening and got the following error. dendron run dev

If I remove Dendron and Refresh following Dendron reinstallation, I can operate Dendron: Dev: this is the log I get: {"level":30,"time":1655639821924,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"Logger:configure","msg":"exit","logLevel":"info"} {"level":30,"time":1655639822031,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"_activate","stage":"prod","isDebug":false,"logLevel":"info","logPath":"c:\Users\User\AppData\Roaming\Code\logs\20220619T144726\exthost1\dendron.dendron","extensionPath":"c:\Users\User\.vscode\extensions\dendron.dendron-0.99.0","extensionUri":"c:\Users\User\.vscode\extensions\dendron.dendron-0.99.0","workspaceFile":"c:\Users\User\Dendron\dendron.code-workspace","workspaceFolders":["c:\Users\User\Dendron\notes"]} {"level":30,"time":1655639822033,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"No cache path for Segment specified. Failed event uploads will not be retried."} {"level":30,"time":1655639822034,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"user telemetry setting: enabled by config"} {"level":30,"time":1655639822034,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"telemetry initializing"} {"level":30,"time":1655639822034,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"using existing id"} {"level":30,"time":1655639822035,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"anonymous id","anonymousId":"8YfskbmuP1eiujikDCzCn"} {"level":30,"time":1655639822039,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"DendronExtension","msg":"initialized"} {"level":30,"time":1655639822053,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"_activate","msg":"initializeWorkspace","wsType":"CODE","currentVersion":"0.99.0","previousGlobalVersion":"0.99.0","extensionInstallStatus":"NO_CHANGE"} {"level":30,"time":1655639822066,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"user telemetry setting: enabled by config"} {"level":30,"time":1655639822066,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"telemetry initializing"} {"level":30,"time":1655639822066,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"using existing id"} {"level":30,"time":1655639822066,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"anonymous id","anonymousId":"8YfskbmuP1eiujikDCzCn"} {"level":30,"time":1655639822066,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","msg":"Telemetry is disabled? false"} {"level":30,"time":1655639822067,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","msg":"Segment Residual Cache Path is at c:\Users\User\AppData\Roaming\Code\User\globalStorage\dendron.dendron\segmentresidualcache.log"} {"level":30,"time":1655639822067,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"Attempting to flush residual segment data from file."} {"level":30,"time":1655639822071,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"runMigrationsIfNecessary","changes":[],"workspaceInstallStatus":"NO_CHANGE"} {"level":30,"time":1655639822081,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"_activate","platform":"win32","extensions":[{"id":"dendron.dendron","version":"0.99.0","active":true},{"id":"dendron.dendron-paste-image","version":"1.1.0","active":false},{"id":"dendron.dendron-markdown-shortcuts","version":"0.12.1","active":true},{"id":"redhat.vscode-yaml","version":"1.8.0","active":true}],"vaults":[{"fsPath":".","selfContained":true,"name":"Dendron"}]} {"level":30,"time":1655639822083,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"execServer","state":"enter"} {"level":30,"time":1655639822101,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"execServer","state":"post:exec.node"} {"level":30,"time":1655639822828,"pid":13368,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"No cache path for Segment specified. Failed event uploads will not be retried."} {"level":30,"time":1655639822828,"pid":13368,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"user telemetry setting: enabled by config"} {"level":30,"time":1655639822829,"pid":13368,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"telemetry initializing"} {"level":30,"time":1655639822829,"pid":13368,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"using existing id"} {"level":30,"time":1655639822829,"pid":13368,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"anonymous id","anonymousId":"8YfskbmuP1eiujikDCzCn"} {"level":30,"time":1655639822848,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"execServer","state":"message","message":"53228"} {"level":30,"time":1655639822848,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"WSUtils.handleServerProcess","msg":"subprocess running","pid":13368} {"level":30,"time":1655639822849,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"startServerProcess","msg":"post-start-server","port":53228,"durationStartServer":794} {"level":30,"time":1655639822853,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"logger","ctx":"FileStorageV2","wsRoot":"c:\Users\User\Dendron","vaults":[{"fsPath":".","selfContained":true,"name":"Dendron"}],"level":"info"} {"level":30,"time":1655639822855,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"TreeView:getChildren","msg":"reconstructing tree: enter"} {"level":30,"time":1655639822855,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"TreeView:getChildren","msg":"reconstructing tree: exit"} {"level":30,"time":1655639822860,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"dendron.reloadIndex:run","msg":"pre-execute"} {"level":30,"time":1655639822860,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"ReloadIndex.execute","msg":"enter"} {"level":30,"time":1655639822949,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"ReloadIndex.execute","durationEngineInit":85} {"level":30,"time":1655639822949,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"ReloadIndex.execute","msg":"exit"} {"level":30,"time":1655639822949,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"dendron.reloadIndex:run","msg":"post-execute"} {"level":30,"time":1655639822956,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"reloadWorkspace","msg":"post-ws.reloadWorkspace"} {"level":30,"time":1655639822957,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"reloadWorkspace","msg":"exit"} {"level":30,"time":1655639822957,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"postReloadWorkspace","msg":"same wsVersion"} {"level":30,"time":1655639822957,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"postReloadWorkspace","msg":"exit"} {"level":30,"time":1655639822958,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"setupViews","msg":"init:treeViewV2"} {"level":30,"time":1655639822958,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"setupBacklinkTreeView","msg":"init:backlinks"} {"level":30,"time":1655639823014,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"activateWorkspace","stage":"prod","msg":"enter"} {"level":30,"time":1655639823017,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"togglePluginActiveContext","state":"togglePluginActiveContext: true"} {"level":30,"time":1655639823017,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"_activate","msg":"fin startClient","durationReloadWorkspace":907} {"level":30,"time":1655639823018,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"showWelcomeOrWhatsNew","version":"0.99.0","previousExtensionVersion":"0.91.0"} {"level":30,"time":1655639836307,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"TreeView:getChildren","msg":"reconstructing tree: enter"} {"level":30,"time":1655639836309,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"TreeView:getChildren","msg":"reconstructing tree: exit"} {"level":30,"time":1655639837975,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","msg":"sendSavedAnalytics"} {"level":30,"time":1655639837975,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"AnalyticsUtils.sendSavedAnalytics","message":"start"} {"level":30,"time":1655639850380,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"dendron.dev.openLogs:run","msg":"pre-execute"} {"level":30,"time":1655639850380,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"execute","opts":{}} {"level":30,"time":1655639850400,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"dendron.dev.openLogs:run","msg":"post-execute"} {"level":30,"time":1655639850608,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"WindowWatcher:onDidChangeVisibleTextEditors","editorPaths":["c:\Users\User\AppData\Roaming\Code\logs\20220619T144726\exthost1\dendron.dendron\dendron.log"]} {"level":30,"time":1655639850634,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"CalendarView:openTextDocument","uri":"c:\Users\User\AppData\Roaming\Code\logs\20220619T144726\exthost1\dendron.dendron\dendron.log","msg":"not in workspace"} {"level":30,"time":1655639850634,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"refreshBacklinksChangeActiveTextEditor"} {"level":30,"time":1655639850637,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"GraphPanel(side):openTextDocument","uri":"c:\Users\User\AppData\Roaming\Code\logs\20220619T144726\exthost1\dendron.dendron\dendron.log","msg":"not in workspace"} {"level":30,"time":1655639850642,"pid":25284,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"WorkspaceWatcher:onFirstOpen","msg":"enter","fname":"dendron.log"}

jonathanyeung commented 2 years ago

Hi @boazdori - apologies for the late follow up. Thanks for sending me the data, but I'm still a bit stumped as to why this is happening. The dendron.yml config is correct, and the log looks clean (although this is the log set for when it actually works).

When you reinstall Dendron, it's able to load - but as soon as you restart VS Code (or your computer), then it consistently stops working until you uninstall/reinstall the Dendron extension?

One piece of info that may help - the log file you pasted will just get appended to - so when your extension starts failing, although you won't be able to run > Dendron: Dev: Open Logs, perhaps some more useful logs will get appended to the log file. If you jot down the file path, then send over the contents of the file after you get the {} error, then I can maybe see if any logs got appended during the failed initialization try?

Sorry about this, appreciate the patience.

boazdori commented 2 years ago

Jonathan hi, --When you reinstall Dendron, it's able to load - but as soon as you restart VS Code (or your computer), then it consistently stops working until you uninstall/reinstall the Dendron extension? This is what is happening

boazdori commented 2 years ago

Jonathan hi, This is the dendron.log just after the extension stopes working when closing and opening VS Code: {"level":30,"time":1655815702366,"pid":21720,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"Logger:configure","msg":"exit","logLevel":"info"} {"level":30,"time":1655815702407,"pid":21720,"hostname":"BD-Lenovo-P14s","name":"dendron","ctx":"_activate","stage":"prod","isDebug":false,"logLevel":"info","logPath":"c:\Users\User\AppData\Roaming\Code\logs\20220621T154812\exthost1\dendron.dendron","extensionPath":"c:\Users\User\.vscode\extensions\dendron.dendron-0.100.0","extensionUri":"c:\Users\User\.vscode\extensions\dendron.dendron-0.100.0","workspaceFile":"c:\Users\User\Dendron\dendron.code-workspace","workspaceFolders":["c:\Users\User\Dendron\notes"]} {"level":30,"time":1655815702598,"pid":21720,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"No cache path for Segment specified. Failed event uploads will not be retried."} {"level":30,"time":1655815702599,"pid":21720,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"user telemetry setting: enabled by config"} {"level":30,"time":1655815702599,"pid":21720,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"telemetry initializing"} {"level":30,"time":1655815702599,"pid":21720,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"using existing id"} {"level":30,"time":1655815702599,"pid":21720,"hostname":"BD-Lenovo-P14s","name":"SegmentClient","msg":"anonymous id","anonymousId":"r6prwpyvij5fg7kxjwozd94"} {"level":50,"time":1655815702624,"pid":21720,"hostname":"BD-Lenovo-P14s","name":"dendron","stack":"TypeError: e.update is not a function\n at t.e.captureSession (c:\Users\User\.vscode\extensions\dendron.dendron-0.100.0\dist\extension.js:2:823498)\n at d._sendSessionUpdate (c:\Users\User\.vscode\extensions\meshintelligenttechnologiesinc.pieces-vscode-0.1.12\dist\extension.js:2:589001)\n at d.endSession (c:\Users\User\.vscode\extensions\meshintelligenttechnologiesinc.pieces-vscode-0.1.12\dist\extension.js:2:588461)\n at d.startSession (c:\Users\User\.vscode\extensions\meshintelligenttechnologiesinc.pieces-vscode-0.1.12\dist\extension.js:2:588846)\n at Module.It (c:\Users\User\.vscode\extensions\dendron.dendron-0.100.0\dist\extension.js:2:846854)\n at t.initializeSentry (c:\Users\User\.vscode\extensions\dendron.dendron-0.100.0\dist\extension.js:2:236146)\n at Ca (c:\Users\User\.vscode\extensions\dendron.dendron-0.100.0\dist\extension.js:8:3387037)","type":"Error","msg":"e.update is not a function"}

jonathanyeung commented 2 years ago

Hi @boazdori - thanks for sending over the info.

From the error log, I see traces of some other extension that may be interfering with Dendron's start up: meshintelligenttechnologiesinc.pieces-vscode-0.1.12. If you try uninstalling this other extension, can Dendron start up properly?

boazdori commented 2 years ago

Jonathan hi, Ok, works now! The problem is interference from the extension Pieces once removed Dendron working as normal. The workaround is to have vs code and vs codium installed on the same computer use codium with dendron and code with the rest. Again Thanks Boaz

jonathanyeung commented 2 years ago

@boazdori - great to hear!

For my reference, is this the Pieces extension? https://marketplace.visualstudio.com/items?itemName=MeshIntelligentTechnologiesInc.pieces-vscode

boazdori commented 2 years ago

Jonathan hi, Yes it is Boaz

On Thu, Jun 23, 2022, 10:07 jonathanyeung @.***> wrote:

@boazdori https://github.com/boazdori - great to hear!

For my reference, is this the Pieces extension? https://marketplace.visualstudio.com/items?itemName=MeshIntelligentTechnologiesInc.pieces-vscode

— Reply to this email directly, view it on GitHub https://github.com/dendronhq/dendron/issues/3099#issuecomment-1164034741, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGIYBTGYUFFZEEBC3PJBZ7DVQQEM7ANCNFSM5Y53ZKMQ . You are receiving this because you were mentioned.Message ID: @.***>