I am loading google maps api v3 script over https using the url
https://maps.googleapis.com/maps/api/js?sensor=false
.The maps get loaded and work properly in IE and chrome. But on firefox the maps don't work and I can see the error TypeError: google.maps.event is undefined
.I checked if the google object is loaded using undefined check and its not getting loaded on Firefox, IE and chrome load it properly.
The same behavior can be checked via the url
https://google-developers.appspot.com/maps/documentation/javascript/examples/full/map-simple
. The error occurs only over https and not http. The same issue has been noticed over multiple networks and multiple machines.
Firefox version being used:- 33.1.
My script import is in the head and my jquery bindings in the document.ready, so not much chance of the scripts executing before the import.
Same behavior is getting exhibited even in Firefox safe mode.
Can somebody help me out with a solution for this?
maybe the problem would be the ssl, you could try erasing the "s" from http
http://maps.googleapis.com/maps/api/js?sensor=false
Related
When attemping to use HTML5 Geolocation method, I consistently get TIMEOUT errors when using Chrome. I know similar questions have been asked, but all answers I've read direct the developer to use HTTPS & not a local env (ie: file:///).
I'm testing with the exact code sample from the Example block at Mozilla Geolocation.getCurrentPosition().
I'm using Chrome Version 54.0.2840.98 (64-bit).
I am using SSL / HTTPS (not self-signed, cert has valid cert auth).
I have confirmed the Location Service is allowed for the domain in question in Chrome Preferences.
I have successfully tested the same code using Safari.
I have tried with & without a valid Google API key with no difference.
I have enabled Google API Billing for the specific project that this API key is tied to in Google Dev Console.
Here's a screen shot of the error in console.
I don't know where else to look or what to try. Any help is greatly appreciated.
Why Google location services are not working? I already have the code which is working perfectly in browsers other than Chrome. It was working in Chrome till last Wednesday. And not only this, it is indeed not working for any other site who have used this code. Is this due to SSL?
As an example, please visit http://stores.hypethegym.com/hype-sector-4-gurgaon-339/Map
When you open this page, you should get a notification saying "Share your location" in firefox & IE10, but in Chrome, there is a problem.
We are getting following error in Chrome:
"getCurrentPosition() and watchPosition() are deprecated on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS...."
Thanks for the help in advance.
I get the following error in Chrome when loading a trivially simple html file with a jQuery Mobile reference. The error is not present with just the jQuery reference.
Uncaught SecurityError: Failed to execute 'replaceState' on 'History':
A history state object with URL 'http://stacksnippets.net/js' cannot
be created in a document with origin 'null'.
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.js"></script>
</head>
<body></body>
</html>
You can also "Run code snippet" and see the error in the console.
This error did not happen before today. I have not changed my code or method of loading the html file in the browser. It used to work perfectly - I use the same code for all my PhoneGap apps.
Does anyone know if there was a Chrome security update that causes this SecurityError or whether I'm missing something? How would you go about debugging this? Thank you.
UPDATE
This discussion I think points out what is going on, which I suspected, since the error does not appear when running with a web server: Origin null is not allowed by Access-Control-Allow-Origin .
But I am still wondering why this changed in the past day, whether Chrome has had a change in their security policy, or why it was working before, and whether any of my PhoneGap apps will be affected.
This error is same as the origin is null error. This error occurs because of the security feature of Chrome.
A simple solution to test the application is to bypass this security on chrome.
Steps:
create a chrome browser shortcut on desktop.
Close all the instances of chrome on your machine.
Right click on the desktop shortcut of chrome and click on Properties.
in Target field, append " -allow-file-access-from-files" at the end.
Save and close properties.
Open chrome via this shortcut only.
Hurry, the error has gone. App works perfectly.
NOTE: This is just a work-around I use to test my cordova apps on desktop browser for UI testing.
Temporary solution: I've commented out all history.replaceState calls in jquery mobile, didn't need to manipulate browser history in my app anyways.
I wonder if it's chrome security bug or model and future behavior.
On a Mac I was able to fix this by running a webserver instead of loading it from a "file://" url:
http://lifehacker.com/start-a-simple-web-server-from-any-directory-on-your-ma-496425450?utm_expid=66866090-49.VYy4WCNHSyuP6EmjnM93MQ.0&utm_referrer=https%3A%2F%2Fwww.google.com%2F
python -m SimpleHTTPServer 8000
In the directory should make it available from Chrome via 0.0.0.0
I don't seem to have the same problem, not on the stable version of Chrome (45) or the Dev version (47).
However, I have personally seen issues with the CORS header, too. If you can cause the problem to happen reliably, I suggest filing a bug at crbug.com and a Chrome developer will have a look at it.
I am working with the YouTube Data API v3. Google recommends loading the libs using:
<script src="https://apis.google.com/js/client.js?onload=googleApiClientReady">
It works fine but when I load the script like this into a modal window in Firefox (it's got to be this way. I can't control the way my widget is called by Sitecore) it fails with:
Error: Permission denied for https://accounts.google.com to call method ModalContentWindow.postMessage
It comes from within internal callbacks that Google's client.js calls when loaded even if I omit the ?onload part.
Works fine loaded into a standalone tab. IE and Chrome do fine either way.
Is there a good way to make it work in FF modal window? (I am running 27.0.1 if it matters)
UPDATE: I worked around it by calling YouTube Data API HTTP endpoints directly. I am still wondering though what's up with that postMessage() thingy in FF's modal window and whether it's known to the authors of Google's client.js.
The main problem is that Firefox has policy for capability.policy.default.Window.postMessage.get but it doesn't have policy capability.policy.default.ModalContentWindow.postMessage.get.
There is two way to solve this issue.
add pref for Firefox pref("capability.policy.default.ModalContentWindow.postMessage.get", "allAccess");
instead of loading the script into a modal window directly put it inside iframe. iframe would have class Window.
BTW I faced this issue in FF28. In FF31 everything works fine.
Project:
Developing a gadget template for Google Wave which will allow my Flash movies to interact with the Wave api. I had to adapt the existing Flex application so that it would work with ActionScript. This was a success.
Problem:
Chrome v4.0 is blocking the load and/or execution of javascript files linked to in the Gadget's XML file.
(Already confirmed the gadget works in Chrome v3.0)
Example & More Details:
https://wave.google.com/wave/#minimized:nav,minimized:contact,minimized:search,restored:wave:googlewave.com!w%252BLby6vkE9A
Errors Thrown by Chrome:
Refused to execute a JavaScript script. Source code of script found within request
Uncaught TypeError: Illegal invocation
Resources:
Search google for wave-as-client
Google Sites site/gumontheshoe/home/my-cabinet
Is there anything I can do from my end to fix this?
Use a different browser. I had the same problem, continued my development in Firefox.