-
-
Notifications
You must be signed in to change notification settings - Fork 411
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Widget embed seems to only intermittently work. The issue seems to fire less frequently in Safari, but seems to be consistent with Chrome and Firefox - possibly a race condition.
An error is presented in the console:
hook.js:608 HiEvent widget error: Invalid script URL
To Reproduce
Steps to reproduce the behavior:
- embed the script in the tags: <script async src="https://someexternaldomain.com/widget.js"></script> (note that the hi.events domain is different to the domain where the widget is embedded)
- Embed a widget into the page
- Loading the page intermittently throws the error. I had some luck re-producing more often the embed website being in http://.
Additional context
widget.js
uses document.currentScript
in order to retrieve the current hostname. I believe this is not always reliable in every browser or scenario. PR incoming.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working