Getting TypeError: e is null Line 43 from twttr.widgets.createShareButton


We recently started seeing “TypeError: e is null Line 43” in response to a call to twttr.widgets.createShareButton. Is anyone else seeing this? Is there an unminified version of widgets.js we can use for testing/debugging? This call had been working for about a year until now.


Thanks for the report Brian. I’m looking into the cause of the bug, which I think relates to invocation of a callback argument in the event of an error. However, to verify do you have a URL we can reproduce the bug against, or a JSFiddle demonstrating the error case?

I’m afraid there is no unminified or version of widgets-js or sourcemap available at this time.



Hi Ben,

Thanks for looking into it. Here’s an example page:

Our usage is likewise minified, but I’ve extracted the relevant JS to this fiddle:



Thanks Brian.

We’ve got a fix in the queue and the error will clear up shortly. For what it’s worth, we’ve cleaned up the factories recently so that you needn’t include null as a callback before the options hash now. We’ve updated the documentation this week: