Twitter embeds not working 99% of the time



Since 3 months ago my twitter embeds stopped working about 99% of the time (it does work for 1% of the time, after many refreshes and such)

This is the current error I see:
Uncaught (in promise) TypeError: Cannot read property ‘promise’ of undefined
at Object.o [as settingsLoaded] (widgets.js:9)
at s (widgets.js:9)
at Object.a [as isBucketed] (widgets.js:9)
at i (tweet.3f0c77e9c86dd5bae672ba9948814692.js:1)
at t. (tweet.3f0c77e9c86dd5bae672ba9948814692.js:1)
at t.hydrate (widgets.js:9)
at i.hydrate (widgets.js:8)
at widgets.js:8
at Array.forEach ()
at widgets.js:8ball:

I removed all other JS scripts I had on the page and error persists. Any idea?


Hi there! Thanks for reporting this issue. Since I cannot reproduce locally with any embedded Tweet, could you share a link to your site, and the browser environment where you are experiencing this issue?


Hey. I created a test post located here:
I removed all JS scripts from the page and left only widgets.js
refresh it many times, you’ll see for yourself that sometimes the embed works and sometimes it returns the error i mentioned.

it happens on all browsers, both desktop & mobile


hey, any update on this?


please? any help?


Hi @ob1234,

Can you try loading widgets.js over https and see if that fixes the issue?


it didn’t solve the problem for 100% of the time. still sometimes it works and sometimes it doesnt.


Is there any way you could help us to help you to narrow this down?

  • provide links to your sites where this is an issue for you
  • provide more information about specifically what is happening
  • provide data on the platforms and browsers where you are encountering the issue

“It doesn’t work 100% of the time” is not really enough to help us to help you debug, so the more specific you can be, the more likely we may be to provide good advice.


few examples:

you need more links?

it happens on all platforms/browsers. i made many tests.


Does this problem happen for you on other websites where Tweets are embedded? (Like this article). Or is the problem only on your own website?


i don’t browse many other websites, i have seen that problem only on my site.
on the article you provided it did work


We may have an idea of what’s happening, it looks like a timing issue. It may be because you are synchronously adding the widgets.js script, which is something we do not recommend. Normally you can use use async to your script tag but you also use the factory javascript apis (twttr.widgets.createTweet), so I recommend you use our async script template.


<script>window.twttr = (function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0],
    t = window.twttr || {};
  if (d.getElementById(id)) return t;
  js = d.createElement(s); = id;
  js.src = "";
  fjs.parentNode.insertBefore(js, fjs);

  t._e = [];
  t.ready = function(f) {

  return t;
}(document, "script", "twitter-wjs"));</script>
twttr.ready(function () {
		    theme: 'white'

Hope that workaround helps. We are working on a fix on our end but it is complicated and might take longer. Sorry about that!


that doesn’t seem to work… i get the following error:
Uncaught ReferenceError: twttr is not defined



Any update on this issue?



Hey, any update on this issue?


There was a fix deployed recently that I hope addressed your problem.


There’s still a problem.

the error now is (chrome):
Refused to execute script from ‘’ because its MIME type (’’) is not executable, and strict MIME type checking is enabled.

and for firefox:

Loading failed for the with source “”.

you can check it by entering the links i provided in my previous messages


That’s probably because there’s a weird ?s21 in your code. I don’t quite know how you got that.

    theme: 'white'

Remove ?s=21 and that should hopefully take care of it.

    theme: 'white'


Seems to work now, I’ll continue to monitor it. thanks!

closed #20

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.