TW5 Hosing issue; requests broadcasting to multiple clients

198 views
Skip to first unread message

Sean Hankins

unread,
Sep 26, 2020, 7:03:54 PM9/26/20
to TiddlyWiki
Hi! I'm having an interesting problem with my TW5 installation having to do with the use of multiple anonymous users and a single editing user. Whether logged in or using anonymously, when a user opens a Tiddly on their local web browser, it opens the same one in all other users' instances as well. This also happens when logged in as an editing user and editing; an anonymous user (read-only) will get an editable Tiddly opened in their browser, although any changes aren't saved permanently. 

I have TW5 on my little Linux server that I'm hosting some other node services on. It's configured to run on port 8080, whereas my other services occupy port 80. I've poked the appropriate port holes through my router and I can access the TW5 from anywhere with my IP (e.g., http://xx.xx.xx.xx:8080). While testing I was on a computer on a home network 10 miles from the server. I've tested multiple computers on the same internal network accessing my remote TW5 server, all experience cross client requests. I also tested using my phone on the data network (not on the same IP or home network, WiFi off). Opening a Tiddly (or more) on the phone will also open on other computers.

The installation is vanilla with just the following start up parameters:
>> tiddlywiki World --listen port=8080 host=10.0.0.2 credentials=worldUsers.csv anon-username="Adventurer" "readers=(anon)" writers=admin
The creds file (worldUsers.csv):
>>username,password
>>admin,pswrd


This issue baffled someone in the TW5 unofficial Discord, and they suggested I come here, but I still don't know if this is a configuration issue, installation issue, bug or working as designed. My idea is to have multiple people use it in a read-only fashion and have only one editing user, but if it's going disrupt one user having another user browse, maybe it's just not the right tool, which is too bad, because I love this tool.

Eric Shulman

unread,
Sep 26, 2020, 7:31:09 PM9/26/20
to tiddl...@googlegroups.com
On Saturday, September 26, 2020 at 4:03:54 PM UTC-7, Sean Hankins wrote:
Hi! I'm having an interesting problem with my TW5 installation having to do with the use of multiple anonymous users and a single editing user. Whether logged in or using anonymously, when a user opens a Tiddly on their local web browser, it opens the same one in all other users' instances as well. This also happens when logged in as an editing user and editing; an anonymous user (read-only) will get an editable Tiddly opened in their browser, although any changes aren't saved permanently. 

Caveat:
I don't use the nodeJS server setup, so most of what I say below is just a guess...

Nearly every activity in TiddlyWiki has some effect on one or more underlying system tiddlers, used to track the current "state" of the interface.  For example, whenever you view or edit a tiddler, the "list" field in $:/StoryList is updated.

When using nodeJS, all tiddler changes are synced to the corresponding .tid files stored on your server.  Then, because those .tid files have been updated, they are being pushed to any other users that are connected to the same nodeJS server.

To work around this, try disabling the default "Autosave" setting to prevent your activities from being actively synced to the server.  To turn off this setting, go to $:/ControlPanel, Saving, General tab and choose "Do not save changes automatically".

If this works, then nothing you change in your instance of TiddlyWiki will be written to the server until you use the "Save changes" button in the Sidebar.

Let me know how it goes...

-e

Sean Hankins

unread,
Sep 26, 2020, 8:50:24 PM9/26/20
to TiddlyWiki
Ok, thanks for the tip! It helped but, unfortunately I'm still having problems. From what I can tell, after making your suggested change, the $:/StoryList is updated by the editing user only now, which means I can't edit or browse with this user while someone else is using it and pulling that list, lest they also receive the editing/browsing responses. The other half of the problem is that every once in a while, the anonymous browsing user's client requests this list again, and all open Tiddlys close themselves and goes back to the last saved list, obviously disrupting the user experience. 
Perhaps there's a way to disable saving to or reading from the $:/StoryList all together? Or would this even resolve the issue, or make something else not work?

TW Tones

unread,
Sep 26, 2020, 10:35:27 PM9/26/20
to TiddlyWiki
Sean,

The main way at present to handle multiple users is with a Bob server. It checks out tiddlers being edited by different tabs/windows, users and computers on a local area network.

The bobexe is a very east way to install and use bob.

I and others are working on single file checkout for serial editors, and you can make use of existing document management systems such as sharepoint to leverage its check out system.

Regards
Tony

Sean Hankins

unread,
Sep 26, 2020, 11:57:43 PM9/26/20
to TiddlyWiki
Ok, thanks for the advice. I'll try playing with bobexe.

Saq Imtiaz

unread,
Sep 27, 2020, 7:23:06 AM9/27/20
to TiddlyWiki

Sean Hankins

unread,
Sep 27, 2020, 4:09:40 PM9/27/20
to TiddlyWiki
Great info! Yes, adding the following to the  $:/config/SyncFilter fixed this issue for me:
>> -[[$:/StoryList]]

As an aside, I had to make sure the system saved the StoryList with my desired startup Tiddlys on the screen before quickly making the filter change, because a browser refresh from an anonymous user was first showing the tid that is specified in the "Default tiddlers" section of the ControlPanel but immediately navigating itself to the StoryList stack.

Thanks again!

Rob Hoelz

unread,
Sep 27, 2020, 5:44:04 PM9/27/20
to TiddlyWiki
Hi Saq - do you happen to know if this bug is tracked on GitHub already?  I think it might be helpful to gather links to forum posts related to it over there, as well as to start a discussion there oriented around fixing the issue.

-Rob

Saq Imtiaz

unread,
Sep 28, 2020, 6:42:07 AM9/28/20
to TiddlyWiki
@Rob the only related issue I know of on Github is this one: 

I do agree that this needs a proper bug report. In my opinion, this is a serious enough problem that a minor bug fix release is warranted.

Rob Hoelz

unread,
Sep 29, 2020, 9:47:55 AM9/29/20
to TiddlyWiki
Thanks, Saq!  I started an issue to coordinate on this issue and tie together the various reports I've seen here on Google Groups: https://github.com/Jermolene/TiddlyWiki5/issues/4868
Reply all
Reply to author
Forward
0 new messages