OokTech/TW5-Bob

Crashes on Fetch list of media and will not allow manually setting the root path

jbardi opened this issue · 0 comments

I have a new manual install. I have cloned both repos, copied the plugin to the TiddlyWiki5 folder, step by step.

I then created a files folder under Wikis/BobWiki then I go to Bob settings, File Server section, and if I leave the default setting of ./files for the root folder, and click on the button to fetch the list of media in the root folder, it gives me the following error on the console and crashes:

$:/plugins/OokTech/Bob/NodeServerHandlers.js:998
      data.tiddler = data.tiddler || path.join('$:/state/fileList/', data.wiki, $tw.settings.fileURLPrefix, urlPath);
                                     ^

ReferenceError: path is not defined
    at thisCallback ($:/plugins/OokTech/Bob/NodeServerHandlers.js:998:38)
    at $:/plugins/OokTech/Bob/ServerSide.js:1071:13
    at FSReqCallback.oncomplete (node:fs:185:23)

I then decided to click the little edit pencil icon to manually set a root path, and after typing in a path to a different folder I have and clicking the little checkmark icon to set the new path, the path text next to the pencil icon just disappears, so that there is no path and just the pencil icon. When this happens, the settings.json file just shows "filePathRoot": "", so it is just clearing it out.

So I can not set a manual path, therefore I can only attempt to use ./files which gives me the above stated error.

I originally had this all being run through a Docker image, as that is my preference, but I was getting the same 2 issues as above, which is why I decided to try it with node directly on the system outside of docker and still have the same issues.

This is running on a Raspberry Pi 4 in case that makes a difference.

Update: I tested this running with debian via Crostini on a Chromebox with the same results, so its weird that nobody else is having this issue since it occurs in 3 different systems. Inside a docker container, on a Raspberry Pi and on a Chromebox.

And to be sure the root path of ./files is correctly being referenced, I can drag an image into the wiki and it is automatically saved in the ./files folder and being referenced by a _canonical_uri, but if I go to the Bob settings and click on the fetch button, it crashes with the stated error.

Update 2: I'm beginning to think there are issues with running Bob on Linux in general. I just tried running the BobLinux executable on Debian, and I am getting a different, yet similar issue when clicking the fetch button. I created a files folder inside the IndexWiki folder so I could use the default ./files root path, and when I click on the fetch button, BobLinux crashes with the following error:

$:/plugins/OokTech/Bob/NodeServerHandlers.js:1033
      wikiName = wikiName || '';
      ^

ReferenceError: wikiName is not defined
    at thisCallback ($:/plugins/OokTech/Bob/NodeServerHandlers.js:1033:7)
    at $:/plugins/OokTech/Bob/ServerSide.js:1068:13
    at FSReqCallback.oncomplete (fs.js:154:23)

This error, along with the error I am getting when using node and the fact that a new install on linux has to have either the folder names for plugins, themes, etc renamed to uppercase or change the settings.json to path references to lowercase seems to indicate that there are issues on Linux overall. I'm guessing the majority of users of Bob are running on Windows with the EXE so they are not experiencing these problems.


I am running (check any that apply, put an x inside the [ ] to check a box, like this: [x]):

  • Windows
  • OSX
  • [x ] Linux
  • Other

and using

  • [x ] The nodejs version
  • [x ] The single file executable

Before posting I read issue guidelines and:

  • [x ] I am using the newest version
  • [x ] The answer to my question isn't listed in the documentation or this isn't
    a question
  • [x ] This is not a duplicate issue
  • [x ] I have not done anything that required me to set acceptance to
    I Will Not Get Tech Support For This