Fixed
Status Update
Comments
ev...@gmail.com <ev...@gmail.com> #3
Example 1. Just trying to attach your gmaps script.
If you open the developer console, you will see that gmaps init script is loaded, but "getScript("https://maps.gstatic.com/intl/en_us/mapfiles/api-3/9/8/main.js ");" line isn't working, there is no new script in the document after document.write.
If you open the developer console, you will see that gmaps init script is loaded, but "getScript("
zi...@google.com <zi...@google.com> #4
Example 2. Trying to use callback parameter. Init is loaded, main javascript file is loaded too. But not working, exception screenshot is in attach.
2i...@gmail.com <2i...@gmail.com> #5
For example 2 - your code:
...
lf.main = function(a) {
eval(a); // <-- Uncaught Error: Code generation from strings disallowed for this context
};
...
...
lf.main = function(a) {
eval(a); // <-- Uncaught Error: Code generation from strings disallowed for this context
};
...
br...@gmail.com <br...@gmail.com> #6
Just to poke this bug, using the asynchronous loading method has no effect on this. The only workaround is to roll back to manifest version 1 which is actively being phased out.
si...@gmail.com <si...@gmail.com> #7
Switched to Yandex Maps, it works well.
Thank you!
Thank you!
ko...@gmail.com <ko...@gmail.com> #8
As manifest version 1 won't be accepted by the Chrome Webstore starting in mid August, we really do need a workaround/fix.
st...@gmail.com <st...@gmail.com> #9
As I discovered a few minutes ago, manifest version 1 is no longer accepted by the Chrome store *now*. So setting the manifest version to 1 and using 'unsafe-eval' in the CSP no longer works for new extensions.
Updating existing extensions may still be supported.
Updating existing extensions may still be supported.
ro...@gmail.com <ro...@gmail.com> #10
New packaged apps having manifest version 1 are no longer supported.
Please fix this issue as soon as possible.
Thanks
Please fix this issue as soon as possible.
Thanks
ca...@gmail.com <ca...@gmail.com> #11
According to deprecation schedule only new items should be affected (for now). For existing items there will be issues starting approximately in November.
Source:http://code.google.com/chrome/extensions/manifestVersion.html
Source:
oc...@gmail.com <oc...@gmail.com> #12
Oh new fun fact, relating to this: With Chrome 21 you can only install apps/extensions from the Chrome Store. So not I have an extension I can't deploy to the Chrome Store nor can I push it to my clients directly :(.
Please fix
Please fix
ka...@gmail.com <ka...@gmail.com> #13
This is killing now. Can you provide an alternate way to connect to http://maps.google.com/maps/api/js?sensor=false . Thanks
at...@gmail.com <at...@gmail.com> #14
Any updates on this issue or how can we resolve it. If google app cannot support there on google map, that really bad..
Please provide an alternate or a solution ASAP.
Please provide an alternate or a solution ASAP.
2i...@gmail.com <2i...@gmail.com> #15
Hi all,
A workaround has been released by the Chrome team:
http://code.google.com/chrome/extensions/trunk/sandboxingEval.html
I've attached a sample extension that makes use of this sandboxing technique. To use any of the Chrome extension APIs (e.g. tabs), you'll need to use postMessage to communicate to the popup or background page.
A workaround has been released by the Chrome team:
I've attached a sample extension that makes use of this sandboxing technique. To use any of the Chrome extension APIs (e.g. tabs), you'll need to use postMessage to communicate to the popup or background page.
ed...@gmail.com <ed...@gmail.com> #16
Thank you for the yet another ugly and useless butthurt for developers.
I load my own content and to draw a map I need to sandbox the dangerous google maps api from my page to iframe. Great.
I load my own content and to draw a map I need to sandbox the dangerous google maps api from my page to iframe. Great.
ed...@gmail.com <ed...@gmail.com> #17
I don't wish to be rude, but this remains a significant problem.
2i...@gmail.com <2i...@gmail.com> #18
Wow thank you very much for the info, this is awesome. I just give it a try with the full patch like that and it working for me so maybe it can be usefull for you (dont mess with your custom marker?)
<base href="http://maps.gstatic.com/mapfiles/openhand_8_8.cur " target="_blank" >
<base href="
ed...@gmail.com <ed...@gmail.com> #19
A similar issue also breaks Packaged Apps! The gmaps api uses document.write(), which is not available in packaged apps. So importing https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false still throws an error. Everyone knows document.write() is bad practice; that the Google Maps API forces you to use it is appalling.
2i...@gmail.com <2i...@gmail.com> #20
"I'll wait for the official fix anyway."
i'll do to, but it helps a lot during debug session not freezing the software. So thank you for sharing the info, it's very much appreciate.
i'll do to, but it helps a lot during debug session not freezing the software. So thank you for sharing the info, it's very much appreciate.
[Deleted User] <[Deleted User]> #21
Any hints about that?
ha...@gmail.com <ha...@gmail.com> #22
I have uploaded a small testcase to help debugging this: https://gist.github.com/icoloma/7934269
Disabling 'unsafe-eval' makes the test fail.
Disabling 'unsafe-eval' makes the test fail.
2i...@gmail.com <2i...@gmail.com> #23
[Comment deleted]
2i...@gmail.com <2i...@gmail.com> #24
Here is a permanent fix for document.write
try {
document.write('<' + 'script src="' + src + '"' + ' type="text/javascript"><' + '/script>');
} catch (e) {
var mapRequest = document.createElement("script"),
type = (isNaN(document.xmlVersion) === true || document.contentType.indexOf("application") === 0) ? "application" : "text";
mapRequest.setAttribute("type", type + "/javascript");
mapRequest.setAttribute("src", src);
document.getElementsByTagName("body")[0].appendChild(mapRequest);
}
document.write is purely legacy. Google Chrome does not even recognize the existence of document.write in certain strict rendering modes. Try this against a file with extention ".xhtml".
The code I provided will continue to support document.write as the default method, but when it fails the error will be suppressed and the valid approach that works in all browsers will be applied instead.
There is absolutely no reason to continue using document.write instead of this code here. I recommend just removing document.write though.
Bug 4081 can be merged into this issue.
try {
document.write('<' + 'script src="' + src + '"' + ' type="text/javascript"><' + '/script>');
} catch (e) {
var mapRequest = document.createElement("script"),
type = (isNaN(document.xmlVersion) === true || document.contentType.indexOf("application") === 0) ? "application" : "text";
mapRequest.setAttribute("type", type + "/javascript");
mapRequest.setAttribute("src", src);
document.getElementsByTagName("body")[0].appendChild(mapRequest);
}
document.write is purely legacy. Google Chrome does not even recognize the existence of document.write in certain strict rendering modes. Try this against a file with extention ".xhtml".
The code I provided will continue to support document.write as the default method, but when it fails the error will be suppressed and the valid approach that works in all browsers will be applied instead.
There is absolutely no reason to continue using document.write instead of this code here. I recommend just removing document.write though.
ko...@gmail.com <ko...@gmail.com> #25
It has been almost 2 years since this has been opened. Can someone tell me why this is still an issue? What is the status report google?
st...@google.com <st...@google.com> #26
If you want to load that JS file without document.write, set the callback parameter like so:
http://maps.google.com/maps/api/js?sensor=false&callback=googleCallback
You'll see that it loads the js with a different getScript function:
function getScript(src) {
var s = document.createElement('script');
s.src = src;
document.body.appendChild(s);
}
You'll see that it loads the js with a different getScript function:
function getScript(src) {
var s = document.createElement('script');
s.src = src;
document.body.appendChild(s);
}
ci...@gmail.com <ci...@gmail.com> #27
Can someone give a clear example on how to load google maps correctly? This issue has to be solved by now.
Description
We're generating local html file embeded on our app using google map v3 javascript API.
With IE 11 this cursor load with the bad protocol like that :
"file://
and not
"
(please see the picture attached)
That cause random freezes of 10/20 secondes when loading the page.
Best Regards.