• I am trying to embed a Microsoft bot-framework bot into our website, however, I am running into an issue related to the library from Microsoft that is needed to make this embedding work. As a note, everything I am about to show below works perfectly fine locally.

    <script crossorigin="anonymous" src="https://cdn.botframework.com/botframework-webchat/latest/webchat.js"></script>

    The error we are getting is a syntax error within “webchat.js”, which again is an imported library and not my code.

    The error encountered is this exactly: “Uncaught SyntaxError: Unexpected token ‘}’ webchat.js:2”

    My chat widget code is working fine except for the embedding from Microsoft as it is returning the error above and not importing the library properly.

    I tried adding my code to WordPress through two plugins: “WP Code” and “WP Coder” with the same error.

    I have not encountered anyone else online with the issue and the only possible solution I found was to disable all other plugins, which did not work either.

    Thanks for the help in advance, and as a reminder everything uploaded to WordPress was tested locally through basic HTML and JS and works fine.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    That kind of error that only occurs on a specific installation is often due to some sort of optimizer script that’s not working correctly. There’s no evidence you’re using one, but there is also nothing regarding a request for webchat.js. I understand if you’ve disabled that part since it isn’t working.

    FWIW, your linked page has other script errors on it.

    If you’re not running any sort of optimizer script on your site and the error only occurs on that specific server, I recommend seeking the assistance of your host, they may be running some sort of low level optimization that’s corrupting your script.

Viewing 1 replies (of 1 total)

The topic ‘Issue embedding Microsoft Bot-Framework into website’ is closed to new replies.