google sign-in button not renderingGoogle plus sign in button not rendered when onlineTrigger a button click with JavaScript on the Enter key in a text boxWhy would a JavaScript variable start with a dollar sign?How can I know which radio button is selected via jQuery?Why does Google prepend while(1); to their JSON responses?Google OAuth 2 authorization - Error: redirect_uri_mismatchJavaScript plus sign in front of function nameGoogle sign-in with Java Spring security applicationgoogle oauth authentication loginRefusing to load Google Sign-In(platform.js) script on Chrome AppWhy can't I get the alert to show?

What is the highest possible scrabble score for placing a single tile

Can you use Vicious Mockery to win an argument or gain favours?

Review your own paper in Mathematics

What fields between the rationals and the reals allow a good notion of 2D distance?

Why should universal income be universal?

Does the Linux kernel need a file system to run?

What is the difference between lands and mana?

Has any country ever had 2 former presidents in jail simultaneously?

Why do Radio Buttons not fill the entire outer circle?

15% tax on $7.5k earnings. Is that right?

Does "he squandered his car on drink" sound natural?

How much theory knowledge is actually used while playing?

What features enable the Su-25 Frogfoot to operate with such a wide variety of fuels?

How does electrical safety system work on ISS?

Is this toilet slogan correct usage of the English language?

PTIJ: Why is Haman obsessed with Bose?

What to do when eye contact makes your coworker uncomfortable?

Why does AES have exactly 10 rounds for a 128-bit key, 12 for 192 bits and 14 for a 256-bit key size?

What's the name of the logical fallacy where a debater extends a statement far beyond the original statement to make it true?

How do I fix the group tension caused by my character stealing and possibly killing without provocation?

Is there any evidence that Cleopatra and Caesarion considered fleeing to India to escape the Romans?

Is there a nicer/politer/more positive alternative for "negates"?

How many arrows is an archer expected to fire by the end of the Tyranny of Dragons pair of adventures?

Are Captain Marvel's powers affected by Thanos breaking the Tesseract and claiming the stone?



google sign-in button not rendering


Google plus sign in button not rendered when onlineTrigger a button click with JavaScript on the Enter key in a text boxWhy would a JavaScript variable start with a dollar sign?How can I know which radio button is selected via jQuery?Why does Google prepend while(1); to their JSON responses?Google OAuth 2 authorization - Error: redirect_uri_mismatchJavaScript plus sign in front of function nameGoogle sign-in with Java Spring security applicationgoogle oauth authentication loginRefusing to load Google Sign-In(platform.js) script on Chrome AppWhy can't I get the alert to show?













2















I'm trying to build a chrome extension (very new to extension programming). I want to use the google login button to authenticate users with their google accounts. I've been following many tutorials (and have done a lot of researching) such as this one https://developers.google.com/identity/sign-in/web/sign-in#before_you_begin. i cant find any that have fixed the rendering problem. I'm getting this error, but not sure if it is the cause of my problem.



message: "Invalid cookiePolicy"
stack: "gapi.auth2.ExternallyVisibleError: Invalid cookiePolicy



My manifest.json file:



(Keys have been modified)






	
"name": "Save My Pass",
"version": "1.1",
"description": "Create a useful tool that will help eliminate the worries of remembering and managing passwords by yourself.",
"manifest_version": 2,
"author":"Austin Jerich",
"permissions": ["identity", "storage", "https://*.google.com/"],

"background":
"scripts": [
"js/background.js"
],
"persistent": false
,

"content_scripts": [
"js": ["js/oauth.js"],
"matches": ["http://*/*"]
],

"content_security_policy": "script-src 'self' https://apis.google.com; object-src 'self'",

"browser_action":
"default_popup": "pages/home.html",
"default_icon": "images/icon_48.png"
,

"icons":
"48": "images/icon_48.png"
,

"options_page": "pages/options.html",

"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmeybG4Q1WXCLsMw0zPaBqi2f02sNSXEwDn8bH0G1TqqLtO0IRKXlXpRVYPiAP3vyeLya6VgjbXhSBI9JqqZxSJtjhK2iHUNEN2SHWG4KS6E5NqmsvpxoZCSWQBhx2omOfpggGTjbIKEgULJQLWEYmsvu6YAPdsbpB49sZ5A/x4udI1WecwYumWKgWB3oFSpwuvcEBeldMPvLCcRahIPC469zvAHFhHNhqQIDAQAB",


"oauth2":
"client_id": "1976054582-cjejnq5eh1sci558rb0evq.apps.googleusercontent.com",
"scopes": ["https://www.googleapis.com/auth/contacts.readonly"]






The login.html file where the google sign-in button is located:






<!DOCTYPE html>
<html>
<head>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<!--<script src="https://apis.google.com/js/platform.js?onload=init" async defer></script>-->

<meta name="google-signin-client_id" content="1976054582-cjejnq5eh1sc58rb0evq.apps.googleusercontent.com">

<script type="text/javascript" src="/js/oauth.js"></script>
<link rel="stylesheet" href="/css/default.css">
<style>
h2
text-align: center;


#submit
text-align: center;


#username, #password
display: block;
margin-right: auto;
margin-left: auto;

</style>
</head>
<body>
<h2>SaveMyPass</h2>
<!--<input type="text" id="username" placeholder="Username"></input>
<input type="password" id="password" placeholder="Password"></input>-->
<div id="submit"><input type="submit" id="btn-login" value="Login"></input></div>
<div class="g-signin2" data-onsuccess="onSignIn"></div>

</body>
</html>





The oauth.js file i was working with earlier (not sure if relevant or not)






 window.onload=function() 
document.querySelector('#btn-login').addEventListener('click', function()
console.log("click login")
chrome.identity.getAuthToken(interactive: true, function(token)
let init =
method: 'GET',
async: true,
headers:
Authorization: 'Bearer ' + token,
'Content-Type': 'application/json'
,
'contentType': 'json'
;
);
);
;












share|improve this question
























  • 1) The error message says your CSP has https://apis.google.com/js/platform.js (which would be wrong) but the posted code is correct - did you reload the extension on chrome://extensions page? 2) Unrelated to the problem per se, but "content_scripts" can only list local files in your extension package, not remote files, and it's only to have that script run alongside web pages, which is probably not what you need. 3) I would expect existing examples for this exact task to be somewhere on the web, try searching more.

    – wOxxOm
    Mar 6 at 5:16












  • @w i modified the content and background scripts and changed the oauth.js file. that got rid of the script load error. but did not get the google sign-in button to appear (which was my original problem).

    – Austin J
    Mar 6 at 6:23











  • @wOxxOm I found this question stackoverflow.com/questions/21117659/…. a solution was to render the button after loading the JS file, but i dont think this is my problem. i did a lot of searching, but couldnt find anything that can get it to render.

    – Austin J
    Mar 6 at 7:03
















2















I'm trying to build a chrome extension (very new to extension programming). I want to use the google login button to authenticate users with their google accounts. I've been following many tutorials (and have done a lot of researching) such as this one https://developers.google.com/identity/sign-in/web/sign-in#before_you_begin. i cant find any that have fixed the rendering problem. I'm getting this error, but not sure if it is the cause of my problem.



message: "Invalid cookiePolicy"
stack: "gapi.auth2.ExternallyVisibleError: Invalid cookiePolicy



My manifest.json file:



(Keys have been modified)






	
"name": "Save My Pass",
"version": "1.1",
"description": "Create a useful tool that will help eliminate the worries of remembering and managing passwords by yourself.",
"manifest_version": 2,
"author":"Austin Jerich",
"permissions": ["identity", "storage", "https://*.google.com/"],

"background":
"scripts": [
"js/background.js"
],
"persistent": false
,

"content_scripts": [
"js": ["js/oauth.js"],
"matches": ["http://*/*"]
],

"content_security_policy": "script-src 'self' https://apis.google.com; object-src 'self'",

"browser_action":
"default_popup": "pages/home.html",
"default_icon": "images/icon_48.png"
,

"icons":
"48": "images/icon_48.png"
,

"options_page": "pages/options.html",

"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmeybG4Q1WXCLsMw0zPaBqi2f02sNSXEwDn8bH0G1TqqLtO0IRKXlXpRVYPiAP3vyeLya6VgjbXhSBI9JqqZxSJtjhK2iHUNEN2SHWG4KS6E5NqmsvpxoZCSWQBhx2omOfpggGTjbIKEgULJQLWEYmsvu6YAPdsbpB49sZ5A/x4udI1WecwYumWKgWB3oFSpwuvcEBeldMPvLCcRahIPC469zvAHFhHNhqQIDAQAB",


"oauth2":
"client_id": "1976054582-cjejnq5eh1sci558rb0evq.apps.googleusercontent.com",
"scopes": ["https://www.googleapis.com/auth/contacts.readonly"]






The login.html file where the google sign-in button is located:






<!DOCTYPE html>
<html>
<head>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<!--<script src="https://apis.google.com/js/platform.js?onload=init" async defer></script>-->

<meta name="google-signin-client_id" content="1976054582-cjejnq5eh1sc58rb0evq.apps.googleusercontent.com">

<script type="text/javascript" src="/js/oauth.js"></script>
<link rel="stylesheet" href="/css/default.css">
<style>
h2
text-align: center;


#submit
text-align: center;


#username, #password
display: block;
margin-right: auto;
margin-left: auto;

</style>
</head>
<body>
<h2>SaveMyPass</h2>
<!--<input type="text" id="username" placeholder="Username"></input>
<input type="password" id="password" placeholder="Password"></input>-->
<div id="submit"><input type="submit" id="btn-login" value="Login"></input></div>
<div class="g-signin2" data-onsuccess="onSignIn"></div>

</body>
</html>





The oauth.js file i was working with earlier (not sure if relevant or not)






 window.onload=function() 
document.querySelector('#btn-login').addEventListener('click', function()
console.log("click login")
chrome.identity.getAuthToken(interactive: true, function(token)
let init =
method: 'GET',
async: true,
headers:
Authorization: 'Bearer ' + token,
'Content-Type': 'application/json'
,
'contentType': 'json'
;
);
);
;












share|improve this question
























  • 1) The error message says your CSP has https://apis.google.com/js/platform.js (which would be wrong) but the posted code is correct - did you reload the extension on chrome://extensions page? 2) Unrelated to the problem per se, but "content_scripts" can only list local files in your extension package, not remote files, and it's only to have that script run alongside web pages, which is probably not what you need. 3) I would expect existing examples for this exact task to be somewhere on the web, try searching more.

    – wOxxOm
    Mar 6 at 5:16












  • @w i modified the content and background scripts and changed the oauth.js file. that got rid of the script load error. but did not get the google sign-in button to appear (which was my original problem).

    – Austin J
    Mar 6 at 6:23











  • @wOxxOm I found this question stackoverflow.com/questions/21117659/…. a solution was to render the button after loading the JS file, but i dont think this is my problem. i did a lot of searching, but couldnt find anything that can get it to render.

    – Austin J
    Mar 6 at 7:03














2












2








2








I'm trying to build a chrome extension (very new to extension programming). I want to use the google login button to authenticate users with their google accounts. I've been following many tutorials (and have done a lot of researching) such as this one https://developers.google.com/identity/sign-in/web/sign-in#before_you_begin. i cant find any that have fixed the rendering problem. I'm getting this error, but not sure if it is the cause of my problem.



message: "Invalid cookiePolicy"
stack: "gapi.auth2.ExternallyVisibleError: Invalid cookiePolicy



My manifest.json file:



(Keys have been modified)






	
"name": "Save My Pass",
"version": "1.1",
"description": "Create a useful tool that will help eliminate the worries of remembering and managing passwords by yourself.",
"manifest_version": 2,
"author":"Austin Jerich",
"permissions": ["identity", "storage", "https://*.google.com/"],

"background":
"scripts": [
"js/background.js"
],
"persistent": false
,

"content_scripts": [
"js": ["js/oauth.js"],
"matches": ["http://*/*"]
],

"content_security_policy": "script-src 'self' https://apis.google.com; object-src 'self'",

"browser_action":
"default_popup": "pages/home.html",
"default_icon": "images/icon_48.png"
,

"icons":
"48": "images/icon_48.png"
,

"options_page": "pages/options.html",

"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmeybG4Q1WXCLsMw0zPaBqi2f02sNSXEwDn8bH0G1TqqLtO0IRKXlXpRVYPiAP3vyeLya6VgjbXhSBI9JqqZxSJtjhK2iHUNEN2SHWG4KS6E5NqmsvpxoZCSWQBhx2omOfpggGTjbIKEgULJQLWEYmsvu6YAPdsbpB49sZ5A/x4udI1WecwYumWKgWB3oFSpwuvcEBeldMPvLCcRahIPC469zvAHFhHNhqQIDAQAB",


"oauth2":
"client_id": "1976054582-cjejnq5eh1sci558rb0evq.apps.googleusercontent.com",
"scopes": ["https://www.googleapis.com/auth/contacts.readonly"]






The login.html file where the google sign-in button is located:






<!DOCTYPE html>
<html>
<head>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<!--<script src="https://apis.google.com/js/platform.js?onload=init" async defer></script>-->

<meta name="google-signin-client_id" content="1976054582-cjejnq5eh1sc58rb0evq.apps.googleusercontent.com">

<script type="text/javascript" src="/js/oauth.js"></script>
<link rel="stylesheet" href="/css/default.css">
<style>
h2
text-align: center;


#submit
text-align: center;


#username, #password
display: block;
margin-right: auto;
margin-left: auto;

</style>
</head>
<body>
<h2>SaveMyPass</h2>
<!--<input type="text" id="username" placeholder="Username"></input>
<input type="password" id="password" placeholder="Password"></input>-->
<div id="submit"><input type="submit" id="btn-login" value="Login"></input></div>
<div class="g-signin2" data-onsuccess="onSignIn"></div>

</body>
</html>





The oauth.js file i was working with earlier (not sure if relevant or not)






 window.onload=function() 
document.querySelector('#btn-login').addEventListener('click', function()
console.log("click login")
chrome.identity.getAuthToken(interactive: true, function(token)
let init =
method: 'GET',
async: true,
headers:
Authorization: 'Bearer ' + token,
'Content-Type': 'application/json'
,
'contentType': 'json'
;
);
);
;












share|improve this question
















I'm trying to build a chrome extension (very new to extension programming). I want to use the google login button to authenticate users with their google accounts. I've been following many tutorials (and have done a lot of researching) such as this one https://developers.google.com/identity/sign-in/web/sign-in#before_you_begin. i cant find any that have fixed the rendering problem. I'm getting this error, but not sure if it is the cause of my problem.



message: "Invalid cookiePolicy"
stack: "gapi.auth2.ExternallyVisibleError: Invalid cookiePolicy



My manifest.json file:



(Keys have been modified)






	
"name": "Save My Pass",
"version": "1.1",
"description": "Create a useful tool that will help eliminate the worries of remembering and managing passwords by yourself.",
"manifest_version": 2,
"author":"Austin Jerich",
"permissions": ["identity", "storage", "https://*.google.com/"],

"background":
"scripts": [
"js/background.js"
],
"persistent": false
,

"content_scripts": [
"js": ["js/oauth.js"],
"matches": ["http://*/*"]
],

"content_security_policy": "script-src 'self' https://apis.google.com; object-src 'self'",

"browser_action":
"default_popup": "pages/home.html",
"default_icon": "images/icon_48.png"
,

"icons":
"48": "images/icon_48.png"
,

"options_page": "pages/options.html",

"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmeybG4Q1WXCLsMw0zPaBqi2f02sNSXEwDn8bH0G1TqqLtO0IRKXlXpRVYPiAP3vyeLya6VgjbXhSBI9JqqZxSJtjhK2iHUNEN2SHWG4KS6E5NqmsvpxoZCSWQBhx2omOfpggGTjbIKEgULJQLWEYmsvu6YAPdsbpB49sZ5A/x4udI1WecwYumWKgWB3oFSpwuvcEBeldMPvLCcRahIPC469zvAHFhHNhqQIDAQAB",


"oauth2":
"client_id": "1976054582-cjejnq5eh1sci558rb0evq.apps.googleusercontent.com",
"scopes": ["https://www.googleapis.com/auth/contacts.readonly"]






The login.html file where the google sign-in button is located:






<!DOCTYPE html>
<html>
<head>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<!--<script src="https://apis.google.com/js/platform.js?onload=init" async defer></script>-->

<meta name="google-signin-client_id" content="1976054582-cjejnq5eh1sc58rb0evq.apps.googleusercontent.com">

<script type="text/javascript" src="/js/oauth.js"></script>
<link rel="stylesheet" href="/css/default.css">
<style>
h2
text-align: center;


#submit
text-align: center;


#username, #password
display: block;
margin-right: auto;
margin-left: auto;

</style>
</head>
<body>
<h2>SaveMyPass</h2>
<!--<input type="text" id="username" placeholder="Username"></input>
<input type="password" id="password" placeholder="Password"></input>-->
<div id="submit"><input type="submit" id="btn-login" value="Login"></input></div>
<div class="g-signin2" data-onsuccess="onSignIn"></div>

</body>
</html>





The oauth.js file i was working with earlier (not sure if relevant or not)






 window.onload=function() 
document.querySelector('#btn-login').addEventListener('click', function()
console.log("click login")
chrome.identity.getAuthToken(interactive: true, function(token)
let init =
method: 'GET',
async: true,
headers:
Authorization: 'Bearer ' + token,
'Content-Type': 'application/json'
,
'contentType': 'json'
;
);
);
;








	
"name": "Save My Pass",
"version": "1.1",
"description": "Create a useful tool that will help eliminate the worries of remembering and managing passwords by yourself.",
"manifest_version": 2,
"author":"Austin Jerich",
"permissions": ["identity", "storage", "https://*.google.com/"],

"background":
"scripts": [
"js/background.js"
],
"persistent": false
,

"content_scripts": [
"js": ["js/oauth.js"],
"matches": ["http://*/*"]
],

"content_security_policy": "script-src 'self' https://apis.google.com; object-src 'self'",

"browser_action":
"default_popup": "pages/home.html",
"default_icon": "images/icon_48.png"
,

"icons":
"48": "images/icon_48.png"
,

"options_page": "pages/options.html",

"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmeybG4Q1WXCLsMw0zPaBqi2f02sNSXEwDn8bH0G1TqqLtO0IRKXlXpRVYPiAP3vyeLya6VgjbXhSBI9JqqZxSJtjhK2iHUNEN2SHWG4KS6E5NqmsvpxoZCSWQBhx2omOfpggGTjbIKEgULJQLWEYmsvu6YAPdsbpB49sZ5A/x4udI1WecwYumWKgWB3oFSpwuvcEBeldMPvLCcRahIPC469zvAHFhHNhqQIDAQAB",


"oauth2":
"client_id": "1976054582-cjejnq5eh1sci558rb0evq.apps.googleusercontent.com",
"scopes": ["https://www.googleapis.com/auth/contacts.readonly"]






	
"name": "Save My Pass",
"version": "1.1",
"description": "Create a useful tool that will help eliminate the worries of remembering and managing passwords by yourself.",
"manifest_version": 2,
"author":"Austin Jerich",
"permissions": ["identity", "storage", "https://*.google.com/"],

"background":
"scripts": [
"js/background.js"
],
"persistent": false
,

"content_scripts": [
"js": ["js/oauth.js"],
"matches": ["http://*/*"]
],

"content_security_policy": "script-src 'self' https://apis.google.com; object-src 'self'",

"browser_action":
"default_popup": "pages/home.html",
"default_icon": "images/icon_48.png"
,

"icons":
"48": "images/icon_48.png"
,

"options_page": "pages/options.html",

"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmeybG4Q1WXCLsMw0zPaBqi2f02sNSXEwDn8bH0G1TqqLtO0IRKXlXpRVYPiAP3vyeLya6VgjbXhSBI9JqqZxSJtjhK2iHUNEN2SHWG4KS6E5NqmsvpxoZCSWQBhx2omOfpggGTjbIKEgULJQLWEYmsvu6YAPdsbpB49sZ5A/x4udI1WecwYumWKgWB3oFSpwuvcEBeldMPvLCcRahIPC469zvAHFhHNhqQIDAQAB",


"oauth2":
"client_id": "1976054582-cjejnq5eh1sci558rb0evq.apps.googleusercontent.com",
"scopes": ["https://www.googleapis.com/auth/contacts.readonly"]






<!DOCTYPE html>
<html>
<head>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<!--<script src="https://apis.google.com/js/platform.js?onload=init" async defer></script>-->

<meta name="google-signin-client_id" content="1976054582-cjejnq5eh1sc58rb0evq.apps.googleusercontent.com">

<script type="text/javascript" src="/js/oauth.js"></script>
<link rel="stylesheet" href="/css/default.css">
<style>
h2
text-align: center;


#submit
text-align: center;


#username, #password
display: block;
margin-right: auto;
margin-left: auto;

</style>
</head>
<body>
<h2>SaveMyPass</h2>
<!--<input type="text" id="username" placeholder="Username"></input>
<input type="password" id="password" placeholder="Password"></input>-->
<div id="submit"><input type="submit" id="btn-login" value="Login"></input></div>
<div class="g-signin2" data-onsuccess="onSignIn"></div>

</body>
</html>





<!DOCTYPE html>
<html>
<head>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<!--<script src="https://apis.google.com/js/platform.js?onload=init" async defer></script>-->

<meta name="google-signin-client_id" content="1976054582-cjejnq5eh1sc58rb0evq.apps.googleusercontent.com">

<script type="text/javascript" src="/js/oauth.js"></script>
<link rel="stylesheet" href="/css/default.css">
<style>
h2
text-align: center;


#submit
text-align: center;


#username, #password
display: block;
margin-right: auto;
margin-left: auto;

</style>
</head>
<body>
<h2>SaveMyPass</h2>
<!--<input type="text" id="username" placeholder="Username"></input>
<input type="password" id="password" placeholder="Password"></input>-->
<div id="submit"><input type="submit" id="btn-login" value="Login"></input></div>
<div class="g-signin2" data-onsuccess="onSignIn"></div>

</body>
</html>





 window.onload=function() 
document.querySelector('#btn-login').addEventListener('click', function()
console.log("click login")
chrome.identity.getAuthToken(interactive: true, function(token)
let init =
method: 'GET',
async: true,
headers:
Authorization: 'Bearer ' + token,
'Content-Type': 'application/json'
,
'contentType': 'json'
;
);
);
;





 window.onload=function() 
document.querySelector('#btn-login').addEventListener('click', function()
console.log("click login")
chrome.identity.getAuthToken(interactive: true, function(token)
let init =
method: 'GET',
async: true,
headers:
Authorization: 'Bearer ' + token,
'Content-Type': 'application/json'
,
'contentType': 'json'
;
);
);
;






javascript json google-chrome-extension oauth-2.0 google-signin






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 7 at 5:10







Austin J

















asked Mar 6 at 5:07









Austin JAustin J

112




112












  • 1) The error message says your CSP has https://apis.google.com/js/platform.js (which would be wrong) but the posted code is correct - did you reload the extension on chrome://extensions page? 2) Unrelated to the problem per se, but "content_scripts" can only list local files in your extension package, not remote files, and it's only to have that script run alongside web pages, which is probably not what you need. 3) I would expect existing examples for this exact task to be somewhere on the web, try searching more.

    – wOxxOm
    Mar 6 at 5:16












  • @w i modified the content and background scripts and changed the oauth.js file. that got rid of the script load error. but did not get the google sign-in button to appear (which was my original problem).

    – Austin J
    Mar 6 at 6:23











  • @wOxxOm I found this question stackoverflow.com/questions/21117659/…. a solution was to render the button after loading the JS file, but i dont think this is my problem. i did a lot of searching, but couldnt find anything that can get it to render.

    – Austin J
    Mar 6 at 7:03


















  • 1) The error message says your CSP has https://apis.google.com/js/platform.js (which would be wrong) but the posted code is correct - did you reload the extension on chrome://extensions page? 2) Unrelated to the problem per se, but "content_scripts" can only list local files in your extension package, not remote files, and it's only to have that script run alongside web pages, which is probably not what you need. 3) I would expect existing examples for this exact task to be somewhere on the web, try searching more.

    – wOxxOm
    Mar 6 at 5:16












  • @w i modified the content and background scripts and changed the oauth.js file. that got rid of the script load error. but did not get the google sign-in button to appear (which was my original problem).

    – Austin J
    Mar 6 at 6:23











  • @wOxxOm I found this question stackoverflow.com/questions/21117659/…. a solution was to render the button after loading the JS file, but i dont think this is my problem. i did a lot of searching, but couldnt find anything that can get it to render.

    – Austin J
    Mar 6 at 7:03

















1) The error message says your CSP has https://apis.google.com/js/platform.js (which would be wrong) but the posted code is correct - did you reload the extension on chrome://extensions page? 2) Unrelated to the problem per se, but "content_scripts" can only list local files in your extension package, not remote files, and it's only to have that script run alongside web pages, which is probably not what you need. 3) I would expect existing examples for this exact task to be somewhere on the web, try searching more.

– wOxxOm
Mar 6 at 5:16






1) The error message says your CSP has https://apis.google.com/js/platform.js (which would be wrong) but the posted code is correct - did you reload the extension on chrome://extensions page? 2) Unrelated to the problem per se, but "content_scripts" can only list local files in your extension package, not remote files, and it's only to have that script run alongside web pages, which is probably not what you need. 3) I would expect existing examples for this exact task to be somewhere on the web, try searching more.

– wOxxOm
Mar 6 at 5:16














@w i modified the content and background scripts and changed the oauth.js file. that got rid of the script load error. but did not get the google sign-in button to appear (which was my original problem).

– Austin J
Mar 6 at 6:23





@w i modified the content and background scripts and changed the oauth.js file. that got rid of the script load error. but did not get the google sign-in button to appear (which was my original problem).

– Austin J
Mar 6 at 6:23













@wOxxOm I found this question stackoverflow.com/questions/21117659/…. a solution was to render the button after loading the JS file, but i dont think this is my problem. i did a lot of searching, but couldnt find anything that can get it to render.

– Austin J
Mar 6 at 7:03






@wOxxOm I found this question stackoverflow.com/questions/21117659/…. a solution was to render the button after loading the JS file, but i dont think this is my problem. i did a lot of searching, but couldnt find anything that can get it to render.

– Austin J
Mar 6 at 7:03













0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55015913%2fgoogle-sign-in-button-not-rendering%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55015913%2fgoogle-sign-in-button-not-rendering%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Google colab Transport endpoint is not connectedHow do I connect to a MySQL Database in Python?Google Colab is very slow compared to my PCGoogle Colab script throws “Transport endpoint is not connected”Presentation mode for Google Colab notebooksGoogle Colab: cell has not been executed in this session?Google Colab and tensorflow: How to hypertune and save a modelIs it possible to connect jupyter running on my laptop with google colabDisplaying all output with linebreaks in Google ColabUsing extensions in Google colabGoogle Colab Error: Buffered data was truncated after reaching the output size limit

IntelliJ IDEA underlines variables when using += in JAVA2019 Community Moderator ElectionHow can I permanently enable line numbers in IntelliJ?Is Java “pass-by-reference” or “pass-by-value”?When to use LinkedList over ArrayList in Java?How do I generate random integers within a specific range in Java?What is the scope of variables in JavaScript?How to determine if variable is 'undefined' or 'null'?How do I convert a String to an int in Java?IntelliJ inspection gives “Cannot resolve symbol” but still compiles codeCreating a memory leak with JavaHow to see JavaDoc in IntelliJ IDEA?

Лубенський полк