I'm working on a web site that is using the Google JavaScript Client
Library to load some APIs that are exposed via Google Cloud Endpoints.
Everything's working great in Chrome, Firefox and Safari, but on Internet
Explorer 10 I get this error:
SCRIPT5007: Unable to get property 'value' of undefined or null
reference
proxy.html, line 7 character 51
The same problem is also happening with Google's example Cloud Endpoints
web app
(https://github.com/GoogleCloudPlatform/appengine-endpoints-helloendpoints-java-maven),
which makes me think the problem is not in my own code. I deployed a copy
of it here: https://cloud-endpoints-demo.appspot.com, and the same error
occurs when running it on Internet Explorer 10.
I'm loading the client library using code similar to that suggested by
Google in their documentation
(https://developers.google.com/appengine/docs/java/endpoints/consume_js):
<script type="text/javascript">
Oversee.Init();
function init() {
console.log("starting to load endpoints");
gapi.client.load("marketplace", "1", function() {
console.log("finished loading endpoints");
}, "//" + window.location.host + "/_ah/api");
}
</script>
<script type="text/javascript"
src="https://apis.google.com/js/client.js?onload=init"></script>
This outputs the following on the console:
starting to load endpoints
SCRIPT5007: Unable to get property 'value' of undefined or null
reference
proxy.html, line 7 character 51
Note that the line "finished loading endpoints" is never output.
After pretty-printing, the code in question in proxy.html appears to be
this, specifically the document.getElementById('root').value, as
document.getElementById('root') is null or undefined.
gapi.load('googleapis.proxy', {
callback: function () {
return window['googleapis']['server']['initWithPath']
.call(this, document.getElementById('root').value);
},
config: {
// snipped
}
});
I've noticed that if I reload the page, the api loads successfully, with
the following output in the console:
starting to load endpoints
finished loading endpoints
All of the above is happening both when I'm using the local development
server and when I'm using the app hosted on production Google App Engine
instances.
Has anyone managed to successfully call Google Cloud Endpoints from
Internet Explorer 10?
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.