Arlen22 / TiddlyServer

v2 - A static file server that can also save files and mount TiddlyWiki folders
https://arlen22.github.io/tiddlyserver/
MIT License
257 stars 36 forks source link

save failed with 502 error after fix put saver #96

Closed sv158 closed 4 years ago

sv158 commented 4 years ago

After execute the bookmarklet and drag the saver into my tiddlywiki, it can not save and emit below log in background:

[2020-06-06T17:05:48.987+-800] PUT     127.0.0.1       200 127.0.0.1 /tiddlywiki5.html                                           158.476 ms - -
[2020-06-06T17:05:54.596+-800] GET     127.0.0.1       200 127.0.0.1 /tiddlywiki5.html                                           2.004 ms - 2761080
[2020-06-06T17:05:59.078+-800] OPTIONS 127.0.0.1       200 127.0.0.1 /tiddlywiki5.html                                           3.740 ms - 20
[2020-06-06T17:05:59.081+-800] HEAD    127.0.0.1       200 127.0.0.1 /tiddlywiki5.html                                           4.275 ms - 2761080
 [ERROR] 2020-06-06 17:06:16 caught process uncaughtException SyntaxError: Unexpected token W in JSON at position 0
                                 at JSON.parse (<anonymous>)
                                 at p.handlePUTfile (/usr/lib/node_modules/tiddlyserver/index.js:128:52718)
                                 at Object.t.handleTreeRoute (/usr/lib/node_modules/tiddlyserver/index.js:128:48540)
 [ERROR] 2020-06-06 17:06:16 Could not write to uncaughtException.log
 STARTER 2020-06-06 17:06:16 server 127.0.0.1 closed
Arlen22 commented 4 years ago

If you are using a wiki that is 5.1.15 or newer you don't need the bookmarklet. See if it works without.