Getting TypeError: e is null http://platform.twitter.com/widgets.js Line 43 from twttr.widgets.createShareButton


#1

We recently started seeing “TypeError: e is null http://platform.twitter.com/widgets.js 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.


#2

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.

Ben


#3

Hi Ben,

Thanks for looking into it. Here’s an example page: http://www.foodie.com/recipes/crispy-christmas-gingersnap-cookies

Our usage is likewise minified, but I’ve extracted the relevant JS to this fiddle: http://jsfiddle.net/RF7zk/

Thanks!
-bri


#4

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: https://dev.twitter.com/docs/tfw/factories

Ben


#5

#6