# Elastic Synthetics: Error executing step: $(...).popover is not a function

**URL:** https://discuss.elastic.co/t/elastic-synthetics-error-executing-step-popover-is-not-a-function/346625
**Category:** Synthetics
**Created:** [November 7, 2023, 2:31pm UTC](https://discuss.elastic.co/t/elastic-synthetics-error-executing-step-popover-is-not-a-function/346625 "2023-11-07T14:31:46Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![DougR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dougr/32/48095_2.png) [@DougR](https://discuss.elastic.co/u/DougR)
#### Post date: [November 7, 2023, 2:31pm UTC](https://discuss.elastic.co/t/elastic-synthetics-error-executing-step-popover-is-not-a-function/346625/1 "2023-11-07T14:31:46Z")

</div>

I am using `@elastic/synthetics-1.5.0` to write and deploy user journeys as project monitors. They run as expected when I test them on my local workstation, however when I push them to Elastic Synthetics, they fail with the following error, which appears to be from jquery:

![image](https://us1.discourse-cdn.com/elastic/original/3X/4/8/48a655c1c7065611735b6cd7570a02555e25b086.png)

Here is the full error from the console:

```auto
Failed to load resource: the server responded with a status of 403 ()
jQuery.Deferred exception: $(...).popover is not a function TypeError: $(...).popover is not a function
    at HTMLDocument.<anonymous> (https://www.example.com/style/js/myapp/global.js?_=v73:150:15)
    at e (https://www.example.com/style/js/jquery/jquery.min.js:2:30005)
    at t (https://www.example.com/style/js/jquery/jquery.min.js:2:30307) undefined
$(...).popover is not a function

```

This appears to be an error in the page on the application side, not a script error. When I look at the output and screenshots generated by the individual steps, I am seeing what I expect to see, so it appears that this error is not interfering with the script running, but the test fails.

How can I ignore this error?

---

<div class="post-metadata">

### Author: ![shahzad31](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shahzad31/32/51637_2.png) [@shahzad31](https://discuss.elastic.co/u/shahzad31)
#### Post date: [November 7, 2023, 3:03pm UTC](https://discuss.elastic.co/t/elastic-synthetics-error-executing-step-popover-is-not-a-function/346625/2 "2023-11-07T15:03:54Z")

</div>

Hello @DougR i believe it's related to this, though i could be wrong

> <https://github.com/elastic/synthetics/pull/862>
>
> + Errors that are captured from the \`journey/browserconsole\` gets added to the r…oot documents that causes HB to capture them as the Journey error. Even though this is wrong from the HB perspective, These top level erros from the Page are not useful as the error itself contains stack trace to minified code which are not useful for the user when looking at these browser console messages.
> 
> + This PR addresses the issue by removing the \`error\` field from the docs but still keeping the error.messages and other details which will be shown under the Step console events.

i will suggest upgrading to 1.5.2.  
Regards

---

<div class="post-metadata">

### Author: ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)
#### Post date: [November 7, 2023, 3:22pm UTC](https://discuss.elastic.co/t/elastic-synthetics-error-executing-step-popover-is-not-a-function/346625/3 "2023-11-07T15:22:28Z")

</div>

One question I have is how are you running the journeys with the Elastic stack. Are you using elastic-agent or the synthetics service? I don't believe 1.5.0 was bundled with any versions of the Elastic stack where this would have been an issue.

---

<div class="post-metadata">

### Author: ![DougR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dougr/32/48095_2.png) [@DougR](https://discuss.elastic.co/u/DougR)
#### Post date: [November 7, 2023, 3:31pm UTC](https://discuss.elastic.co/t/elastic-synthetics-error-executing-step-popover-is-not-a-function/346625/4 "2023-11-07T15:31:13Z")

</div>

Thanks, @shahzad31 !

I've tried this based on your recommendation, but am still receiving the same error. Based on the error, it appears as if it's not the 403 error itself that is causing the failure, so this patch may be working as expected.

However, it looks as if there may be a jquery function (`popover`) that is missing. Other information I've found indicates that this could also be related to conflicting versions of jquery being used by the target application, which I don't have any control over.

Any other suggestions? Is there a playwright option that I haven't been able to find that might resolve this? Is there a way that I can ignore any errors except those explicitly thrown by my script (e.g., `await expect(...).toBeTruthy()`)? I'm not the most familiar with TypeScript, but can I `catch` that error?

Thx!

---

<div class="post-metadata">

### Author: ![DougR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dougr/32/48095_2.png) [@DougR](https://discuss.elastic.co/u/DougR)
#### Post date: [November 7, 2023, 3:52pm UTC](https://discuss.elastic.co/t/elastic-synthetics-error-executing-step-popover-is-not-a-function/346625/5 "2023-11-07T15:52:59Z")

</div>

@Andrew_Cholakian1 -

> [@Andrew\_Cholakian1](#):
>
> One question I have is how are you running the journeys with the Elastic stack. Are you using elastic-agent or the synthetics service? I don't believe 1.5.0 was bundled with any versions of the Elastic stack where this would have been an issue.

I'm not quite certain of the distinction you're making, but I'm writing the journeys locally on my machine with `@elastic/synthetics ^1.5.2`. They're being pushed with the `npm run push` command, and being deployed to private locations in our EKS environment running the `elastic-agent-complete-8.10.4` image.

Do I need to wait for the next version of Elastic Agent to be released before I can resolve this issue?

Thx.

---

<div class="post-metadata">

### Author: ![vigneshshanmugam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vigneshshanmugam/32/40324_2.png) [@vigneshshanmugam](https://discuss.elastic.co/u/vigneshshanmugam)
#### Post date: [November 7, 2023, 5:37pm UTC](https://discuss.elastic.co/t/elastic-synthetics-error-executing-step-popover-is-not-a-function/346625/6 "2023-11-07T17:37:07Z")

</div>

Hi @DougR,

The problem you are running in to is fixed already - [fix: remove top level errors from pagerror events by vigneshshanmugam · Pull Request #862 · elastic/synthetics · GitHub](https://github.com/elastic/synthetics/pull/862). But its only available on the latest Elastic Stack images.

The Elastic stack image `8.10.4` seems to be using the old synthetics agent version which is affected by this bug. You can confirm the version of the synthetics package by looking for the synthetics documents and checking this field `package.version`.

There are two workarounds here,

1. Using `8.10.3` which should have the older version of Synthetics
2. Waiting for the next release `8.11.0` which would be released with this fix.

I would suggest downgrading the stack to `8.10.3` version to work around it for now and move to 8.11 once the release is out.

We are working on improving this workflow, where you can control the version of the agent for Project based monitors. But unfortunately its not yet available. Please do let us know if you need further information.

Thanks,  
Vignesh

---

<div class="post-metadata">

### Author: ![DougR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dougr/32/48095_2.png) [@DougR](https://discuss.elastic.co/u/DougR)
#### Post date: [November 7, 2023, 6:50pm UTC](https://discuss.elastic.co/t/elastic-synthetics-error-executing-step-popover-is-not-a-function/346625/7 "2023-11-07T18:50:09Z")

</div>

Thanks - that's exactly what I needed to know; I had already gone in and checked the version of `@elastic/synthetics` inside the image and seen that it was `v1.5.0`, good to know that's also a field in the synthetics documents. It actually looks as if 8.11.0 was released today, so I'll upgrade to it, then downgrade to 8.10.3, if necessary for some reason.

I appreciate the help!

---

<div class="post-metadata">

### Author: ![DougR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dougr/32/48095_2.png) [@DougR](https://discuss.elastic.co/u/DougR)
#### Post date: [November 8, 2023, 8:19pm UTC](https://discuss.elastic.co/t/elastic-synthetics-error-executing-step-popover-is-not-a-function/346625/8 "2023-11-08T20:19:04Z")

</div>

Everything is working as expected on 8.11.0. Thanks for the help.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [December 6, 2023, 8:19pm UTC](https://discuss.elastic.co/t/elastic-synthetics-error-executing-step-popover-is-not-a-function/346625/9 "2023-12-06T20:19:05Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
