Skip to main content

Skipping duplicate osapi method definition friendconnect.js

By Sam Deering
JavaScript
Share:

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: https://www.Google.com/friendconnect/script/friendconnect.js):

function b(j,i){
	if(jSolution

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)
<!-- Include the Google Friend Connect javascript library. -->
<script type="text/javascript" src="https://www.google.com/friendconnect/script/friendconnect.js"></script>

//PASTE INTO THE WIDGET AREA (IN WORDPRESS A TEXT WIDGET)
<!-- Define the div tag where the gadget will be inserted. -->
<div id="div-6554152229350516721" style="width:210px;border:1px solid #cccccc;"></div>

//PASTE BEFORE  TAG (IN WORDPRESS FOOTER.PHP CODE)
<script>
window.JSON = {
parse: function(st){
		return st.evalJSON();
	},
stringify: function(obj){
		return Object.toJSON(obj);
	}
};
</script>
<!-- Render the gadget into a div. -->
<script type="text/javascript">
var skin = {};
skin['BORDER_COLOR'] = '#cccccc';
skin['ENDCAP_BG_COLOR'] = '#ff9900';
skin['ENDCAP_TEXT_COLOR'] = '#333333';
skin['ENDCAP_LINK_COLOR'] = '#0000cc';
skin['ALTERNATE_BG_COLOR'] = '#ffffff';
skin['CONTENT_BG_COLOR'] = '#ffffff';
skin['CONTENT_LINK_COLOR'] = '#0000cc';
skin['CONTENT_TEXT_COLOR'] = '#333333';
skin['CONTENT_SECONDARY_LINK_COLOR'] = '#7777cc';
skin['CONTENT_SECONDARY_TEXT_COLOR'] = '#666666';
skin['CONTENT_HEADLINE_COLOR'] = '#333333';
skin['NUMBER_ROWS'] = '5';
google.friendconnect.container.setParentUrl('/' /* location of rpc_relay.html and canvas.html */);
google.friendconnect.container.renderMembersGadget(
 { id: 'div-6554152229350516721',
   site: '15032953902720272541' },
  skin);
</script>

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

Sam Deering has 15+ years of programming and website development experience. He was a website consultant at Console, ABC News, Flight Centre, Sapient Nitro, and the QLD Government and runs a tech blog with over 1 million views per month. Currently, Sam is the Founder of Crypto News, Australia.

Integromat Tower Ad