Page MenuHomePhabricator

Kartotherian error: GroupId not available
Open, HighPublic

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

Gehel created this task.Feb 21 2017, 3:22 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 21 2017, 3:22 PM
JGirault added a subscriber: Yurik.Feb 21 2017, 9:13 PM

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 :

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; removed Maps (Kartotherian).Oct 24 2017, 7:06 PM
Restricted Application added a project: Discovery. · View Herald TranscriptOct 24 2017, 7:06 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.
debt added a comment.Oct 25 2017, 3:31 PM

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.

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! :)

Gehel added a comment.Oct 25 2017, 3:37 PM

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...

debt added a comment.Oct 25 2017, 3:58 PM

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:

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

Krinkle removed a subscriber: Krinkle.May 12 2018, 12:41 AM
Pnorman raised the priority of this task from Low to Normal.Jul 10 2018, 4:40 PM
Pnorman added a subscriber: Pnorman.

This is still the most common message in the logs.

Jc86035 added a subscriber: Jc86035.EditedDec 13 2018, 2:53 PM

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 Normal 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

Pikne added a subscriber: Pikne.May 22 2019, 12:32 PM

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).