# View missing from session; code cannot be compiled

**URL:** <https://forum.inductiveautomation.com/t/view-missing-from-session-code-cannot-be-compiled/88921>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 16, 2024, 5:53pm UTC](https://forum.inductiveautomation.com/t/view-missing-from-session-code-cannot-be-compiled/88921 "2024-04-16T17:53:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdemaris](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdemaris/32/54639_2.png) [@mdemaris](https://forum.inductiveautomation.com/u/mdemaris)\
**Post date:** [April 16, 2024, 5:53pm UTC](https://forum.inductiveautomation.com/t/view-missing-from-session-code-cannot-be-compiled/88921/1 "2024-04-16T17:53:01Z")

</div>

Hi all,

I recently started getting this message (on the gateway) after saving changes to my project:

```auto
View 'Page/ctr/SourceBay_Emb04@C$0:1:1' restarted but missing from session.
View 'Page/ctr/SourceBay_Emb04@C$0:1:0' restarted but missing from session.

```

The `1:0` numbers climb to `1:8`. The embedded view is embedded 19 times in the "main" view.

I have been attempting to debug an event/script and change scripts on a couple of components, then I started getting this message.

Also, sometimes I get a designer error that says a script cannot be compiled when I save, but other times I don't. And those scripts seem to run just fine. (I think!)

Here is one script that throws this error once in a while:

```auto
def valueChanged(self, previousValue, currentValue, origin, missedEvents):
	if currentValue and currentValue.value:
		message = 'chg_lid_action'
		payload = {}
		system.perspective.sendMessage(message, payload)

```

---

<div class="post-metadata">

**Author:** ![mdemaris](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdemaris/32/54639_2.png) [@mdemaris](https://forum.inductiveautomation.com/u/mdemaris)\
**Post date:** [April 22, 2024, 4:34pm UTC](https://forum.inductiveautomation.com/t/view-missing-from-session-code-cannot-be-compiled/88921/2 "2024-04-22T16:34:52Z")

</div>

No thoughts so far?

---

<div class="post-metadata">

**Author:** ![mdemaris](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mdemaris/32/54639_2.png) [@mdemaris](https://forum.inductiveautomation.com/u/mdemaris)\
**Post date:** [April 25, 2025, 4:56pm UTC](https://forum.inductiveautomation.com/t/view-missing-from-session-code-cannot-be-compiled/88921/3 "2025-04-25T16:56:46Z")

</div>

I began getting this `missing from session` message again, but this time I think it has to do with embedded views that are not visible. However, I do not know how I can be sure these are the views that the numbers `C$0:1:0:0` to `C$0:1:0:8` refer to.

After two subsequent tests on the `self.meta.visible` binding, I got nothing: no additional `ClientSession` warnings that the views are `missing from session`.

Until I made changes to a message handling script and saved the project, without even running/activating the script.

EDIT: I do have the main view and embedded view open in the designer, if that makes any difference.

---

<div class="post-metadata">

**Author:** ![henderson.g](https://avatars.discourse-cdn.com/v4/letter/h/ea5d25/32.png) [@henderson.g](https://forum.inductiveautomation.com/u/henderson.g)\
**Post date:** [September 9, 2025, 7:33pm UTC](https://forum.inductiveautomation.com/t/view-missing-from-session-code-cannot-be-compiled/88921/4 "2025-09-09T19:33:39Z")

</div>

I had a similar issue. I believe mine was because I made a parameter on the view I was embedding, then deleted the parameter from the view afterwards. In the embedded view, I still had the deleted parameter under params. Removing that from the embedded view fixed the issue for me.
