Perspective Session Props:

Hi there! This is Ganapathi.
I’m facing some serious problem in session props attribute. An attribute named “host” is not listing under the session props (occasionally its disappearing). However, when I close and re open the ignition app it is listing. If you guys have any workaround for this.

Software version : 8.1.20

  1. Is this happening in Designer or in the browser?
  2. If you bind a label on a view to session.props.host does it stop working (a problem) or keeps working (not a problem)?
  3. Why is it a serious problem? What are you doing with the host prop?

Hey Hi,
This is happening in designer only. I have one requirement on IP based which was proposed and successfully executed.
I have utilized this attribute in script, if this attribute disappeared/hidden, my script wont work and would throw an error like “attribute named host is not available”

The designer is not a complete Perspective environment (nor Vision, either). Some things only work in real clients.

2 Likes

Whatever you said is ok, but it is working whenever the host attribute is available.
my problem here was, “why this attribute is disappearing itself from the gateway?”

Is it a bug or we should not the utilize the session attributes ?
I was experiencing this bug since V8.1.16

Hi @pascal.fragnoud, need your help on this

Well the same issue occasionally pops up for me as well, I can’t help with that…
Instead of reopening the designer, you can simply re-add the property, it should keep its binding.
Adding another property also usually brings back the disappeared one…

1 Like

I’d be interested to see the script which is failing, and also the circumstances under which this prop is supposedly disappearing. It’s a system-level property, meaning it can’t be written to by scripting/bindings. The only potential time I would think it could ever not exist is if the browser/designer is being blocked by the OS - which I’ve never personally encountered.

Hi cmallonne,
Thanks for the reply.
The script which am using isn't a complicated one. It would check the local IP based on the conditional logic. While execution, 'host' attribute is disappearing like a ghost.

Still this.

1 Like

Hi There! This is Gaurav.
I am also facing same issue where perspective Session.Host property & some session custom properties disappears from designer after updating project.
I tried to run my perspective application with above situation and faced an error popup message of "session property object is missing". But my logic is still working and giving expected output as well.
So, what could be the reason for such a behaviour of session properties?

Software version : 8.1.20

Hi guys, just adding you in this thread
@cmallonee @pturmel @Transistor

Please don't. I read everything, so this just doubles an item in my notifications. When I don't answer, it generally means I have nothing helpful to add.

3 Likes

Same here. (And remember that we're not getting paid for this!)

Still this, probably

2 Likes


Here, I have added script for reference. This script is written in session custom prop. So, whenever "host" disappears then this script fails and throws error.

I guess you could make it persistent to work around the issue:

image

I would call that the solution, not a work-around.

1 Like

Hi,
Thank you for work around.
But I can not make session custom prop persistent because its value changes based on trigger, I have binded it to one of the tag. When value changes to '1' then script written on session prop should run.

Being persistent doesn't prevent it to be dynamically evaluated.

1 Like

Is your script failing because of a missing host property, or is it failing because of a reference to self.info? I'm not familiar with self.info.

I would expect an error like this with your script even if self.props.host is present:

AttributeError: 'com.inductiveautomation.perspective.gateway.script' object has no attribute 'info'

So what error/exception are you encountering, @Gaurav_Amrutkar? Or if no error is being encountered, what value are you receiving for self.props.host? Empty string ("")? None/null?

1 Like