Perspective Session Props:

Hi cmallonee,

Thank you for your reply.
My script is failing because of "self.props.host" is missing from session.
I am getting an error like:
'com.inductiveautomation.perspective.gateway.script' object has no attribute 'host'

And also I am encountering error of missing session custom props.
Below is the image of session custom props created in project.
image

Error of missing session custom prop,


After the error all above mentioned custom props disappears.

So please share any possible solution to counter this error.

Those custom session props do run the risk of not being present because they are dependent on their binding having resolved before they will exist. Do you see the icon which looks like a block with pieces floating away? That means the property is not Persistent. Properties which are not Persistent do not exist until the binding which would determine their value successfully resolves, resulting in an initial value. If the binding fails in any way (or if an associated transform fails), then the property won't exist. To force these properties to always exist for reference, you need to right-click the property and select the Persistent option.

I noticed above that you don't want to force persistence because the properties shouldn't exist until something is scanned - and that's fair - BUT it tells me that you're crafting something incredibly brittle, with potential race conditions where you're referencing props which could potentially not exist in scripts. It's on you to handle these missing values if you do indeed require such a script.

As for the host property, we do have an open ticket to investigate - but we've never been able to replicate the issue internally. When this occurs, do you see any errors in your Gateway logs?

Thanks cmallonee for your reply.
Yes, in gateway logs I can see error of missing host property.
Please find attached screen shot of error in gateway log,


Note: On first line towards right same error message is printed ''com.inductiveautomation.perspective.gateway.script' object has no attribute 'host'

No, that error is to be expected because of the script failure. I was looking to see if the logs contained anything else that might be able to point us to the root cause.

Ok cmallonee .
At this moment, I can see only error which is shared in above reply.

I note that sometimes when I login to my designer The host property in the perspective session property is missing, due to which when I run the perspective pages in the browser there is an error stating "session props host " not found. Whereas when I close and re-open the designer again I found the property present in the session props.
Is this any kind of glitch or any configuration to be done to get rid of this error.
Note: Gateway version: 8.1.20
Designer: 1.1.20
I've attached the snapshots of the sessions props before and after reopening for reference.


Hello S_ANIL_KUMAR,

I tested on 8.1.20 and 8.1.23 by closing and re-opening the designer and each time the host property was there. Do you have any specific replication steps that causes the host property to not show? Are you able to update to the latest version of Ignition and test if the host property is still not showing?

Hello All,

We have opened a support ticket to take a deeper look at this issue.

Hello. I've just experienced this issue. I am running Ignition version 8.1.13 on a Win7 PC.

My project has some session, custom properties defined. While working on a view in the designer, I saved some changes to the view. It seems at that time the session custom properties that were defined just disappeared. I had an open client session at the time and it appeared to continue working. But in the designer, the view (which had references to the custom session props) showed broken bindings.

I tried rebooting the computer. But after reboot, the client would not run correctly, as it apparently could no longer find the session custom properties.

-Jon

Upon further investigation:
The view that I had been working on contains an embedded view. Now in the designer that other view shows as an empty folder instead of a view. Somehow the object in the designer tree got changed from a view to a folder.

Also - I recreated the session custom properties as they had been. But the client session that uses those properties doesnt seem to be running correctly. Not sure if it recognizes them the same as the originals.

As it happens, I just got a new laptop with Win11. I've restored a gateway backup there and plan to rebuild the lost work.

Do you have automatic backups scheduled? (that's the first thing I turn on, that and auditing)

I dont have that turned on. Thanks, thats something to consider for the future.

Did we get a resolution to this problem? I also experienced the disappearance of session custom properties and the theme getting reset. Came searching here!
Using Ignition 8.1.23.

Did we get a resolution to this problem? I also experienced the disappearance of session custom properties and the theme getting reset. Came searching here!
Using Ignition 8.1.23.