@alphaonex86 opened this Issue on November 20th 2014
@mattab commented on December 1st 2014 Member

Hi @alphaonex86 which version do you use? does it work for you on the http://demo.piwik.org ?

@alphaonex86 commented on December 1st 2014

Hello,
I have the last version, (I update each time since piwik < 0.8).
http://demo.piwik.org/ always work.
Some time like today the real time map work. Other day will don't work (all website).
Then better error repporting when php can't send data, to push it to javascript, and from js display it from the browser. That's will be a good start to debug it.

@alphaonex86 commented on December 5th 2014

I presume it's based ont this query, at the end the exact reply to replay and reproduct the bug:
Request URL:https://X.X.X.X/index.php?period=range&idSite=9&segment=&date=last30&format=json&showRawMetrics=1&module=API&method=Live.getLastVisitsDetails&filter_limit=100&showColumns=latitude%2Clongitude%2Cactions%2ClastActionTimestamp%2CvisitLocalTime%2Ccity%2Ccountry%2CreferrerType%2CreferrerName%2CreferrerTypeName%2CbrowserIcon%2CoperatingSystemIcon%2CcountryFlag%2CidVisit%2CactionDetails%2CcontinentCode%2Cactions%2Csearches%2CgoalConversions%2CvisitorId%2CuserId&minTimestamp=-1
period:range
idSite:9
segment:
date:last30
format:json
showRawMetrics:1
module:API
method:Live.getLastVisitsDetails
filter_limit:100
showColumns:latitude,longitude,actions,lastActionTimestamp,visitLocalTime,city,country,referrerType,referrerName,referrerTypeName,browserIcon,operatingSystemIcon,countryFlag,idVisit,actionDetails,continentCode,actions,searches,goalConversions,visitorId,userId

The reply show more than 80+ entry:
http://files.first-world.info/temp/piwikbug.txt

@mattab commented on April 7th 2015 Member

Hi @alphaonex86 do you still have the issue in the latest Piwik release? (if so would you mind posting a screenshot)

@alphaonex86 commented on April 7th 2015

Yes the issue remain active :(
http://files.first-world.info/temp/piwik.png

@mattab commented on April 8th 2015 Member

i'm wondering if it's same bug as in: #6703

Does it maybe work when you load Piwik over HTTP?

@alphaonex86 commented on April 8th 2015

Don't work in https and http.

@mattab commented on April 8th 2015 Member

@alphaonex86 would it be possible to get access to your PIwik server? if you can email me matt att piwik.org your piwik URL + login + password + link to this issue, it would really help. Thanks

@alphaonex86 commented on April 9th 2015

Send by email

@mattab commented on April 10th 2015 Member

@alphaonex86 thanks for sending the access. Reproduced that the real time map doesn't work. it's strange because the data received by the API looks correct and works. So there is a problem in the JS somewhere. there is no error logged... the normal non-real time map works well too.

If anyone has also this issue of Real time map does not work while the other maps in Location menu works, please leave a comment

@alphaonex86 commented on April 10th 2015

It's the seconds hurge and problematic bug in my case. Hardened and stabilise the code is very usefull for large scale usage. And don't keep years/months the bug open without any work on it.

@alphaonex86 commented on April 30th 2015

Same with 2.13

@alphaonex86 commented on May 22nd 2015

Any way to have priority for this bug?

@diosmosis commented on May 24th 2015 Member

@alphaonex86 I took a look at your Piwik using the credentials you sent to matt. The problem is that the realtime map requires visits to have latitude/longitude data, but none of them do. I looked at your geolocation settings, and it looks like you only have the country database. Can you use the city database?

@alphaonex86 commented on May 25th 2015

Then the first step is do a warning on realtime map. I will try that's.
Work only with country will be great too.
Thanks for to take a look.

@alphaonex86 commented on May 25th 2015

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
index.php?module=Proxy&action=getCoreJs&cb=503856cd524ab9742be8e70c310a3d17:2522 Uncaught TypeError: Cannot read property 'remove' of undefined

@mattab commented on May 25th 2015 Member

Then the first step is do a warning on realtime map.

:+1: When we detect that the user is not using the city database, we could display a warning notification above the real time map eg. For the real time map to work, you need to use the GeoIP City database. Please go to <a>Geolocation settings</a> and setup the GeoIP city database. or better

@alphaonex86 commented on May 25th 2015

Yes, and like you do when only have country but not city, resolv from country database.

@alphaonex86 commented on May 28th 2015

if(removeOldVisits){visitSymbols.remove(function(r){if(r.lastActionTimestamp<oldest)_removed++;return r.lastActionTimestamp<oldest;});}
Uncaught TypeError: Cannot read property 'remove' of undefined
Bug from now, I think it's due to few days data tracking with geoip.
index.php?module=CoreHome&action=index&date=yesterday&period=day&idSite=1#/module=UserCountryMap&action=realtimeWorldMap&date=yesterday&period=day&idSite=1

@diosmosis commented on May 30th 2015 Member

@alphaonex86 I checked your realtime map (using the credentials you provided to @mattab) and it looks fine (viewed on Chrome). I can email you a screenshot if you'd like.

@alphaonex86 commented on May 30th 2015

@diosmosis it's the problem, sometime work, other time don't work.
When it don't work I see into chrome console the previous error. If you need more info, tel me what I need look. I will look when don't work again.

@diosmosis commented on May 31st 2015 Member

To try and diagnose the issue, you'll have to find the result of a specific XHR request when the map isn't working. To do this when you see the error, do the following:

  1. Open the inspector tools & reload the page.
  2. Switch to the 'Network' tab.
  3. Look for the XHR request that looks like index.php?module=API&method=Live.getLastVisitsDetails and get the response.

If there's no error in the response, then look at your webserver logs & the Piwik log file (if you've got logging enabled). Hopefully there will be an error somewhere.

@alphaonex86 commented on May 31st 2015

[28-May-2015 01:26:31 UTC] PHP Fatal error: Call to undefined method Piwik\DataTable\Map::getMetadata() in /home/first-world.info/stat/plugins/Bandwidth/Bandwidth.php on line 117
[28-May-2015 01:26:31 UTC] PHP Fatal error: Uncaught exception 'Exception' with message 'Call to undefined method Piwik\DataTable\Map::getMetadata()' in /home/first-world.info/stat/plugins/CorePluginsAdmin/Controller.php:371
#1 /home/first-world.info/stat/core/FrontController.php(531): call_user_func_array(Array, Array)
#2 /home/first-world.info/stat/core/FrontController.php(97): Piwik\FrontController->doDispatch('CorePluginsAdmi...', 'safemode', Array)
#3 /home/first-world.info/stat/core/FrontController.php(184): Piwik\FrontController->dispatch('CorePluginsAdmi...', 'safemode', Array)
thrown in /home/first-world.info/stat/plugins/CorePluginsAdmin/Controller.php on line 371

On the log I see only that's.

@diosmosis commented on May 31st 2015 Member

That error is unrelated. Please follow the steps in my comment when the realtime map is not working.

@alphaonex86 commented on June 2nd 2015

Ok. Can you at least put and if fonction undefined where mentionned skip the code part to prevent error?

@diosmosis commented on June 2nd 2015 Member

You can add this yourself if you don't want to investigate the random issue, but we won't hide a possible bug in an actual release.

@mattab commented on June 8th 2015 Member

@alphaonex86 I took a look at your Piwik using the credentials you sent to matt. The problem is that the realtime map requires visits to have latitude/longitude data, but none of them do.

issue was renamed and scope reduced to: When real time map doesn't display users, display help message notification with solution.

The notification would be displayed when the wrong Geo ip database is used, and would suggest user to setup the right geoip database instead (with a link to Administration > Geo location settings).

@RomanStone commented on July 12th 2018

My case Switched to
Settings -> Geolocation -> GeoIP 2 (Php) : On
to make Real-time Map work.

Reason
piwik/plugins/UserCountryMap/javascripts/realtime-map.js:407

if (report.length) {
    // filter results without location
    report = $.grep(report, function (r) {
        return r.latitude !== null;
    });
}

And Ajax Response with "Default" Location Provider

{
...
    "city": null,
    "latitude": null, <--
    "longitude": null,
    "visitLocalTime": "00:00:01"
}
This Issue was closed on July 31st 2018
Powered by GitHub Issue Mirror