I’ve got a sparkline inside a template that keeps throwing these errors, and I’m having trouble understanding what it’s trying to say:
Exception: Error running query:
TagHistory(paths=[histprov:default:/prov:default:/tag:BOP/TT7700/Status/Value], start=Tue Mar 02 18:00:24 EST 2021, end=Tue Mar 02 18:10:24 EST 2021, flags=0)@1000ms
On: Basic.Basic.Sparkline Chart.data
caused by GatewayException: Requested timestamp is previous to an already requested time. All requests must go forward in time. Received '-1' after '0'
caused by IllegalArgumentException: Requested timestamp is previous to an already requested time. All requests must go forward in time. Received '-1' after '0'
Ignition v(Dev Version)
Java: Azul Systems, Inc. 11.0.9
It kinda sounds like my start/end times are swapped, but as you can see in the query the start time is before the end time.
What’s also weird is that the sparklines will work fine for a while before eventually starting with these errors, and then magically go back to working without any obvious cause/effect.
Any clue?
This gateway is still on an older 8.1 nightly ( b2021010502).
Nope, never found any specific fix for this issue.
The problem went away once we moved the project to the customer’s hardware so I kind of forgot about it until now.
I’ve had a similar issue before and it had to do with how the bindings were working when the window opened. I think I had the start and stop dates bound to tag values but it took a little while for the tag values to return as ‘good’. My solution was to bind the tag values to custom properties and check that the tag values were good with a try() expression, if not then I returned some default dates.
That specific example doesn’t sound like what you are seeing, but perhaps it’s caused by some kind of binding race condition somewhere?
Fair enough. We are only seeing it on our internal development server which is 8.1.5 so I may just upgrade to see if the issue goes away. Same exact error that you were seeing…
Any update on this? I'm running into this same problem. My query was working fine for a day and out of no where started throwing these errors. The errors only appear in designer, my client window isn't reporting any issues.
Ignition v8.1.22 (b2022110109)
Java: Azul Systems, Inc. 11.0.16.1
Well this is only 2+ years later, but the answer to your question is clear the history cache. It's a bit in the Tag History group of the Property Editor. Setting that bit to 0 seemed to work for me. Ignition Tech Support also offered the following. (as yet untried):
A permanent solution would be to recreate the cache, this will remove the bad entry and fix your charts without having to toggle. To reduce load on the client when using tag history queries, some values can be stored in cache within the Vision client so you aren't constantly making calls against the DB. To clear out the cache you will need to close out the Designer and the Designer launcher. You can go into C:\Users$YOUR_IGNITION_USER.ignition\cache$GATEWAY_NAME and delete the folder. When you reopen the Designer launcher, you may need to create a new connection to the Gateway since the cache was deleted. When the connection occurs, new resources will be pulled and the tag history cache will not have any of the old values.