ember-inspector icon indicating copy to clipboard operation
ember-inspector copied to clipboard

Facebook SDK + Ember Inspector --> Warning in console

Open consideRatio opened this issue 11 years ago • 13 comments

I recieve this warning: "Received message of type object from http://localhost:4200, expected a string" (sdk.js:61) when I use both Facebook SDK in combination with Ember Inspector. If i remove either of these the warning disappears.

I've not managed to reproduce this in JSBin or JSFiddle since of the nature of the problem requires ember-inspector to spot the ember app, but... If you use this HTML: https://gist.github.com/consideRatio/bb19184def6c9fac7eb3 And paste it in: http://www.w3schools.com/html/tryit.asp?filename=tryhtml_intro

The warning will appear just as it do for me I think.

The source of the warning in a non-minified version is here: http://connect.facebook.net/en_US/sdk/debug.js

The GIST above also contains the facebook sdk.js part that triggers the warning, and this part might be of value to evaluate this issue: DOMEventListener.add(window, 'message', thisPassedFunctionGeneratesTheWarning, 'entry', 'onMessage'));)

Non-minified version of facebooks SDK.js: http://connect.facebook.net/en_US/sdk/debug.js

consideRatio avatar Jan 12 '15 23:01 consideRatio

It is strange that Facebook SDK is assuming that it is the intended recipient of all window messages. Or am I missing something?

They warn if you send any non-string window message even if the message isn't for them. You can see the warning here even with Ember Inspector disabled: http://jsbin.com/raquli.

teddyzeenny avatar Jan 19 '15 17:01 teddyzeenny

Seeing this as well, in Chrome and Firefox.

seanlinsley avatar Feb 18 '15 17:02 seanlinsley

I'm seeing this, but it is complaining that it is from twitter:

Received message of type object from http://platform.twitter.com, expected a string http://connect.facebook.net/en_US/sdk.js:64

tmorehouse avatar May 23 '15 22:05 tmorehouse

Also seeing this error, facebook thinks it's coming from twitter. Not using ember btw.

Received message of type object from https://platform.twitter.com, expected a string

digitaldavenyc avatar Jun 16 '15 18:06 digitaldavenyc

idem

Received message of type object from http://platform.twitter.com, expected a string

drAlberT avatar Jun 18 '15 11:06 drAlberT

This isn't really an error and is just warning, every huge company throws some stupid error or warning that is inconsequential. The YouTube player throws an actual error looking for a chromecast plugin, it doesn't actually break any code on your site since it's encapsulated.

GET chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/cast_sender.js net::ERR_FAILED

I wouldn't concern yourself with it.

digitaldavenyc avatar Jun 18 '15 14:06 digitaldavenyc

So the answer to this is, if YouTube throws perfectly preventable errors, then we can do the same with our application?.......

smorhaim-original avatar Jun 19 '15 14:06 smorhaim-original

Ember is not the problem, you can't stop other companies from doing dumb things.

Sent from my iPhone

On Jun 19, 2015, at 10:07 AM, smorhaim [email protected] wrote:

So the answer to this is, if YouTube throws perfectly preventable errors, then we can do the same with our application?.......

— Reply to this email directly or view it on GitHub.

digitaldavenyc avatar Jun 19 '15 14:06 digitaldavenyc

It looks to me like this is not "preventable" from our side, unless anyone has ideas? This is probably something Facebook should fix.

teddyzeenny avatar Jun 19 '15 14:06 teddyzeenny

There is something you can do -- there are now two bug reports about this, you can subscribe and comment on them to explain why this matters to you:

https://developers.facebook.com/bugs/612223468855371/ https://developers.facebook.com/bugs/857134114375190/

jpadvo avatar Jul 21 '15 15:07 jpadvo

Thank you @jpadvo. Subscribed and commented: https://developers.facebook.com/bugs/612223468855371/?comment_id=1477095832610798

teddyzeenny avatar Aug 10 '15 11:08 teddyzeenny

Looks like the fix is ready and should be pushed next Tuesday: https://developers.facebook.com/bugs/612223468855371

teddyzeenny avatar Aug 11 '15 20:08 teddyzeenny

Fixed by Facebook.

teddyzeenny avatar Aug 27 '15 12:08 teddyzeenny