google.accounts.id.prompt stopped working - google-signin

I have a custom button for signing in with Google and I am triggering google.accounts.id.prompt with a JS onclick event. I have noticed that first there is a call to https://accounts.google.com/gsi/status?client_id=XXX and then the popup shows up.
But since a few days ago the popup stopped showing up and I am seeing that the call to https://accounts.google.com/gsi/status?client_id=XXX is returning an invalid format:
)]}'
[["PsJeB0CyFkGlqPMw88i9tA"],null,0]
(Content-Type response header is application/json and that is clearly not valid JSON)
Does anyone know what's going on? This is happening in incognito mode as well.

Related

Google SignIn button "Parameter client_id is not set correctly."

I have added Google Sign In button to a web page according the following description - https://developers.google.com/identity/gsi/web/guides/display-button
Unfortunatelly the button is displayed but it does not work.
In the console I see an error:
[GSI_LOGGER]: Parameter client_id is not set correctly.
that happens when the following script is being loaded:
https://accounts.google.com/gsi/button
Could anyone of you experienced the same problem?
In case someone has encountered the same problems - I found a root cause - prototype (https://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js) script somehow interfered with google sign in button.
Once I removed it, the google sign in button started working properly.

Fullcalendar - slow button click response

I'm using Fullcalendar v2.4.0 and related plugin Scheduler v1.0.2 with all required dependencies. jQuery-ui is at v1.11.4.
I'm loading resources via Ajax call using Fullcalendar built-in method of:
resources: {
url: 'resources_feed.php',
type: 'POST'
}
resources_feed.php simply returns few lines of dummy data.
And for the events, using a similar built-in method of:
events: {
url: 'events_feed.php',
type: 'POST'
}
events_feed.php returning few lines of dummy data.
It all works as expected until I plug in more realistic large amount of data as resources but still keeping the events data same.
The problem I experience is that button clicks like views (Day, Week, Month), Today and left/right arrows are responding after a delay of min 2 seconds sometimes longer. It behaves as if there's a delay set for a few seconds between button click and event firing. I tried to put an alert in the onClick event and alert is displayed after this few second delay.
I tested another button outside Fullcalendar object but on the same page and that works as expected, ie firing as soon as you click the button. This rules out page or jQuery issues. Same behaviour in Firefox and Chrome.
If I switch resource loading back to dummy data then buttons start firing as soon as clicked.
I can't figure out why a large amount of data still to be fetched can affect button response even before triggering an Ajax call.
Anyone seen this before? Any pointers will be much appreciated.
Regards.
Looks like the issue is on your events_feed.php maybe you are loading all the data on every call. Maybe you are not catching properly the Start and End parameters on every button.
The feed.php should catch the start and the end on every call. Something like this:
$start = $_GET['start']);
$end = $_GET['end']);
// then select database
I had this problem when i started to use fullcalendar.
Hope it helps!

Tag parameters only come through on new tab

I'm using Google Analytics via Google Tag Manager. I'm on Chrome and checking tags using Google Tag Assistant.
I've noticed that for many, if not most of the events I have tagged, the parameters will not pass through unless the link or key webpage they are clicking on opens in a new tab.
In HttpFox the result is a NS_BINDING_ERROR or something along those lines.
For example, if you visit this site, you can see there are two means of navigating to the "submit report" page - the CTA on the top right and in the main nav. I'd like to understand how the CTA performs compared to the main nav so have set up events, but the event only fires if I open the links in new tabs.
What does this error mean and what should I do about it?
To get rid of the ns binding error, have the onclick return false - Documentation Here.
In regards to the event not getting passed, I'm seeing in httpfox that the tid (on the event) is UA-34035531-[1-6]. That doesn't look quite right. How are you setting the account id?

Google Apps Script onclick event doesn't work in firefox 20 on mac. Cannot use the given object as a weak map key

My Google Apps Script web app stopped working.
Whenever I click on any element that has onclick property I am getting the following error message:
[11:27:44.243] cannot use the given object as a weak map key
Is there any workaround?
How can I get user's response without onclick event?
My code:
Note that I am trying to add onclick event using both ways, programmatically in JavaScript and by using HTML.
var by = document.getElementById("yes");
by.addEventListener('click', submitResponse,false);
This problem was submitted as google apps script issues:
http://code.google.com/p/google-apps-script-issues/issues/detail?id=2625
thanks for help!
Since this is an acknowledged issue with Apps Script, there isn't much that can be provided here in Stack Overflow.
Here is a bit more context, this was broken and now fixed in Caja. This fix should be reflected in Apps Script in a few days.

getting up to date contents of an iFrame

Is it possible to get up to date contents from an iframe? Lemme explain the problem I am encountering:
function modify_iframe(url){
my_iframe.src = url;
iframe_content = my_iframe.contentDocument;
//....code to modify the content goes here,,,,
}
The first time I call modify_iframe(url_a) it sets the source as I would expect but the iframe_content is a blank document.
The second time I run modify_iframe(url_b) it sets the source as I would expect but the iframe_content is actually that of url_a.
So it seems that contentDocument is not returning the contents of the new source, but rather the source before it was changed. Anyone know why that is and if there is a way around it?
Additional background info: We have been adding an event listener to fire off on the iframe load event which occurs when the src is changed. This was giving us the contents when calling contentDocument; however, users were being prompted that our site had unauthenticated content even though we use https for everything including the src. After removing the event listener we no longer receive the unauthenticated content warning, but the contentDocument of our iframe is always one step behind as described above.
Um, first try using a setTimeout to wait for the page content to load. But that's not a nice solution. What browser are you testing on? If it were me I would try to get to the bottom of the "unauthenticated content" error prompt.

Resources