[TW5-Bob] Failure to save tiddlers to disk

156 views
Skip to first unread message

Matrix

unread,
Feb 27, 2019, 7:52:57 PM2/27/19
to TiddlyWiki
Hi folks,

I started using TW5-Bob just last week and it's been going pretty well overall. Today I was trying out a new plugin, it wasn't working right, so I decided to refresh. Imagine my horror when a bunch of my tiddlers were missing upon reload! When I checked the node process's console, I saw this exception repeated a bunch of times... it seems unrelated to saving a tiddler, but I'm not sure.

WebSocket error:  TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
    at validateString (internal/validators.js:125:11)
    at Object.resolve (path.js:1080:7)
    at Object.$tw.nodeMessageHandlers.savePluginFolder ($:/plugins/OokTech/Bob/NodeMessageHandlers.js:1094:37)
    at WebSocket.$tw.Bob.handleMessage ($:/plugins/OokTech/Bob/NodeWebSocketsSetup.js:151:52)
    at WebSocket.emit (events.js:197:13)
    at Receiver.receiverOnMessage ($:/plugins/OokTech/Bob/External/WS/lib/websocket.js:720:20)
    at Receiver.emit (events.js:197:13)
    at Receiver.dataMessage ($:/plugins/OokTech/Bob/External/WS/lib/receiver.js:415:14)
    at Receiver.getData ($:/plugins/OokTech/Bob/External/WS/lib/receiver.js:347:17)
    at Receiver.startLoop ($:/plugins/OokTech/Bob/External/WS/lib/receiver.js:134:22)


At first I thought it was due to the naming, i.e. I had a bunch of tiddlers with colons in the name, but when I looked on the disk, I saw that some tiddlers with colons in the name were saved and the colon was just converted to an underscore in the filename.

So... has anyone encountered this before? Could the error above have resulted in the browser not being connected with the server and tiddlers not getting saved? I am using a theme (http://j.d.material.tiddlyspot.com/) that might have obscured any warning message about being disconnected, if such a warning exists...

Luckily I didn't lose TOO much work, or anything vitally important, but obviously I'm a bit scared now. How can I audit in the future that my changes are really getting saved? The new local browser storage feature mentioned in this forum sounds like it would be a good safeguard against this type of problem.

Thanks folks!
--
Matrix

Jed Carty

unread,
Feb 28, 2019, 3:04:52 AM2/28/19
to TiddlyWiki
There is supposed to be a red bar at the top of the screen when the wiki is disconnected from the server. It looks like the header on the material theme covers the warning almost perfectly.

The specific warning message looks like it was caused by trying to save a plugin as a folder on the server and that process failing, it is under the manage plugins tab in the bob settings tab in the control panel. I seem to be the only person that every works for so I will just remove that from the interface in the next version. So to avoid this problem don't try to save plugins as folders. I haven't managed to run into the errors others are getting but it is been consistent that I am the only one it works for.

Matrix

unread,
Mar 5, 2019, 5:58:13 PM3/5/19
to TiddlyWiki
Jed,

I deleted that theme and have since had the disconnected state occur without the banner still. I believe it has to do with opening Chrome after a system reboot or other reason for closing Chrome, with the setting for opening the same tabs you had open before. This leads to the wiki being open and editable in your browser, but it doesn't appear to know that it isn't connected to the server. Is this a plausible explanation?

In my original case, I was playing with that "save plugin as folder" feature. I was trying to figure out how to copy plugins from one sub-wiki to another (new) one, which I still haven't really figured out how to do. Is there a recommended way to handle this?

Thanks!

Jed Carty

unread,
Mar 8, 2019, 2:42:13 AM3/8/19
to TiddlyWiki
I am not sure why that would cause the problem, but it does seem like the sort of thing that could do it. Another possibility is that there is something wrong with the z-sorting and the server error isn't showing up where it should. If this happens again check to see if a tiddler called '$:/plugins/OokTech/Bob/Server Warning' exists on your wiki.
If it isn't there than chrome may not handle websockets in the same way as other browsers so the check for being disconnected doesn't work in chrome. I haven't done any testing in chrome so I don't know.

One thing you could try is getting a new BobEXE executable and putting it in a temporary folder and start that then stop it and see if the wiki shows the disconnected message in chrome. If not than I will try and figure out what chrome is doing differently.

@TiddlyTweeter

unread,
Mar 8, 2019, 3:39:48 PM3/8/19
to tiddl...@googlegroups.com
Jed and Matrix 

Footnote on Chrome latest Windows every time I start a new session....

I (1) start the browser; (2) start Bob; (3) start a Bob Wiki via "refesh"; (4) Bob terminates; (5) start Bob again; (6) refresh the Bob Wiki. All is fine.

This behaviour is reproducible.

It's mildly irritating but quite bearable.

Update: This  is using Bob EXE 1.2.1.

Best wishes
Josiah

Joshua Fontany

unread,
Mar 8, 2019, 5:07:04 PM3/8/19
to tiddl...@googlegroups.com
I have also gotten a few errors with Bob. Maybe the symptoms will point to a root issue.

"Malformed settings file." -> Settings file is replaced by an empty file. Had to save a backup after the first time re-creating it.

When $:/config/FileSystemPaths is set, sometimes Bob will "recursively nest" a system tiddler.

For example, editing a shadow tiddler named "$:/plugins/joshuafontany/jsonmangler/Folder/Example" will sometimes create the "Example.tid" file @ "./tiddlers/_system/plugins/joshuafontany/jsonmangler/Folder/_system/plugins/joshuafontany/jsonmangler/Folder".

This is really hard to reproduce.

Also, whenever I edit a board in the DropBoard plugin where it generates a state file to a popup's state, Bob will throw a bunch of errors.
The latest test was changing column #'s displayed on the current Board, which generated this tiddler when opening the popup:

$:/plugins/reidgould/dpbd/state/-952538588/BoardWidthPopup

Bob then entered a loop of errors complaining about "path must be a string". When re-loading the wiki the popup cannot be dismissed.

Sometimes it will throw a super generic error like this:
```
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: Error watching file for changes: EPERM
    at _errnoException (util.js:992:11)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1359:9)
```

Best,
Joshua F

On Friday, March 8, 2019 at 12:39:48 PM UTC-8, @TiddlyTweeter wrote:
Jed and Matrix 

Footnote on Chrome latest Windows every time I start a new session....

I (1) start the browser; (2) start Bob; (3) start a Bob Wiki via "refesh"; (4) Bob terminates; (5) start Bob again; (6) refresh the Bob Wiki. All is fine.

This behaviour is reproducible.

It's mildly irritating but quite bearable.

Best wishes
Josiah
Reply all
Reply to author
Forward
0 new messages