JavaScript
Article

Skipping duplicate osapi method definition friendconnect.js

By Sam Deering

This JavaScript error message was appearing when i included Google Friend Connect. It is very anoying so I decided to try and fix it.

This was the full error message:


Skipping duplicate osapi method definition chili.people.list on transport Googleapis; others may exist, but suppressing warnings
friendconnect.js (line 121)
Skipping duplicate osapi method definition pos.plusones.list on transport Googleapis; others may exist, but suppressing warnings
friendconnect.js (line 121)
Skipping duplicate osapi method definition chili.entities.starred.insert on transport Googleapis; others may exist, but suppressing warnings
friendconnect.js (line 121)
Skipping duplicate osapi method definition chili.entities.get on transport Googleapis; others may exist, but suppressing warnings
friendconnect.js (line 121)
Skipping duplicate osapi method definition chili.groups.list on transport Googleapis; others may exist, but suppressing warnings
friendconnect.js (line 121)
Skipping duplicate osapi method definition chili.activities.list on transport Googleapis; others may exist, but suppressing warnings
friendconnect.js (line 121)
Skipping duplicate osapi method definition chili.entitiesDefaultAcl.get on transport Googleapis; others may exist, but suppressing warnings
friendconnect.js (line 121)
Skipping duplicate osapi method definition Googleapis.newHttpRequest on transport Googleapis; others may exist, but suppressing warnings

If we inspect friendconnect.js line 121:

}if(j===a&&g.warn){g.warn(i)

Line 121 sits inside this function (the full Google connect script is loaded from here: http://www.Google.com/friendconnect/script/friendconnect.js):

function b(j,i){
	if(j



Solution

I google’d it and someone said to “Clear your browser cache, and try again”. This didn’t work for me and I highly suspect it’s a bug in google’s friend connect code.

Include only the following code from the full google friend connect code supplied by the google website to insert.

//PASTE BEFORE TAG (IN WORDPRESS HEADER.PHP CODE)




//PASTE INTO THE WIDGET AREA (IN WORDPRESS A TEXT WIDGET)

//PASTE BEFORE TAG (IN WORDPRESS FOOTER.PHP CODE)

Similar errors which this may also fix:
Unsafe JavaScript attempt to access frame with URL https://clients6.google.com/static/proxy.html
Uncaught TypeError: Cannot call method ‘tickDl’ of undefined

Free Guide:

7 Habits of Successful CTOs

"What makes a great CTO?" Engineering skills? Business savvy? An innate tendency to channel a mythical creature (ahem, unicorn)? All of the above? Discover the top traits of the most successful CTOs in this free guide.

No Reader comments

Recommended
Sponsors
Because We Like You
Free Ebooks!

Grab SitePoint's top 10 web dev and design ebooks, completely free!

Get the latest in JavaScript, once a week, for free.