Error after 5.4.0 upgrade in decodebase64[]

Folks,

I just upgraded my private BlogToSelf wiki, which admittedly includes a lot of hacks, to 5.4.0 and I get the following error and I am not sure where to start debugging?

Internal JavaScript Error (Edge)

Uncaught InvalidCharacterError: Failed to execute ‘atob’ on ‘Window’: The string to be decoded is not correctly encoded.

Some guidance on investigating this would be appreciated.

In firefox I get a simpler message

Internal JavaScript Error (Firefox)

InvalidCharacterError: String contains an invalid character

In Both cases I loose control of the user interface, and although I saw a save triggered I seem not to have any other control.

[Edit1] Loading the wiki with a #not not existing tiddler loads without error, but as soon as I select any tiddler or save a new one I get the error.

  • As I have a sophisticated subtitle I removed the $:/tags/ViewTemplate from $:/core/ui/ViewTemplate/subtitle and it is no longer being triggered.

[Edit2] Its at times like this I wish I had shortcuts to assist with toggling tags and other support for debugging by elimination.

1 Like

I’m glad you were able to isolate the problem tiddler! If the bug seems to be related to your $:/core/ui/ViewTemplate/subtitle modifications, it might be useful to share the text content here. Someone may be able to identify the specific character(s) giving 5.4.0 trouble.

1 Like

Yes I built a tool to toggle tiddlers with the $:/tags/ViewTemplate/Subtitle to $:/tags/ViewTemplate/Subtitle-disable then toggled them back one after the other, eventually a tiddler containing the following caused the failure;

{{{  [all[current]get[created]format:date[YYYY/0MM/0DD hh:mm]] }}} - {{{  [all[current]get[created]format:date[YYYY0MM0DD0hh0mm0ss0XXX]]}}} - {{{  [all[current]get[created]format:date[YYYY0MM0DD0hh0mm0ss0XXX]decodebase64[]encodebase64[]]}}}

A quick process of elimination shows the following causing the problem;

{{{  [all[current]get[created]format:date[YYYY0MM0DD0hh0mm0ss0XXX]decodebase64[]encodebase64[]]}}}

And removing the decodebase64 stops the error.

Since this was but an experiment I have deleted it however I have confirmed the following in a tiddler on tiddlywiki.com replicates this problem;

{{{  [all[current]get[created]format:date[YYYY0MM0DD0hh0mm0ss0XXX]decodebase64[]]}}}

So the problem is solved for me but not for the decodebase64[] operator on 5.4.0 which may need to be addressed in 5.4.1

1 Like

Can you create an issue at GitHub, with your last message. It will be easier to track there.

1 Like