Page MenuHomePhabricator

Kartotherian error: GroupId not available
Closed, InvalidPublic

Description

The error below is seen frequently on maps1* servers. Some more investigation required to understand if there is an issue (and what the issue is) and either fix the issue or reduce the log level / verbosity.

[2017-02-21T15:14:53.500Z] ERROR: kartotherian/24 on maps1001: GroupId not available (err.levelPath=error)
    kartotherian: GroupId not available
        at /srv/deployment/kartotherian/deploy-cache/revs/abc731d9ad76337720e0741016001d590beb9492/node_modules/kartotherian-snapshot/lib/mapdataLoader.js:53:19
        at tryCatcher (/srv/deployment/kartotherian/deploy-cache/revs/abc731d9ad76337720e0741016001d590beb9492/node_modules/bluebird/js/release/util.js:16:23)
        at Promise._settlePromiseFromHandler (/srv/deployment/kartotherian/deploy-cache/revs/abc731d9ad76337720e0741016001d590beb9492/node_modules/bluebird/js/release/promise.js:510:31)
        at Promise._settlePromise (/srv/deployment/kartotherian/deploy-cache/revs/abc731d9ad76337720e0741016001d590beb9492/node_modules/bluebird/js/release/promise.js:567:18)
        at Promise._settlePromise0 (/srv/deployment/kartotherian/deploy-cache/revs/abc731d9ad76337720e0741016001d590beb9492/node_modules/bluebird/js/release/promise.js:612:10)
        at Promise._settlePromises (/srv/deployment/kartotherian/deploy-cache/revs/abc731d9ad76337720e0741016001d590beb9492/node_modules/bluebird/js/release/promise.js:691:18)
        at Promise._fulfill (/srv/deployment/kartotherian/deploy-cache/revs/abc731d9ad76337720e0741016001d590beb9492/node_modules/bluebird/js/release/promise.js:636:18)
        at Promise._resolveCallback (/srv/deployment/kartotherian/deploy-cache/revs/abc731d9ad76337720e0741016001d590beb9492/node_modules/bluebird/js/release/promise.js:431:57)
        at Promise._settlePromiseFromHandler (/srv/deployment/kartotherian/deploy-cache/revs/abc731d9ad76337720e0741016001d590beb9492/node_modules/bluebird/js/release/promise.js:522:17)
        at Promise._settlePromise (/srv/deployment/kartotherian/deploy-cache/revs/abc731d9ad76337720e0741016001d590beb9492/node_modules/bluebird/js/release/promise.js:567:18)
        at Promise._settlePromise0 (/srv/deployment/kartotherian/deploy-cache/revs/abc731d9ad76337720e0741016001d590beb9492/node_modules/bluebird/js/release/promise.js:612:10)
        at Promise._settlePromises (/srv/deployment/kartotherian/deploy-cache/revs/abc731d9ad76337720e0741016001d590beb9492/node_modules/bluebird/js/release/promise.js:691:18)
        at Promise._fulfill (/srv/deployment/kartotherian/deploy-cache/revs/abc731d9ad76337720e0741016001d590beb9492/node_modules/bluebird/js/release/promise.js:636:18)
        at PromiseArray._resolve (/srv/deployment/kartotherian/deploy-cache/revs/abc731d9ad76337720e0741016001d590beb9492/node_modules/bluebird/js/release/promise_array.js:125:19)
        at PromiseArray._promiseFulfilled (/srv/deployment/kartotherian/deploy-cache/revs/abc731d9ad76337720e0741016001d590beb9492/node_modules/bluebird/js/release/promise_array.js:143:14)
        at Promise._settlePromise (/srv/deployment/kartotherian/deploy-cache/revs/abc731d9ad76337720e0741016001d590beb9492/node_modules/bluebird/js/release/promise.js:572:26)

Event Timeline

I started a simple PR to https://github.com/kartotherian/kartotherian-snapshot/pull/4 (@Yurik ping), but it's not really answering the current problem.

I think the problem is mostly seen right after saving an edit, when the database isn't ready. It takes a couple of minutes before it is.
The snapshot service asks for the group ID and fails.

The user sees :

Screen Shot 2017-02-21 at 3.40.26 PM.png (480×494 px, 24 KB)

This is easy enough to fix by adding data to memcached when saving, just like we do in graphoid. Moreover, this can be done at the jsonconfig level.

debt added a subscriber: debt.

Moving off the sprint board - the Discovery team won't be able to do this work at this time.

debt triaged this task as High priority.Jun 15 2017, 3:25 PM
This comment was removed by debt.
debt lowered the priority of this task from High to Low.Jun 15 2017, 3:55 PM
Krinkle edited projects, added Maps (Kartographer); removed Maps.
Krinkle moved this task from Kartographer to Kartotherian on the Maps board.
Krinkle edited projects, added Maps (Kartotherian); removed Maps (Kartographer).

Sorry, didn't realise Maps was the same project as Maps (Kartotherian). Adding Maps made it remove itself from Maps (Kartotherian). Restored now :)

I can reproduce this consistently on the following page:

https://en.wikivoyage.org/wiki/South_Central_Arizona
[..]

@Krinkle - can you list steps to reproduce this issue and creation of the URL? When going to the page and clicking on the individual maplinks (or on the interactive map), I can't get the error to occur.

The error happens directly on page load. No additional user steps.

  1. Navigate to https://en.wikivoyage.org/wiki/South_Central_Arizona
  2. Open browser developer tools to observe the failed request, in either the Network tab or the Console.
Screen Shot 2017-10-25 at 16.25.23.png (1×2 px, 1 MB)
Screen Shot 2017-10-25 at 16.27.55.png (356×2 px, 117 KB)

I can reproduce this consistently on the following page:

https://en.wikivoyage.org/wiki/South_Central_Arizona
[..]

@Krinkle - can you list steps to reproduce this issue and creation of the URL? When going to the page and clicking on the individual maplinks (or on the interactive map), I can't get the error to occur.

The error happens directly on page load. No additional user steps.

  1. Navigate to https://en.wikivoyage.org/wiki/South_Central_Arizona
  2. Open browser developer tools to observe the failed request, in either the Network tab or the Console.
Screen Shot 2017-10-25 at 16.25.23.png (1×2 px, 1 MB)
Screen Shot 2017-10-25 at 16.27.55.png (356×2 px, 117 KB)

Ah, I see now. Normal users of the pages don't see the errors, but the errors *do* exist in developer tools. Thanks for the clarification! :)

We first load a static picture of the map (which is broken), which is then replaced by an interactive map. So if it loads fast enough, you don't actually see the failed static image.

My understanding was that the switch to interactive map should only happen on user interaction (but either I am wrong, or there is a bug).

This still means that this map is broken for users without JS enabled.

As to how to fix that... maybe @MaxSem can help, but this requires digging into kartotherian...

We first load a static picture of the map (which is broken), which is then replaced by an interactive map. So if it loads fast enough, you don't actually see the failed static image.

My understanding was that the switch to interactive map should only happen on user interaction (but either I am wrong, or there is a bug).

This still means that this map is broken for users without JS enabled.

As to how to fix that... maybe @MaxSem can help, but this requires digging into kartotherian...

I don't think the static map service is enabled on Wikivoyage (by default)....and, apparently my connection is fast enough (whoa!) that I don't see the failed image. However, when turning off JS in my safari browser, I just see a blank box where the map should be, no error:

no_js_safari.png (682×781 px, 230 KB)

and clicking on the map only shows this (not a good user experience):

no_js_safari_result.png (398×349 px, 62 KB)

Pnorman raised the priority of this task from Low to Medium.Jul 10 2018, 4:40 PM
Pnorman added a subscriber: Pnorman.

This is still the most common message in the logs.

This still happens whenever mapframe is used in Special:ExpandTemplates (example). It's probably happening on a lot of pages right now because I just enabled it in {{Infobox bridge}}. (It's also worse on enwiki because the interactive map isn't displayed except for in the full window view.)

Strainu raised the priority of this task from Medium to High.May 22 2019, 9:47 AM
Strainu added subscribers: Jhernandez, Strainu.

This is also happening on ro.wiki since I enabled it in InfoboxSettlement. As more and more pages use mapframe, we will need a solution, so trying to raise priority.

Is there a workaround we can put in place? See: https://ro.wikipedia.org/wiki/Provincia_Entre_R%C3%ADos

Is there a workaround we can put in place? See: https://ro.wikipedia.org/wiki/Provincia_Entre_R%C3%ADos

All I can think of is to null edit all affected pages that display map via this template.

This error to my vague understanding can be observed whenever map content is changed, but GeoJSON in page_props table isn't updated yet for page where map is displayed (e.g. when map content is changed via template or when static map with new content is requested in page preview).

Change 536628 had a related patch set uploaded (by Mholloway; owner: Michael Holloway):
[mediawiki/services/kartotherian@master] Log a warning rather than throwing an error when groupdata not found

https://gerrit.wikimedia.org/r/536628

Change 536628 merged by jenkins-bot:
[mediawiki/services/kartotherian@master] Log a warning rather than throwing an error when groupdata not found

https://gerrit.wikimedia.org/r/536628

WMDE-Fisch removed a project: Patch-For-Review.
WMDE-Fisch added a subscriber: WMDE-Fisch.

The error was altered and downgraded to a warning, If I'm not mistaken its not appearing anymore. I guess it makes sense to create a new ticket when there's a new lead.