jokroese / tiddlyroam

Your open source external brain
https://tiddlyroam.org
BSD 2-Clause "Simplified" License
557 stars 28 forks source link

"Edit Node" brings Internal JavaScript Error #11

Closed akelai closed 4 years ago

akelai commented 4 years ago

When I select a node from the Map, and press "Edit Node", it doesn't work: instead, I get a red box with the following content:

Internal JavaScript Error
Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser
Uncaught TypeError: Cannot read property 'forEach' of null

Of course I've tried to close, re-open, etc. Actually this problem has been there since the beginning, i.e. I've never seen the "Edit Node" dialog box. Instead, trying it here, I see that actually it is implemented and working.

jokroese commented 4 years ago

I can't recreate your problem. For example, this wiki is running TiddlyRoam and 'Edit Node' works there: https://citizense.org/wiki. It's also working for me locally.

Can you give more details on what your setup is?

akelai commented 4 years ago

I'm using it locally on Windows 10. I was using "win64-v0.0.14-prerelease.2", but now I've tried with "win64-v0.0.14" and I get the same error. Tried with a fresh "tiddlyroam.html" downloaded from here with an updated Chrome (Version 81.0.4044.138 Official Build 64-bit).

In Chrome developer console, when I click "Edit Node" this error is triggered:

_$:/plugins/felixhayashi/vis/vis.js:65_
Invalid type received for "physics". Expected: boolean. Received [object] "[object Object]"

Problem value found at:
options = {
  nodes: {
    physics
  }
}

_$:/plugins/felixhayashi/vis/vis.js:86_
Errors have been found in the supplied options object.

_tiddlyroam_test.html:12808_
Uncaught TypeError: Cannot read property 'forEach' of null

$tw.utils.error | @ | tiddlyroam_test.html:12808
window.onerror | @ | tiddlyroam_test.html:12835
window.onerror | @ | $:/plugins/felixhayashi/vis/vis.js:30
jokroese commented 4 years ago

Thanks for sharing the error. I've just updated some of the plugins TiddlyRoam uses. Could you try downloading the updated version of TiddlyRoam to see if you get the same error? https://github.com/joekroese/tiddlyroam/blob/master/tiddlyroam.html

akelai commented 4 years ago

Sure, done. Thanks for the attempt, but that didn't solve the problem: I get the very same error.

hexawing commented 4 years ago

I've got the same error. I'm using Chrome 81.0.4044.138, and Windows 7.

hexawing commented 4 years ago

I can't recreate your problem. For example, this wiki is running TiddlyRoam and 'Edit Node' works there: https://citizense.org/wiki. It's also working for me locally.

Can you give more details on what your setup is?

This site works for me. So I decide to save this page and work base on it.

jokroese commented 4 years ago

Thanks for the feedback @akelai and @hexawing.

I have since been able to recreate the problem. The error suggests something has gone wrong with the vis.js plugin used by TiddlyMap. I'll make an issue on the TiddlyMap repo to try to sort this out.

In the meantime, the solution described by @hexawing is a temporary workaround.

akelai commented 4 years ago

I'd like to use the solution described by @hexawing as a temporary workaround, as suggested. So I've saved as "citizense.html" the referenced page. Then I have my TiddlyRoam, with all the data, in "tiddlyroam.html". How am I supposed to get my data into the working "citizense" html file (and without all the current citizense data that's inside it)?

jokroese commented 4 years ago

I suppose the temporary workaround workflow would be:

  1. Delete the data files in the citizense wiki either a) manually (there are not so many) or b) with the deletetiddlers command.
  2. Export your data out of your current TiddlyRoam. (Details here.)
  3. Import it into the (now empty) citizense.html file. (Details here.)
jokroese commented 4 years ago

The good news is that we have identified a solution in TiddlyMap for this issue. When the new version of TiddlyMap is released, I'll integrate the changes immediately into TiddlyRoam and this will be fixed. Thanks for raising the issue @akelai!

akelai commented 4 years ago

Very happy for this update! The more I use TiddlyRoam, the more I feel how powerful it is and well matching with my (and probably most of the human beings) way of reasoning/memorizing. I'm lucky for the privilege of using it, thanks.

jokroese commented 4 years ago

Great to hear you finding it useful @akelai!

Felix, who runs TiddlyMap, was able to identify and fix this bug (felixhayashi/TW5-TiddlyMap#347). I've merged the new version of TiddlyMap v0.17.5 into the new release of TiddlyRoam. All fixed!