[TW5] Bob and BobEXE version 1.3.3, Kohlrabi and how I dislike CORS

83 views
Skip to first unread message

Jed Carty

unread,
Nov 21, 2019, 1:56:52 PM11/21/19
to TiddlyWiki
I made this quick release because there were some CORS problems with the BobSaver.

I also added some configuration options to both the BobSaver plugin and to Bob itself for the saver. You can optionally add a key in Bob that you have to enter into a wiki in order to let it save.


The plugin version of Bob is on GitHub here: https://github.com/OokTech/TW5-Bob
The newest version of BobEXE is available here: https://github.com/OokTech/TW5-BobEXE/releases 

If you want to support the development OokTech has a patreon page here https://www.patreon.com/OokTech
or if you prefer there is a link for PayPal here https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZG94CTLHTKYRE


!! Version 1.3.3 Kohlrabi

* Added saver key to the single file saver
** This means that you can set a key and a wiki will only save if it you enter the correct key.
** Leaving the key blank means that no key is required.
* Added saver configuration tab under Bob settings
** Enable/disable saver server
** Set saver key
** Set host (WARNING: This can very easily break the saver)
** Set port (WARNING: This can very easily break the saver)
* internalFetch no longer causes a browser alert when you use resolution=force
* Browser alert tiddlers are now prefixed with `$:/temp/` so that they don't show up in the sidebar and don't get saved.
* Fixed some very annoying CORS problems

Mark S.

unread,
Nov 21, 2019, 3:59:23 PM11/21/19
to TiddlyWiki
I don't see the saver configuration tab. Should it be one the tabs immediately under Bob settings, or something deeper down?

Jed Carty

unread,
Nov 21, 2019, 4:18:02 PM11/21/19
to TiddlyWiki
it is under $:/ControlPanel -> Saving with the configuration for all the other savers.

Mark S.

unread,
Nov 21, 2019, 4:35:54 PM11/21/19
to TiddlyWiki
But

Added saver configuration tab under Bob settings

Under ControlPanel/Saving, I see

General
Download saver
Github-Saver
Gitlab-Saver
TiddlySpot Saver

Nothing for Bob. Just double-checked. The plugin is definitely saying vsn "1.3.3"

Thanks!

Jed Carty

unread,
Nov 21, 2019, 4:36:26 PM11/21/19
to TiddlyWiki
The BobSaver part is from the BobSaver plugin, if you want to configure the setting on the Bob side you have to use the manual configuration.

Mark S.

unread,
Nov 21, 2019, 4:37:46 PM11/21/19
to TiddlyWiki
(I'm repeating this from the 1.3.2 thread, so it doesn't get lost)

Now getting:

Error while saving:
BobSaver: Saving error, check that you have the correct key set.

What is a key set?

On the command line, I can see that it is attempting to do the impossible:

Error: ENOENT: no such file or directory, open 'C:\C:\Users\Mark\Downloads\notee
s-n-scratches.html'


The path in the URL bar was:

file:///C:/Users/Mark/Downloads/notees-n-scratches.html

Thanks!

Jed Carty

unread,
Nov 21, 2019, 5:30:35 PM11/21/19
to TiddlyWiki
The configuration for Bob is missing the tag that should put it in the settings under Bob, because of course I missed that. The tiddler is $:/plugins/OokTech/Bob/SaverServer and you can find it by searching for shadows under the advanced search.

As far as the other problem goes, that looks like windows is interpreting the path as a relative path and adding c:\ to it. That isn't a check I was expecting to have to make. Windows is going to give me migraines.

I am uploading version 1.3.3a that should have the saver tab under Bob in the correct place and may fix the windows pathing problem, but that part I can't test. It will be uploaded whenever my tethered data lets me finish.

Mark S.

unread,
Nov 21, 2019, 6:26:31 PM11/21/19
to TiddlyWiki
There is a tab now, but it doesn't use a short caption, it uses $:/plugins/OokTech/Bob/SaverServer

Pathing is still not right:

Error: ENOENT: no such file or directory, open 'C:\C:\Users\Mark\Downloads\notee
s-n-scratches.html'

Unless -- is there supposed to be a new plugin for the stand-alone file? I'm still on 0.0.3.

Thanks!

Mark S.

unread,
Nov 22, 2019, 4:20:16 PM11/22/19
to TiddlyWiki
Down in the wsserver.js code, made these changes:

  var filepath = request.headers['x-file-path'];
console
.log("Before I see " + filepath) ; // MAS
if (typeof filepath !== 'undefined') filepath=filepath.replace(/^\/[A-Za-z]:/,"") ;
console
.log("Now I see " + filepath) ; // MAS

         
const key = request.headers['x-saver-key'];

It appears that "createSaverServer" gets called twice for every invocation. On one of the passes filepath is undefined. So that's why there's
a check for undefined.

After these changes, it works with windows pathing. It shouldn't upset anything in un*x pathing, but I didn't test.

Thanks!

Jed Carty

unread,
Nov 22, 2019, 4:40:37 PM11/22/19
to TiddlyWiki
I made some other changes to BobEXE so now it is version 1.3.3b, and the plugin version 0.0.4 is out. It may solve the windows pathing problem using an example from one of the other savers.

Mark S.

unread,
Nov 22, 2019, 4:59:44 PM11/22/19
to TiddlyWiki
Testing lightly, it looks good. I'll have to do some backups and test on something bigger.

Thanks!
Reply all
Reply to author
Forward
0 new messages