# \[BUG-6767\] Perspective Disappearing Pipes in Perspective Clients

**URL:** <https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 18, 2022, 2:55am UTC](https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322 "2022-10-18T02:55:52Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 18, 2022, 2:55am UTC](https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322/1 "2022-10-18T02:55:52Z")

</div>

v8.1.21  
Browser (Chrome)

I'm finding that Perspective Pipes (using the piping tool) disappear randomly.

e.g.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/5/25622618d77f62a25e6866d6c1296524b30f811a.png)

What it should be:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/a/aa8aeeb25cebdf99de8365a1d227beafec5709b1.png)

It's not possible to predict when it's going to remove pipes in the client. I though it was resolution-based, but if I go into full screen, out again, and back in, sometimes the pipes disappear, other times they don't for the same page.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 19, 2022, 3:05am UTC](https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322/2 "2022-10-19T03:05:26Z")

</div>

@mperkins  
This is a big issue for operators

---

<div class="post-metadata">

**Author:** ![humphrey.daniel](https://avatars.discourse-cdn.com/v4/letter/h/8e8cbc/32.png) [@humphrey.daniel](https://forum.inductiveautomation.com/u/humphrey.daniel)\
**Post date:** [October 19, 2022, 6:27am UTC](https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322/3 "2022-10-19T06:27:43Z")

</div>

Just a shot in the dark, but do you maybe have a background element and something setting z-index on it or the pipes?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 19, 2022, 6:29am UTC](https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322/4 "2022-10-19T06:29:00Z")

</div>

Nope! Just a super simple page with a bunch of embedded views (devices) and some pipes. Well, the example screenshot above isn't as simple, but I have the same issue on pages with a handful of embedded views and \<5 pipes

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 19, 2022, 7:24am UTC](https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322/5 "2022-10-19T07:24:21Z")

</div>

Did you check if the the pipes still exists in the html (but are just displaced/invisible)?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 19, 2022, 7:36am UTC](https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322/6 "2022-10-19T07:36:38Z")

</div>

Yep, pipes are all there, just not being rendered

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/e/3eb6a34051f50bd88dd6a4c1452c47ce42f9f617.png)

The top 4 are not rendered, the bottom one is.

Interestingly, I put another application window over the top of the browser and then moved it away, and the pipes rendered... only in Chrome, sometimes. Edge still stays invisible

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 19, 2022, 7:45am UTC](https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322/7 "2022-10-19T07:45:00Z")

</div>

It seems there are some hacky resolutions in other apps as well, like Matlab...

> <https://github.com/matplotlib/matplotlib/issues/2124>
>
> See discussion here:
> http://stackoverflow.com/questions/16999586/matplotlib-wont…-plot-line-of-same-x-values/17000144?noredirect=1#comment24658630\_17000144
> 
> If a graph is generated with a single horizontal line, the line is not visible in Chrome, but it is in Illustrator and in Internet Explorer.
> 
> As soon as the line stops being "straight" it becomes visible. This is not a reproduction of the vertical/horizontal issue with zoom/refresh.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/1/01b89147e1d6d44684eb96e8fe46bb7138a5b9b6.png)

However, I set all my coords in the SVG line to integer values in chrome dev tools, and still it doesn't render

This still doesn't render:

```auto
<g class="ia_pipe ia_pipeIsolate">
<line class="ia_pipeSegment--pid" mask="url(#C-0-mask-4_0-4)" x1="10" y1="80" x2="726" y2="229" style="stroke: var(--neutral-50); stroke-width: 5;"></line>
<polygon class="ia_pipeSegmentNode--pid" mask="url(#C-0-mask-4_0-4)" points="726,77 721,87 731,87 " stroke-width="0" style="fill: var(--neutral-50);"></polygon>
</g>

```

Well, this "fixes" it (for fast-loading pages)... but breaks other things, like my soul

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/0/6069cc632ea427b11e9e11ffb9b98b2d4431cd44.png)

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 19, 2022, 8:11am UTC](https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322/8 "2022-10-19T08:11:28Z")

</div>

> [@nminchin](#):
>
> ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/e/3eb6a34051f50bd88dd6a4c1452c47ce42f9f617.png)
> 
> image1362×561 62.4 KB

could you post the code here instead of a screen shot^^

---

<div class="post-metadata">

**Author:** ![mperkins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mperkins/32/71722_2.png) [@mperkins](https://forum.inductiveautomation.com/u/mperkins)\
**Post date:** [October 19, 2022, 2:55pm UTC](https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322/9 "2022-10-19T14:55:37Z")

</div>

do any of the embedded views also have pipes? My hunch is there is some sort of id collision occurring with the masking- ie `mask="url(#C-0-mask-0-4)"` that `#` id might exist in multiple embedded views. I'm looking into it now.

---

<div class="post-metadata">

**Author:** ![mperkins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mperkins/32/71722_2.png) [@mperkins](https://forum.inductiveautomation.com/u/mperkins)\
**Post date:** [October 19, 2022, 3:14pm UTC](https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322/10 "2022-10-19T15:14:22Z")

</div>

if you don't mind running code from me in the Chrome's Developer console on an affected view... this will identify duplicate id's for you

```auto
const idMap = new Map();
document
    .querySelectorAll("*")
    .forEach(
        (element) => {
            const { id } = element;
            id && idMap.set(id, (idMap.get(id) ?? 0) + 1)
        }
    );
for (const [id, count] of idMap.entries()) {
 count > 1 && console.log(`#${id} occurs ${count} times`)   
}

```

You'll get something like this:  
 ![Capture](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/7/c7d5ae06c238725db89b5529ece0d8cdfccf5fd8.jpeg)

and I can tell if those id's pertain to piping or not

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 20, 2022, 5:57am UTC](https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322/11 "2022-10-20T05:57:44Z")

</div>

> [@mperkins](#):
>
> ```python
> const idMap = new Map();
> document
> .querySelectorAll("*")
> .forEach(
> (element) => {
> const { id } = element;
> id && idMap.set(id, (idMap.get(id) ?? 0) + 1)
> }
> );
> for (const [id, count] of idMap.entries()) {
> count > 1 && console.log(`#${id} occurs ${count} times`)   
> }
> 
> ```

Results:

```python
const idMap = new Map();
document
    .querySelectorAll("*")
    .forEach(
        (element) => {
            const { id } = element;
            id && idMap.set(id, (idMap.get(id) ?? 0) + 1)
        }
    );
for (const [id, count] of idMap.entries()) {
 count > 1 && console.log(`#${id} occurs ${count} times`)   
}
VM1061:11 #ac_unit occurs 4 times
VM1061:11 #tank-fermenting-outline occurs 3 times
VM1061:11 #warning occurs 29 times
VM1061:11 #keyboard_arrow_left occurs 7 times
VM1061:11 #keyboard_arrow_right occurs 8 times
VM1061:11 #coordinateGhost occurs 87 times
VM1061:11 #build occurs 31 times
VM1061:11 #lock occurs 29 times
VM1061:11 #refresh occurs 3 times
VM1061:11 #pan_tool occurs 25 times
VM1061:11 #check occurs 14 times
VM1061:11 #security occurs 12 times
VM1061:11 #water-sharp occurs 2 times
VM1061:11 #construction occurs 2 times
VM1061:11 #gateway occurs 2 times
VM1061:11 #path-1 occurs 2 times
VM1061:11 #done occurs 2 times
false

```

I wouldn't have thought there would be any duplicates though as the pipe _do_ show up when you resize the browser

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 20, 2022, 6:22am UTC](https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322/12 "2022-10-20T06:22:04Z")

</div>

If they are the same views inside the embbeded contaienrs then it shouldnt matter if their are identical id's. They all will refer to only one def (first probably).

Feel free to pm me a copy of the html/views if you want me to take a look

---

<div class="post-metadata">

**Author:** ![mperkins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mperkins/32/71722_2.png) [@mperkins](https://forum.inductiveautomation.com/u/mperkins)\
**Post date:** [October 20, 2022, 2:53pm UTC](https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322/13 "2022-10-20T14:53:25Z")

</div>

Thanks for doing that, none of the duplicate id's listed would cause the issue, though resizing the browser to cause it to render does give me a clue. I'll investigate further and get back with my findings.

---

<div class="post-metadata">

**Author:** ![mperkins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mperkins/32/71722_2.png) [@mperkins](https://forum.inductiveautomation.com/u/mperkins)\
**Post date:** [October 20, 2022, 6:01pm UTC](https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322/14 "2022-10-20T18:01:48Z")

</div>

I still haven't been able to reproduce it locally, but I have something new for you to try.

Would you copy and paste this Button component somewhere in your view and press the button when the Pipes aren't showing?

The button has an onClick mouse event, it increments session.props.pipes.overlapGap by some small number (`.000000001`) . This forces the pipes to rerender, helping me to diagnose whether it's the pipe's themselves that aren't rendering properly, or if it's something else like the dimensions causing the issue.

```auto
[
  {
    "type": "ia.input.button",
    "version": 0,
    "props": {
      "text": "Press to rerender"
    },
    "meta": {
      "name": "Button"
    },
    "position": {
      "x": 0.5813,
      "y": 0.3424,
      "width": 0.0584,
      "height": 0.0518
    },
    "custom": {},
    "events": {
      "dom": {
        "onClick": {
          "type": "script",
          "scope": "G",
          "config": {
            "script": "\tself.session.props.pipes.overlapGap += .000000001\n"
          }
        }
      }
    }
  }
]

```

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 20, 2022, 6:58pm UTC](https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322/15 "2022-10-20T18:58:10Z")

</div>

I'll test this today, but would changing the appearance achieve the same thing? Eg from p&id to something else back to p&id. This is what my work around script is doing at the moment. Changing the gap would would less intrusive though!

---

<div class="post-metadata">

**Author:** ![mperkins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mperkins/32/71722_2.png) [@mperkins](https://forum.inductiveautomation.com/u/mperkins)\
**Post date:** [October 20, 2022, 7:27pm UTC](https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322/16 "2022-10-20T19:27:34Z")

</div>

> but would changing the appearance achieve the same thing?

yes, they both result in the pipes rerendering

good that there's a non-intrusive work around, I'll continue attempting to reproduce the issue and log a bug when I do

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 21, 2022, 6:37am UTC](https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322/17 "2022-10-21T06:37:20Z")

</div>

btw why does the svg have` style:" width:0px; height:0px"` ?

---

<div class="post-metadata">

**Author:** ![mperkins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mperkins/32/71722_2.png) [@mperkins](https://forum.inductiveautomation.com/u/mperkins)\
**Post date:** [October 24, 2022, 2:59pm UTC](https://forum.inductiveautomation.com/t/bug-6767-perspective-disappearing-pipes-in-perspective-clients/65322/18 "2022-10-24T14:59:41Z")

</div>

that's actually a very good clue - it's not @nminchin 's doing, it's the Pipe Renderer. "under the covers" the PipeRenderer sets a width and a height for the SVG based on the contents of the SVG that is being generated, there is likely a bug in that code.

I haven't nailed down the exact cause yet, but I'll file a bug for further exploration
