Solving javascript issue "Uncaught TypeError: $tw.addUnloadTask is not a function"

66 views
Skip to first unread message

Jean-Charles

unread,
Aug 8, 2015, 3:23:51 PM8/8/15
to TiddlyWiki
My node.js tiddlywiki broke today, with the javascript error message "Uncaught TypeError: $tw.addUnloadTask is not a function".

I have a somewhat unusual setup, with two services running on two different desktops that use a dropbox-syncrhonized filesystem. My setup is kind of specific, so I suppose some corruption, but what steps can I take to understand what is wrong (I guess a tiddler is broken ?). Can tiddlywiki do some consistency check and/or cleanup ? Do I have to do it by hand ? The --verbose flag didn't provide any help regarding this persistent error.

Any Suggestion ?

$ tiddlywiki mywiki --verbose --server 2700 "$:/core/save/all" text/plain text/html "" "" 0.0.0.0
Boot log:
  Startup task: load-modules
  Startup task: info after: load-modules before: startup
  Startup task: startup after: load-modules
  Startup task: story after: startup
  Startup task: commands platforms: node after: story
Executing command: server 2700 $:/core/save/all text/plain text/html   0.0.0.0
Serving on 0.0.0.0:2700
(press ctrl-C to exit)
syncer-server: Dispatching 'save' task: $:/StoryList
FileSystem: Saved file e:\Dropbox\tiddlywiki\mywiki\tiddlers\$__StoryList.tid

Jean-Charles

unread,
Aug 8, 2015, 6:16:17 PM8/8/15
to TiddlyWiki
Console output is the following, by the way...

Uncaught TypeError: $tw.addUnloadTask is not a function
$:/core/modules/syncer.js:43

Syncer @ $:/core/modules/syncer.js:43
exports.startup @ $:/core/modules/startup.js:75
$tw.boot.executeNextStartupTask @ (index):13096
$tw.boot.executeNextStartupTask @ (index):13100
$tw.boot.executeNextStartupTask @ (index):13100
$tw.boot.startup @ (index):13062
(anonymous function) @ (index):13202
$tw.boot.decryptEncryptedTiddlers @ (index):12535
$tw.boot.boot @ (index):13200
_boot @ (index):13209
(anonymous function) @ (index):13219

Jeremy Ruston

unread,
Aug 9, 2015, 10:01:56 AM8/9/15
to TiddlyWiki, Jean-Charles
Hi Jean-Charles

My node.js tiddlywiki broke today, with the javascript error message "Uncaught TypeError: $tw.addUnloadTask is not a function".

The stack trace is saying that the module syncer.js couldn't find the function $tw.addUnloadTask() that was added to the boot kernel in 5.1.9. The error suggests that maybe you've somehow ended up with an earlier, different version of one or other the following core JavaScript module tiddlers:

$:/boot/boot.js
$:/core
$:/core/modules/syncer.js

Perhaps check through your wiki folder and see if there are any unexpected .js files there?

Best wishes

Jeremy
 
I have a somewhat unusual setup, with two services running on two different desktops that use a dropbox-syncrhonized filesystem. My setup is kind of specific, so I suppose some corruption, but what steps can I take to understand what is wrong (I guess a tiddler is broken ?). Can tiddlywiki do some consistency check and/or cleanup ? Do I have to do it by hand ? The --verbose flag didn't provide any help regarding this persistent error.


 

Any Suggestion ?

$ tiddlywiki mywiki --verbose --server 2700 "$:/core/save/all" text/plain text/html "" "" 0.0.0.0
Boot log:
  Startup task: load-modules
  Startup task: info after: load-modules before: startup
  Startup task: startup after: load-modules
  Startup task: story after: startup
  Startup task: commands platforms: node after: story
Executing command: server 2700 $:/core/save/all text/plain text/html   0.0.0.0
Serving on 0.0.0.0:2700
(press ctrl-C to exit)
syncer-server: Dispatching 'save' task: $:/StoryList
FileSystem: Saved file e:\Dropbox\tiddlywiki\mywiki\tiddlers\$__StoryList.tid

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/993666b3-9c2b-40a3-b809-fcb40ee525fc%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Jean-Charles

unread,
Aug 9, 2015, 10:08:25 AM8/9/15
to TiddlyWiki, jeancharl...@gmail.com, jeremy...@gmail.com
Hi Jeremy,

I made a first attemps to isolate the error and it was indeed in a core.js tiddler, but as the code raising the error was also in this file, I wasn't sure if I was just hiding the error or if it was the main cause of the problem. So I solved the issue by re-creating a new tiddler/ folder and copying all non-system tiddlers there, and added configuration and customization tiddlers.

So, to sum up : source cause was a core.js tiddler related to a previous version. Not sure why this tiddler appeared, but I made a lot of test at some point of time and maybe did save this file.

Issue solved, thanks for your help.

--
Jean-Charles
Reply all
Reply to author
Forward
0 new messages