Google Maps on site HTTP/HTTPS error - javascript

I'm requesting Google Maps (latest API, AFAIK) on my site, but I'm getting an error in the console and some googl'n didn't do the trick.
I'm requesting the maps via
<iframe src="https://www.google.com/maps/embed/v1/place?key=AIzaSyBQ-4VHuS8q6AzOD5g0Cbjxx1OpB3fus1w&q=Achterom+93,3311KB,Dordrecht+Nederland&zoom=13"></iframe>
and the error is seen in the image below.
Note: "Anonieme functie" means "Anonymous function" in regular English.
All I can think of which my cause the error is that my site runs on HTTP (non-SSL) and the maps can't run on HTTP and needs HTTPS -> HTTP vs HTTPS.
I hope someone can help me solve this issue. Thanks!
Update: I've just noticed the problem only appears in Safari.
Link to my site

I think the link to your site is not correct atm. At first sight the implementation code looks alright.

Related

Google Maps API Not Loading On iPad

I have a webpage that uses the Google Maps API to load a custom map. The map works on Windows and Mac in all major browsers, however it does not work on an iPad. I have tested it on Safari Mobile and Chrome Mobile and the same issue is happening. Nothing shows up and I get the following error in the console:
[Error] Failed to load resource: The certificate for this server is invalid.
You might be connecting to a server that is pretending to be “maps.gstatic.com”
which could put your confidential information at risk. (main.js, line 0)
Any help on what this means would be greatly appreciated. Thanks.
I figured out the issue was that we were using the HTTP protocol. Using HTTPS protocol when issuing requests to the API fixed the issue on the iPad.
I had very same issue. But my case is just opposite to #dcod, where the development version of my app is http:// and hence I need to use http:// of maps.google.com.
I will update the behavior in the production where the app is going to be https://

status code 12004 while doing a service call

I am doing a service call in my javascript which return xml data using xmlHttpRequest.My service call is working in chrome and firefox perfectly and getting the data(it is a https call).But when i try the same with IE11 it is giving status code 12004 .I tried searching it on google i found only one answer saying it means ERROR_INTERNET_INTERNAL_ERROR.
I tried opening fiddler to see the request but when i open up fiddler service call is working fine,but when i close fiddler it is showing same error code.
From the WinINET constant ERROR_INTERNET_INTERNAL_ERROR it appears that the issue is related to the WinINET API which I assume is being used by IE to enable itself to interact with HTTP protocols (including HTTPS) to access Internet resources
http://msdn.microsoft.com/en-us/library/windows/desktop/aa385465(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/aa383630(v=vs.85).aspx
If you really wanted to go deeper and understand the issue, try to download STRACE which is socket/SSL tracer designed to generate LOG for Internet Explorer:
http://www.microsoft.com/en-us/download/details.aspx?id=7643
On a quicker check, you might want to see if your Windows updates is up-to-date to make sure your wininet.dll is the latest and greatest

Google tag manager error with anonymous function

I have a issue after integration Google-tag-manager code to my web site: "GET https://www.googletagmanager.com/gtm.js?id=GTM-XXXXXX (index):336(anonymous function) (index):336(anonymous function)".
We suppose it is related that this script is not directly specified https protocol, and therefore the browser interprets the request as unsafe. This issue happend only Google Chrome. On FireFox everything ok. How it can be fixed?
I have read that issue can occur due to AdBlock, but when I off if, issue wasn't resolved.
As stated in Setup and installation you may try to verify or troubleshoot your installation with:
Tag Manager's Preview Mode
Tag Assistant Chrome extension

Inter frame SOP - Chrome Extension

In a Chrome Extension, I'm trying to get gmail compose body content.
An error jumps out sporadically, and does not prevents it from working.
This is being run as a content script. I believe permissions are not the issue here, because when there is a permission missing, the error is different and the operation is blocked by Chrome, definitely not the case.
Error comes out in this line:
encodeURIComponent($canvas.find('iframe').contents().find('body').text());
where
var $canvas = $('#canvas_frame').contents();
Any information on this error and a possible turnaround?
You can not read cross site content using javascript. XSS Auditor of Google Chorme will never allow this.
Please have a look at http://en.wikipedia.org/wiki/Same_origin_policy
UPDATE 1 -
There is support for cross site communication using window.postMessage() in Chrome 2+. Please have a look at this documentation https://developer.mozilla.org/en-US/docs/DOM/window.postMessage
To give a good answer, we need more information:
where exactly you are running this code, is it in the web page, the extension's content script or the etension's background script?
Also, what does your manifest.json file look like? Which sites have you asked for permission to run on.
I suspect this is a case of a badly-written error message and really it is saying: your extension does not have permission to run on apis.google.com. In that case, simply add permissions for apis.google.com. More details are in the Chrome extensions docs: http://developer.chrome.com/extensions/manifest.html#permissions

Why doesn't the GeoLocation API javascript code works/loads on my computer

I have an HTML5 page loaded on server along with a geolocation script. The code is working and has no errors. It shows the position and map the user. Right now, it's working well for everyone else and i also tried the same on other PC and it works. But, when i visit the page on my Chrome browser, nothing shows up. Why is that happening? Why can't it locate me and map me? I have Windows 7 OS running the latest Chrome and using data-card for internet.
This is the LINK
On the other hand, the Google page accurately shows my location on the left bar side
That page detects my location correctly in Chrome 17 (dev channel). I do see a JavaScript error, however: "Uncaught ReferenceError: geocoder is not defined" on line 81 of myLoc.js. Taking a quick look at the code, it doesn't appear to be defined anywhere. Have you perhaps forgotten to include a file?
I experienced the same issue with geolocation script. It seems to be an issue with Chrome specifically blocking the uri starting with "file:///" for security reasons.
See related articles:
http://groups.google.com/a/googleproductforums.com/forum/#!category-topic/chrome/give-feature-feedback-and-suggestions/E0yx7wne-RI
http://groups.google.com/a/googleproductforums.com/forum/#!category-topic/chrome/report-a-problem-and-get-troubleshooting-help/pNcftbZTN1E
HTML 5 Geo Location Prompt in Chrome
Check in your chrome, in settings -> advanced -> privacy (content) -> localization if you allow web pages to check your location (this menus can be named a bit different, I'm checking on Polish Chrome).
You say nothing shows up and the question to allow web page to check location should show up (this happens by me).
Another thing, geolocation is checked by Wi-Fi if available, determine it by your IP may be quite inaccurate.

Categories