Method webWidget:on.open does not exist. | Community
Skip to main content

Method webWidget:on.open does not exist.

  • September 13, 2022
  • 14 replies
  • 0 views

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

14 replies

  • September 19, 2022

Hi @vassilis

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!


Dmitry20
  • September 20, 2022

@dainne

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.


Dmitry20
  • October 6, 2022

@dainne 

Hi. Any motion on this?


Brett13
  • Community Manager
  • October 6, 2022
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!

Matt121
  • November 1, 2022

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


  • Author
  • November 1, 2022

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.


Dmitry20
  • November 2, 2022

@brett13

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);
});
```

  • Author
  • November 7, 2022

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


Andrej13
  • November 15, 2022

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.


  • Author
  • November 15, 2022

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

 

Andrej13
  • November 16, 2022

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

 


Adrian25
  • May 7, 2024

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


Tipene
  • May 8, 2024
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.?

Dr.13
  • August 1, 2024

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