Hi Rik,

First off what an amazing module! Working with it is very exciting.

I wonder if you or anyone can shed some light on the following warning that I very often (not always) get when I'm on Wifi, on my phone. It doesn't seem to happen when I'm on my laptop, also using wifi.

IPGV&M, 110.168.232.8: getCurrentPosition() returned error 3: Timeout expired Browser: Mozilla/5.0 (Linux; Android 4.4.4; D2303 Build/18.3.1.C.1.13) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.109 Mobile Safari/537.36

x

IGPV&M proximity: visitor location temporarily not available.

Doing a google on this returns a lot of old posts where people can't seem to figure it out either.

And while I'm here, just a quick question about the GPS function of mobile devices, I never see my location icon blink when I'm using my phone so it looks like my GPS is not being activated. Is that normal behaviour? For in the documentation it says ip_geoloc does have built-in utilization of it.

Thanks in advance for any insights!

Comments

rdeboer’s picture

Hey Alf,

I'm glad to hear you're having fun with my module! Thanks for the feedback. I hope it will keep you happy for a while as you explore the various features.

So, I have had this issue reported before. Someone said they had an old cheap mobile phone and it would often take this phone more than 10 seconds to geo-position itself. So then I increased the timeout from 10 seconds to 20 seconds.

Now, on the strength of your report, it seems even 20 seconds isn't enough time for your phone to get its act together ;-)
I would have hoped technology would have advanced, not regressed!

If the location icon isn't blinking on your phone, could that mean that the GPS function is out of reach (so only Wifi on offer), or that GPS isn't switched on, or it is broken?

The IPGV&M module cannot switch it on for you. It just calls getCurrentPosition() and returns (after a few seconds) what it is given by the browser, via your phone. If your phone does not have GPS or it is (temporarily) switched off, then you won't get GPS accuracy in your location and proximity calculations.

Have you compared your phone's behaviour with mobile phones of your friends?

Hope this helps, cat man :-)

Rik

alfthecat’s picture

Status: Active » Fixed

Hi Rik,

Thanks for your lightning fast reply, much quicker than anything my phone does. I've been under the weather a bit which is why my reply sails in so late.
But great news, nothing wrong with this amazing module and "I can haz" a new phone. Amazing what this module is able to uncover!!!

I'll run tests on other people's phones but after reading your reply and giving it a go with the wifi connection on my laptop, it really seems likely to be an issue with my phone. I did also upgrade to the latest dev which also seems to speed things up a bit.

Fixed :)

netgeek123’s picture

I am getting this error from some laptops as well. Location is enabled on the laptops I have used. It works fine from mobile devices though.

getCurrentPosition() returned error 3: Timeout expired Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/600.3.18 (KHTML, like Gecko) Version/7.1.3 Safari/537.85.12

It does work from Fire Fox though.

rdeboer’s picture

@netgeek123:

Thank you for reporting.

So your symptoms are the opposite of AlfTheCat, it seems.

netgeek123: error 3 time-out on laptop with Safari (ok when using Firefox), no problems on mobile
AlfTheCat: error 3 time-out on mobile, no problems on laptop

IPGV&M does nothing tricky.... it just passes the request on to the browser via the standard W3C Javascript call...

I would love to help, but I don't know what I can do.........

Rik

netgeek123’s picture

Hah me neither! :P
Maybe try the smart ip module as a fall back should the browser not pass on the location for what ever reason?

rdeboer’s picture

Yep, IPGV&M supports Smart IP in exactly that way.

alfthecat’s picture

Status: Fixed » Active

What would be a great solution is to have the option to keep trying to retrieve the visitors position, until a location is received.

Right now, you can configure the "minimum elapsed" time option, to for instance, refresh every 3 seconds. If you add smart ip as a fallback, what you basically get is an approximate location on first page load based on IP and then the map updates with the precise location, 3 seconds later, allowing the device some time to "warm up". In my case that works great. The disadvantage is that the page now keeps refreshing every 3 seconds even after a location has been retrieved. Which makes this approach unusable.

rdeboer’s picture

Thinking about this very hard, while also cross-referencing #2432639: Improve "Set my location" user experience... RdB

rdeboer’s picture

So with all the recent work done on the module, I think setting the "Minimum elapsed time before geolocation data for the same user will be collected again" to 0 would be closest to what you are after. You need to also tick "Employ a free Google service to periodically auto reverse-geocode visitor locations to street addresses before storing these on the database".

In that case the module keeps trying until it gets a location (or at least a lat/lon to be precise, with or without street address components) and then it does not update that location ever again, unless the user specifically asks for it on the "Set my location" block or the session expires.
The latter you can easily do for yourself for testing purposes via the button in the "Advanced Options" fieldset on the IPGV&M configuration page.

The only caveat is that the module does not care where it gets that location from, whether its IP-address based or HTL5-based, or in fact another module that wishes to "chip in".

Maybe one day we'll get it perfect...

rdeboer’s picture

Assigned: Unassigned » rdeboer

Try the upcoming 7.x-1.27 and if the issue persist, please re-open.

rdeboer’s picture

Status: Active » Closed (fixed)