So, I guess it’s “random new error popping up” day around here. All of a sudden - and for no good reason - I am seeing the Expression element from Toolbox suddenly reporting an error. It seems to be non-critical(ish), but I only just noticed this error now and it is happening on both dev and live.
I’ve not pushed an update to live since 1/1/19… so this is new behavior NOT CAUSED by anything that I have done.
I have an Expression element that does some date math for me. Said Expression is NOT triggered until all libraries that it relies upon are loaded. And yet, the first time it is run, it returns an object of the wrong type. (It’s supposed to return a list of dates, but apparently returns a list of objects the first time it is run.) It seems to automatically re-run itself, even though I don’t believe my own code asks it to do this.
You can observe this in my live mode app happening here:
(Again, this page DID NOT throw errors like this earlier in the month.)
The console log “America/New York” is the Expression reporting the timezone it is working with. It then proceeds to generate dates for the calendar and then returns them in an array of date type.
However, as you can see, when it tries to return those, the object returned is invalid. In my dev mode version of this, I have added more console logging that shows that the array is NOT an array of dates but of some other type of object.
The second console log “America/New York” indicates that the Expression runs again. This time, no error is thrown and the fact that we’re looking at a calendar at all tells us it must have succeeded.
@bubble, any ideas as to what might be going on here? @mishav, FYI.
In my dev app, I’ve upgraded to the very latest version of Toolbox (1.1.4). My live app is on 1.1.3 of Toolbox. Both versions behave the same.
Here’s my dev mode app with enhanced debugging turned on:
As you can see, a list of things that are not dates are returned. Then it runs again and succeeds…