Google Maps - a resource interpreted as Script, but ported with the MIME type image / png

I did some research and I could not find a message that was specific to the Google Maps V3 Javascript APIs, so I am posting a new question. Please let me know if there is a more suitable place for this question.

My question is:

Without touching anything, my site, using the Google Maps V3 Javascript API, started giving me this error:

Resource interpreted as Script but transferred with MIME type image/png Refused to execute script from 'http://mt1.googleapis.com/vt?pb=!1m4!1m3!1i15!2i9148!3i11958!1m4!1m3!1i15!2…2m1!1e47!12m3!1e37!2m1!1ssmartmaps!4e3&callback=_xdc_._63mj9u&token=110320' because its MIME type ('image/png') is not executable, and strict MIME type checking is enabled. 

I started getting this in the Chrome javascript console completely unexpectedly. Could this be due to too many requests for Google Maps? I made some changes on the map page and updated several times, but never touched any of the working scripts related to displaying the map or its fragments, so I'm very confused.

Has anyone encountered this problem and / or was aware of a solution?

UPDATE As implied in the comment below, this is not a β€œclueless” problem, as it affects the display of map rendering. Others are starting to experience a similar problem, as indicated in this post . This is also a problem that affects other maps that I initiated on other sites ( example ).

+6
source share
2 answers

In fact, you can assume that this is a bug that should be fixed in the API, and not on the client side.

What you can try and should do:

In production, you should always download the release version of the API.

You are currently trying to download the API version 3.9.2, which is no longer available.

Instead, an experimental version was downloaded.

Currently, the documentation says that 3.17 is experimental and 3.16 is a release version, but I think this is not correct (not yet updated).

run inside the console:

 alert(window.google.maps.version) 

... and you will see what has been downloaded

It seems like there was an update, 3.17 is the release and 3.18 is experimental (I think the new version 3.18 is the source of the problem)

For more information on version control and getting the latest stable version, see https://developers.google.com/maps/documentation/javascript/versions.

+2
source

I had an open problem on google maps and I got the answer:

There is a problem with the address of this api using the htttp protocol. Replace https, which will work.

ex: ' https://maps.googleapis.com/maps/api/js?v=3 '

+2
source

Source: https://habr.com/ru/post/1201131/


All Articles