ivory-google-map icon indicating copy to clipboard operation
ivory-google-map copied to clipboard

Suddently stopped working

Open fcojavierdomenech opened this issue 4 years ago • 26 comments

Since a few hours it stopped working, something related to google servers? Anyone experimented the same?

fcojavierdomenech avatar May 14 '20 09:05 fcojavierdomenech

Yes, seems google changed something and the jsapi Endpoint gets now redirected to antoher source which does not work with the existing implementation.

Currently working on a fix

bresam avatar May 14 '20 09:05 bresam

Thank god, I'll be taking a look too, please update with anything

fcojavierdomenech avatar May 14 '20 09:05 fcojavierdomenech

Umm, unfortunately I'm not the right guy for this task, more of a backend type. Anyway, I found a temp fix, just initialize yourself the map when on_ready:

/** Inittialize: hidding notifications **/
$( document ).ready(function() {
    ivory_google_map_load();
});

As far as I can tell: Loading Maps API with the jsapi loader is deprecated. So we should update the way we load Google's charts: https://developers.google.com/chart/interactive/docs/basic_load_libs

fcojavierdomenech avatar May 14 '20 11:05 fcojavierdomenech

Same problem but fix from vivoconunxino didn't solve the problem

/** Inittialize: hidding notifications **/
$( document ).ready(function() {
    ivory_google_map_load();
});

ebrost avatar May 14 '20 11:05 ebrost

my quick and dirty workaround:

  var i=setInterval(function(){
        if(typeof {{ map.variable }}!=='undefined'){
            clearInterval(i);
        }
        else{
            if (window.google){
                ivory_google_map_load();
            }
        }
    },100);

ebrost avatar May 14 '20 11:05 ebrost

Yep, I just realized mine works only on Firefox

fcojavierdomenech avatar May 14 '20 11:05 fcojavierdomenech

I have invested a lot of work in updating the package so far and have reached an aplha state. There are still issues with loading libraries and some fixes in the unit tests. Version 3.0.1 will then definitely be clean (probably by the end of the week).

I'm currently trying to contact the current maintainer to take over the maintenance, if he still hasn't answered by the end of the week, I will register my package at Packagist myself.

You can find the update at https://github.com/bresam/ivory-google-map As I said, it is not quite stable at the moment, but soon. It is being maintained and pull requests are welcome.

bresam avatar May 19 '20 09:05 bresam

I hope the maintainer responses, otherwise I'll gladly switch to yours. Thanks

fcojavierdomenech avatar May 19 '20 11:05 fcojavierdomenech

Thank you @bresam for stepping in to fix this. We are using this library for a software based on map routing, so this is a big deal for us - much appreciated!

If it is of any help, the issue was intermittent for us. For some days and hours it works and all loads correctly, and then for a few hours in the day it does not work. When this call loads correctly in the script WITHOUT a 302 redirect, it seems that everything loads correctly: https://www.google.com/jsapi?callback=ivory_google_map_load.

However, as is the case now in our app, whenever that call to jsapi returns a 302 redirect, it seems like the libraries are not loaded correctly.

gavelez35 avatar May 20 '20 03:05 gavelez35

Hi @gavelez35

Yes we have observed the same thing, it seems that Google has temporarily fixed the redirection. For this reason I have now also reduced my workload on this fix to a human level, but I think the most issues should be done by the end of the week.

I've already switched to the new API URL, but I still have to fix the loading of the optional libraries (e.g. geometry library). Basic functionality is already running again with version 3.0.0.

For those of you who are interested, @egeloen has not responded yet.

bresam avatar May 20 '20 12:05 bresam

You are awesome @bresam! Thank you for your note! I'll stay tuned

gavelez35 avatar May 20 '20 20:05 gavelez35

Hi @bresam Thank you!!! Can you add support of php7.0? I am not able to use php7.2 in project :(

alva2409 avatar May 21 '20 06:05 alva2409

We also have php 7.0 :) but if absolutely needed, we'll have to see about upgrading.

cc @alva2409 @bresam

gavelez35 avatar May 21 '20 23:05 gavelez35

Hi folks, I have not uploaded to Samuel's 3.0 version but everything seems to be working well once again on the latest release from Eric (@egeloen) ... is anyone else experiencing this? It seems that Google has fixed the redirection for good for now, but I have not been able to dig up any definitive proof on the internet...

cc @bresam @egeloen @vivoconunxino @alva2409 @ebrost

gavelez35 avatar May 25 '20 16:05 gavelez35

Yes the old way is working again, but i couldnt find any proof for that on the internet too. But in the long run it makes sense to switch to the new endpoints. But the good thing is, we dont have to hurry with that.

bresam avatar May 25 '20 19:05 bresam

Thank you for the response @bresam, at least things are working once again :) It is also great to hear that we are not in a mad rush anymore, lol BTW, did you ever get a hold of @egeloen? I also sent him a quick message and I have not heard back. I hope all is well with him... we may have to adopt your repo if that will be maintained going forward...

gavelez35 avatar May 26 '20 15:05 gavelez35

Nope, sent him 2 emails, but got no response yet. Theres nothing happening on that repo since 3 years, so i dont think he will respond these days.

bresam avatar May 26 '20 18:05 bresam

Hey everyone, is anyone else seeing this same issue today?

@bresam @vivoconunxino @alva2409

gavelez35 avatar Jun 11 '20 13:06 gavelez35

I'm stll going with the temp fix until bresam takes control over the repo, then I'll update or move to its repo, depending on whatever he decides. So no, I'm not seeing the issue, I suggest you checking https://github.com/egeloen/ivory-google-map/issues/296#issuecomment-628573076 or updating to bresam's

fcojavierdomenech avatar Jun 11 '20 13:06 fcojavierdomenech

Thank you @vivoconunxino - I'll check it out! :)

gavelez35 avatar Jun 11 '20 16:06 gavelez35

I've installed https://github.com/bresam/ivory-google-map right now on a project, works smooth. All Tests passing. But you have to require it by repository. will do a stable release on packagist supporting php7.0+ as soon as possible.

bresam avatar Jun 11 '20 16:06 bresam

@alva2409 @ebrost @vivoconunxino @gavelez35 @mariemchtourou

It's now available at packagist.

ivory/google-map Or even ivory/google-map-bundle

I had to fork and update the bundle too due to some path issues. I will maintain both, but firstable both are working fine, as far i can see.

If you notice that the Travis builds fail, all tests run successfully, I just have to fix the Travis config.

bresam avatar Jun 11 '20 22:06 bresam

image @bresam thank you once again, it seems that there is some syntax that only works in PHP 7.1 and above (see image attachment).

gavelez35 avatar Jun 12 '20 05:06 gavelez35

@gavelez35 Huch, i missed these when downgraded to 7.0, will be fixed today, thanks for the report. Feel free to use issues on the new repo. Best Samuel

bresam avatar Jun 12 '20 15:06 bresam

Issue solved

bresam avatar Jun 12 '20 16:06 bresam

@bresam I was thinking about that too when I caught that, lol :) Thank you very much Samuel and I'll be sure to report any new issues in that new repo 👍

Regards, Gustavo

gavelez35 avatar Jun 12 '20 16:06 gavelez35