Recent searches


No recent searches

Method webWidget:on.open does not exist.

Answered


Posted Sep 13, 2022

Although the messaging widget seems to work correctly, we get this error from many users in our error reports in Sentry. Any idea what may cause this error? We switched from classic to messaging about a month ago and we have updated the embed code.

Error: Method webWidget:on.open does not exist. Check out the Developer API docs to make sure you're implementing it correctly, https://developer.zendesk.com/embeddables/docs/zendesk-sdk-for-web/getting_started


1

14

14 comments

image avatar

Dainne Kiara Lucena-Laxamana

Zendesk Customer Care

Hi Vassilis Terzopoulos

To look into this further we would need to grab a couple of details from your implementation so I went ahead & created a ticket on your behalf so we can work on this. Please keep an eye out for our email!

0


Dainne Kiara Lucena-Laxamana

Hi! I would love to know about this as well. We observe the same warning on production. If you need any details / assistance, feel free to reach.

0


Dainne Kiara Lucena-Laxamana 

Hi. Any motion on this?

0


image avatar

Brett Bowser

Zendesk Community Manager

Hey Dmitry,

I did some digging and it looks like the above issue was related to some old widget code being used. I would recommend checking your website and making sure you're using the new widget code as mentioned here: https://developer.zendesk.com/documentation/zendesk-web-widget-sdks/sdks/web/sdk_api_reference/
 
You can see in the above documentation that it uses zE('messenger' instead of the classic one zE('webWidget.

Hope this helps point you in the right direction!

0


Hi Brett, 

I'm experiencing the same problem after upgrading from classic to Messenger. Have scoured our codebase for any remaining calls to `webWidget`, and found none. Moreover, we don't have any sort of event handler wired up for `'messenger:on' 'open'`. It really seems as though this is being called somewhere within the Messenger SDK code on initialization and being caught by Sentry, which then alerts our users to the bug.

Any help here would be greatly appreciated!
Matt

0


We keep having them too... many of them in our Sentry logs!

I am attaching a screenshot from my console just in case you may find it useful.

Thanks.

1


Brett Bowser

Hi, thanks for your reply.

Yep i'm aware that these methods look like they're from a legacy codebase. However, we use the new api, as is described in the link you provided.

Namely, this script is injected: 

 
and initialized with
 
```
window?.zE?.('messenger', 'loginUser', (callback) => {
callback(response.data.token);
});
```

0


Can we get some feedback on this issue? Is it reported to the Zendesk dev team? Is there a fix planned for release soon?

Thank you

0


I see the same error message, but it's coming from LogRocket code which has Zendesk integration. Seems they still use the old api to detect when widget is opened.

1


That makes sense. Just sent a message to LogRocket support. Thanks Andrej!

 

0


I already contacted them and they confirmed the issue on their side:

 

1


May 2024 and this still seems to be a thing, only using zE('messenger', 'show'); or zE('messenger', 'hide'); in codebase

0


image avatar

Tipene Hughes

Zendesk Developer Advocacy

Hey Adrian,
 
I've done some testing on my end and haven't been able to replicate what you're seeing. With that said, the comments above indicate that this error may be generated by a third-party service. Does your environment match with those described above? i.e are the errors being captured via log rocket, sentry, etc.?

0


Hi, 

 

I try to customize Zendesk Chat Widget using the below command in REACT:

 

    setColorTheme(themeColor, launcherColor, buttonColor) {

        window.zE('webWidget', 'updateSettings', {

          webWidget: {

            color: {

              theme: themeColor,

              launcher: launcherColor,

              button: buttonColor

            }

          }

        });

      }

 

console.log report that: 

 

Error: 
Method webWidget.updateSettings does not exist.

Check out the Developer API docs to make sure you're implementing it correctly, https://developer.zendesk.com/embeddables/docs/zendesk-sdk-

 

 

What can I modify this command?

 

Thank you very much

 

Man

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post