Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Foam Graph is blank #499

Closed
pyreton opened this issue Feb 25, 2021 · 12 comments · Fixed by #502
Closed

Foam Graph is blank #499

pyreton opened this issue Feb 25, 2021 · 12 comments · Fixed by #502
Labels
bug Something isn't working foam-dataviz Related to data visualization

Comments

@pyreton
Copy link

pyreton commented Feb 25, 2021

Open Foam Graph opens the panel, but it is blank. My best guess is this is because I am on the VSCode for Insiders build in order to get native M1 Apple Silicon support. (Foam Graph worked fine on previous Intel laptop using standard VSCode)

@ValentinTrinque
Copy link

Not on M1, but graph is also blank.

  macOS :                Big Sur 11.2.1
  Model Name:	MacBook Pro
  Model Identifier:	MacBookPro11,1
  Processor Name:	Dual-Core Intel Core i5

VS Code

Version: 1.53.2
Commit: 622cb03f7e070a9670c94bae1a45d78d7181fbd4
Date: 2021-02-11T11:45:54.515Z
Electron: 11.2.1
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Darwin x64 20.3.0

Foam 0.10.2

@pyreton pyreton changed the title Foam Graph is blank (M1 bug?) Foam Graph is blank Feb 25, 2021
@danieljue
Copy link

Same issue here on Windows 10 64bit, was working a couple days ago.

Version: 1.53.0 (user setup)
Commit: 8490d3dde47c57ba65ec40dd192d014fd2113496
Date: 2021-02-03T20:36:38.611Z
Electron: 11.2.1
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Windows_NT x64 10.0.19042

@danieljue
Copy link

Also just updated to vscode 1.53.2, same issue.
Version: 1.53.2 (user setup)
Commit: 622cb03f7e070a9670c94bae1a45d78d7181fbd4
Date: 2021-02-11T11:48:04.245Z
Electron: 11.2.1
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Windows_NT x64 10.0.19042

@riccardoferretti
Copy link
Collaborator

Can you see if anything shows up in the Foam log? https://github.com/foambubble/foam/blob/master/docs/features/foam-logging-in-vscode.md

@riccardoferretti riccardoferretti added bug Something isn't working foam-dataviz Related to data visualization labels Feb 26, 2021
@ValentinTrinque
Copy link

@riccardoferretti

[error - 10:21:34 AM] An error occurred in the graph view
{
  "message": "Uncaught TypeError: Cannot read property 'id' of undefined",
  "filename": "vscode-webview-resource://5a811484-39da-4d25-9fdb-1bd349196e93/file///Users/val/.vscode/extensions/foam.foam-vscode-0.10.2/static/graphs/default/graph.js",
  "lineno": 233,
  "colno": 24,
  "error": {}
}

@riccardoferretti
Copy link
Collaborator

@ValentinTrinque
thanks for this, I recognize the error and where it's coming from.
by any chance to do you have a repo I can reproduce it from? I have not been able so far

@gxingh
Copy link

gxingh commented Feb 27, 2021

I'm not getting anything in the Foam logs when the Graph is blank. If I reload the window and then try to view the graph then it becomes visible.

BUT if I delete a link/node, then the graph isn't refreshing and I'm seeing the below logs:

[info - 12:02:38 PM] Deleted: /Volumes/Data/1Brain/test-link.md
[error - 12:02:38 PM] An error occurred in the graph view
{
  "message": "Uncaught TypeError: Cannot read property 'id' of undefined",
  "filename": "vscode-webview-resource://a6fd8997-3934-49e1-8935-5e874af931bb/file///Users/<my-username>/.vscode/extensions/foam.foam-vscode-0.10.2/static/graphs/default/graph.js",
  "lineno": 233,
  "colno": 24,
  "error": {}
}
[warn - 12:02:38 PM] Link file:///Volumes/Data/1Brain/test-link.md in file:///Volumes/Data/1Brain/inbox.md is not valid.

Link to Repo: https://github.com/iamtherealgd/BrainTemp

@riccardoferretti riccardoferretti linked a pull request Feb 27, 2021 that will close this issue
@riccardoferretti
Copy link
Collaborator

I found the issue, it was related to how wikilinks were being resolved when in presence of a definition.
This will be fixed by #502

riccardoferretti added a commit that referenced this issue Feb 28, 2021
* improved resolution for direct links and wikilink with definition

* if the definition of a wikilink points to a non-existing file, create a placeholder for the full path instead
* if a link doesn't point to a valid resource, create a placeholder for the full path instead

* commented out test-data.js import in dataviz.html

* moved test to more appropriate group
@riccardoferretti
Copy link
Collaborator

this has now been fixed as of 0.10.3 - can you confirm?

@pyreton
Copy link
Author

pyreton commented Mar 1, 2021

Confirmed - thank you

@pyreton
Copy link
Author

pyreton commented Mar 2, 2021

Unfortunately the foam graph intermittently stops updating again, and when I close it and re-open, it is blank.

I just upgraded to the latest version of Big Sur. (But it was working sometimes after the upgrade)

@pyreton
Copy link
Author

pyreton commented Mar 3, 2021

Looks like I can repro:

  1. Quit VSCode and reopen
  2. Open graph to side, see graph
  3. Edit text files for a while, notice graph stopped updating
  4. Try closing and re-opening graph, see it's blank
  5. GOTO 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working foam-dataviz Related to data visualization
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants