7.9.14 Issues with Template Canvas Parameters

Looks like something changed between 7.9.13 and 7.9.14 in the way template parameters are handled in the Template Canvas component. The template parameters as shown in the image used to work in 7.9.13
It works as expected in 8.0.13 Nightly

image

The template parameters were created using the Template Customizer.

I get the following errors:

 WARN Vision.TemplateCanvas - Unable to set template property value on template zzz
java.lang.ClassCastException: Cannot coerce value 'true' into type: class java.lang.Boolean
	at com.inductiveautomation.ignition.common.TypeUtilities.coerce(TypeUtilities.java:1335)
	at com.inductiveautomation.factorypmi.application.binding.DynamicPropertyDescriptor.setValue(DynamicPropertyDescriptor.java:59)
	at com.inductiveautomation.factorypmi.application.binding.util.DynamicPropertyUtil.setPropertyValue(DynamicPropertyUtil.java:260)
	at com.inductiveautomation.vision.api.client.components.model.AbstractVisionPanel.setPropertyValue(AbstractVisionPanel.java:164)
	at com.inductiveautomation.factorypmi.application.components.TemplateCanvas._finishBuilding(TemplateCanvas.java:314)
	at com.inductiveautomation.factorypmi.application.components.TemplateCanvas$TemplateLoader.done(TemplateCanvas.java:695)
	at javax.swing.SwingWorker$5.run(Unknown Source)
	at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(Unknown Source)
	at sun.swing.AccumulativeRunnable.run(Unknown Source)
	at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(Unknown Source)
	at javax.swing.Timer.fireActionPerformed(Unknown Source)
	at javax.swing.Timer$DoPostEvent.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
07:11:13.119 [AWT-EventQueue-2] WARN Vision.TemplateCanvas - Unable to set template property value on template zzz
java.lang.ClassCastException: Cannot coerce value '1234.5678' into type: class java.lang.Double
	at com.inductiveautomation.ignition.common.TypeUtilities.coerce(TypeUtilities.java:1335)
	at com.inductiveautomation.factorypmi.application.binding.DynamicPropertyDescriptor.setValue(DynamicPropertyDescriptor.java:59)
	at com.inductiveautomation.factorypmi.application.binding.util.DynamicPropertyUtil.setPropertyValue(DynamicPropertyUtil.java:260)
	at com.inductiveautomation.vision.api.client.components.model.AbstractVisionPanel.setPropertyValue(AbstractVisionPanel.java:164)
	at com.inductiveautomation.factorypmi.application.components.TemplateCanvas._finishBuilding(TemplateCanvas.java:314)
	at com.inductiveautomation.factorypmi.application.components.TemplateCanvas$TemplateLoader.done(TemplateCanvas.java:695)
	at javax.swing.SwingWorker$5.run(Unknown Source)
	at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(Unknown Source)
	at sun.swing.AccumulativeRunnable.run(Unknown Source)
	at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(Unknown Source)
	at javax.swing.Timer.fireActionPerformed(Unknown Source)
	at javax.swing.Timer$DoPostEvent.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
07:11:13.121 [AWT-EventQueue-2] WARN Vision.TemplateCanvas - Unable to set template property value on template zzz
java.lang.ClassCastException: Cannot coerce value '1234' into type: class java.lang.Integer
	at com.inductiveautomation.ignition.common.TypeUtilities.coerce(TypeUtilities.java:1335)
	at com.inductiveautomation.factorypmi.application.binding.DynamicPropertyDescriptor.setValue(DynamicPropertyDescriptor.java:59)
	at com.inductiveautomation.factorypmi.application.binding.util.DynamicPropertyUtil.setPropertyValue(DynamicPropertyUtil.java:260)
	at com.inductiveautomation.vision.api.client.components.model.AbstractVisionPanel.setPropertyValue(AbstractVisionPanel.java:164)
	at com.inductiveautomation.factorypmi.application.components.TemplateCanvas._finishBuilding(TemplateCanvas.java:314)
	at com.inductiveautomation.factorypmi.application.components.TemplateCanvas$TemplateLoader.done(TemplateCanvas.java:695)
	at javax.swing.SwingWorker$5.run(Unknown Source)
	at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(Unknown Source)
	at sun.swing.AccumulativeRunnable.run(Unknown Source)
	at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(Unknown Source)
	at javax.swing.Timer.fireActionPerformed(Unknown Source)
	at javax.swing.Timer$DoPostEvent.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

1 Like

Yep, there’s a regression here due to some optimizations done to the rendering logic.

Is there a workaround? Or have to wait for a fix?

No workaround I can think of - it’s caused by a deep internal function ending up doubly to-stringing JSON primitives, so basically true -> "true" -> ClassCastException, instead of being coerced into a boolean.

This seems like a serious enough problem to justify an early release of 7.9.15… :neutral_face:

3 Likes

Can you pass it a 1 or 0 instead for now?

A fix for this is pending review and I think the plan is to start uploading weekly releases of 7.9 in between the final releases.

2 Likes

Any updates on the fix? We upgraded last Friday and are broken, trying to decide to roll back to .13 or move forward if there is a release coming out.

The issue’s been fixed in our codebase, but there’s no timeline on 7.9.15. If you’re using template canvases, you should roll back. It’ll certainly be a few months before 7.9.15, and I would definitely not recommend putting one of the ‘weekly’ releases into production without consideration of the tradeoffs. In this case, you can just upgrade the Vision module once we have a new version available, without having to upgrade the whole platform.

In general, and for anyone who happens to read this in the future, be aware that this ‘weekly’ release process for 7.9 doesn’t have the same guarantees of QA/regression testing that full releases will have. But, they’ll still be an option if you ‘need’ a particular bug fix more urgently.

Long-term support should not mean long waits for regression fixes. The cavalier attitude towards LTS fixes strikes me as fundamentally unhealthy for Ignition's reputation. The rule that LTS's should only have bug fixes after a successor is released is entirely appropriate. Reducing the pace of releases when fixes are pending is not appropriate. IMNHSO.

@Carl.Gould ?
@Colby.Clegg ?

4 Likes

Ok, we would like to roll back. Any special instructions on rolling back to 7.9.13 from .14?

There should be an upgrade_backups/ folder in the install directory (something like C:\Program Files\Inductive Automation\Ignition\upgrade_backups) - copy that gateway backup to another location (unless you have your own backup from 7.9.13), then uninstall the current Ignition version, install 7.9.13, and restore that .gwbk.

You're right. The release cadence of LTS releases isn't currently amenable to quick turnaround on regression fixes, which is not appropriate. I disagree that our attitude is "cavalier"; we just don't currently have the correct release mechanisms in place to deal with this type of scenario correctly. We definitely have a disconnect between the speed of fixes (fast!) and the speed of LTS releases (slow!). Hence, the need for this new weekly release concept.

We've been having a lot of conversations internally on this point this morning, as this thread clearly shows that we have some internal disagreement/confusion on the intended purpose and expectations for these releases. I do not think that rolling back to 7.9.13 should be the only option until 7.9.15 is released. I think that having weekly patch releases allows us to deliver needed fixes on an acceptable timeframe. There is some risk of introducing more regressions along the way, but as the 7.9 codebase undergoes so few changes at this point I think that for many, the benefit of receiving patched version of 7.9.14 will dramatically outweigh that risk.

The other factor at play here is our own adherence to our "critical bugfixes only" policy for LTS branches. This whole episode occurred because we (I) decided to backport a performance enhancement. My mistake, I should not have done this in the first place.

We should be able to get a 7.9.15-snapshot version up this week.

6 Likes

Ok, that might have been a bit harsh. But I can understand how an end-user might feel that way. Your report on the internal discussions is very good news.

One possible optimization that might be helpful would be to publish fixes that are isolated to a single component of Ignition as just an interim version of that specific module. A git-branch-per-module approach instead of the release train, with merges only for releases. The release train is certainly the best way to develop new features, but platform-wide churn pretty much ensures the need for lock-step releases. With the frozen API of an LTS in maintenance mode, not so much. FWIW.

1 Like

Yeah, per-module releases are tempting. Having module versions out-of-step with the installer/upgrader is problematic, however.

Ah, but interim modules could be released solo--no installer--just for those users bit by the relevant bugs. The installer could be updated only when you merge all the branches for a new actual release. The solo modules could be QA'd against a fresh install of their release, without regard to any other module's updates.

Kevin Herron has done this for various drivers and even for the OPC-UA module itself. Seems like a workable policy overall.

Workaround for people in difficult position.

(Courtesy of Plantformance team, not me)

Issue is coming from replacement of json parsing library in 7.9.14.
The new one here has weird behaviour and any parameter you try to pass to template will be get quotes added, including integers, booleans, etc…

A value True becomes “True” inside template binding.

Quick workaround is to add a regex inside the template bindings to remove quotes if they are there.
Not beautiful but it works.

We are modifying some critical templates while waiting (can not wait, can not revert because of security issue in .12 and .13). I know IA has been pushing very hard yesterday to get a fix very, very soon.

2 Likes

Closing the loop - 7.9 ‘weekly’ builds are now being published to the website. This particular issue can be resolved just by updating the Vision module: Early Access 7.9 LTS Builds

3 Likes

Actually, you need to update Platform, not Vision.

3 Likes

Hello
Can we have an update there ?
7.9.15 is still nightly built, and I can see no clear instructions anywhere.
This is a massive issue for everybody using template canvas, template repeater.
thanks