Error embedding Discourse comments on first page loading

Hi,

I successfully embedded Discourse comments on my website.

Although, on the very first loading of the page, the discussion keeps loading for a while, and then I get an “Error Embedding” message. I neeed to refresh the page once to make it work.

When I check the browser console, I get this error :

The incriminated file is /assets/_embed-application-9cef8308c816fc1d83137e63d6c556c6cc2b68fe2b6e5ce16cca6766ba2c0ae4.js, on Discourse, but I wouldn’t know if it is a Discourse or a Drupal issue, since it’s the CMS I’m using for my website.

I think the problem could come from the way I retrieve the current url in Drupal, but I don’t know what exactly is the error in the js file.

Could somebidy help with this matter ?