Page MenuHomePhabricator

v is undefined
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

App version: 1.0.0.1231

message
v is undefined

Impact

unknown

Notes

Details

Request ID
https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2020.09.10/clienterror?id=AXR5dWBfMQ_08tQaPBX0&_g=h@44136fa
Request URL
n/a
Stack Trace
exception.trace
getInitialLangList/<@app://kaios.wikipedia.org/dist/main.js:1:395829
getInitialLangList@app://kaios.wikipedia.org/dist/main.js:1:395809
useSearchLanguage/<@app://kaios.wikipedia.org/dist/main.js:1:395323
q@app://kaios.wikipedia.org/dist/main.js:1:283028
I.__c/</h.__h<@app://kaios.wikipedia.org/dist/main.js:1:285570
I.__c/<@app://kaios.wikipedia.org/dist/main.js:1:285531
I.__c@app://kaios.wikipedia.org/dist/main.js:1:285471
T@app://kaios.wikipedia.org/dist/main.js:1:267101
_/<@app://kaios.wikipedia.org/dist/main.js:1:262636
_@app://kaios.wikipedia.org/dist/main.js:1:262455

Event Timeline

SBisson created this task.Sep 10 2020, 7:50 PM
Restricted Application added a project: Inuka-Team. · View Herald TranscriptSep 10 2020, 7:50 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
SBisson updated the task description. (Show Details)Sep 10 2020, 7:51 PM
SBisson moved this task from Backlog to Ready for Dev on the Inuka-Team (Kanban) board.
eamedina claimed this task.Oct 6 2020, 2:05 PM
eamedina moved this task from Ready for Dev to Dev on the Inuka-Team (Kanban) board.

Investigation ongoing, sharing some findings so far.

I’m seeing in the Kibana dashboard that for every v is undefined error there is a corresponding h is undefined error. Seems they come in pairs. Each pair shares the @timestamp and http.client_ip address, so T262594 may be related to this T262592. One error points to the RadioListView component and the other to the getInitialLangList method, both used when changing app language (getInitialLangList sets the items used by the RadioListView when there's no query)

I wonder if it’s a specific language that some users are trying to set that triggers the error. I’m looking at the different languages in India (https://en.wikipedia.org/wiki/Languages_of_India) and trying them out in the app to see if I can replicate the error locally (or at least some version/hint of the error), but no luck. Something that stood out here is that Urdu is not showing up on language search even though it is part of the languages list [1].

It would be useful to know what are the possible/likely values that localStorage.getItem('language-app’) (from getAppLanguage) may return for users in India. If items get 'unshifted' with an undefined or some faulty value in getInitialLangList, that would likely cause issues in RadioListView

possible due to the reason of only 1 rtl language in the article, see T254969

I need to look more into this idea, although I don't see any pointer to the article language (as opposed to app language).

I’m working with HEAD detached at 441ecff942e83d66b777e744cfced710dcfe2db8


[1]

  {
    canonical_name: 'Goan Konkani (Devanagari script)',
    code: 'gom',
    name: '\u0917\u094B\u0935\u093E \u0915\u094B\u0902\u0915\u0923\u0940'
  }

…

  {
    canonical_name: 'Telugu',
    code: 'te',
    name: '\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41'
  }
…
  {
    canonical_name: 'Sanskrit',
    code: 'sa',
    name: '\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d'
  }
…
  {
    canonical_name: 'Tamil',
    code: 'ta',
    name: '\u0ba4\u0bae\u0bbf\u0bb4\u0bcd'
  }
…
  {
    canonical_name: 'Malayalam',
    code: 'ml',
    name: '\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02'
  }
…
  {
    canonical_name: 'Kannada',
    code: 'kn',
    name: '\u0c95\u0ca8\u0ccd\u0ca8\u0ca1'
  }
…
  {
    canonical_name: 'Bengali',
    code: 'bn',
    name: '\u09ac\u09be\u0982\u09b2\u09be'
  }
…
  {
    canonical_name: 'Marathi',
    code: 'mr',
    name: '\u092e\u0930\u093e\u0920\u0940'
  }
…
  {
    canonical_name: 'Gujarati',
    code: 'gu',
    name: '\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0'
  }
…
  {
    canonical_name: 'Urdu', // not showing up on search but present in languages array
    code: 'ur',
    name: '\u0627\u0631\u062f\u0648'
  }
…
  {
    canonical_name: 'Punjabi',
    code: 'pa',
    name: '\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40'
  }

I think you're on the right track. Try to set your device to a language that doesn't exist in the app to check if it replicates some of those issues. One way to do that is to set the app language to es, then comment out es in the code and reload the app.

Try to set your device to a language that doesn't exist in the app to check if it replicates some of those issues. One way to do that is to set the app language to es, then comment out es in the code and reload the app.

Indeed this test replicates some of the issues, proposing a solution with this PR: https://github.com/wikimedia/wikipedia-kaios/pull/279.

Evidence we have so far suggests that the solution in PR#279 addresses T262594 as well. Does it make sense to also link that PR in T262594?

Evidence we have so far suggests that the solution in PR#279 addresses T262594 as well. Does it make sense to also link that PR in T262594?

If you're confident they always happen in pair as a consequence of the same issue, you can even merge it here as a duplicate. That's much simpler than moving them together and explaining over and over that they are the same.

hueitan moved this task from Dev to Code Review on the Inuka-Team (Kanban) board.Oct 12 2020, 8:35 AM

Sounds good, merging tickets now and moving to QA

Jpita added a subscriber: Jpita.Oct 12 2020, 9:33 PM

Try to set your device to a language that doesn't exist in the app to check if it replicates some of those issues. One way to do that is to set the app language to es, then comment out es in the code and reload the app.

Indeed this test replicates some of the issues, proposing a solution with this PR: https://github.com/wikimedia/wikipedia-kaios/pull/279.

Evidence we have so far suggests that the solution in PR#279 addresses T262594 as well. Does it make sense to also link that PR in T262594?

what's the user impact?
I tried this before launch and got the english language by default (as expected?)

what's the user impact?

The behavior I'm seeing from my end by running the test described above, after reloading with a language that does not exist in the app:

  • App loads in English as default (as expected), landing on home page
  • I can click on settings menu, which also renders in English text
  • At this point I can click on any option except "Language" and app behaves normally. I can close menu to go back to home page
  • However if I click "Language" in the settings menu, the app hangs. This is when the RadioListView error shows up in the console because of an undefined that made its way to the languages list. Thus the user impact: the app hangs, nothing changes if you click on "Language", then the other menu options become unresponsive as well, I'm not able to go back to home page, the 'solution' for the user at this point is closing and opening the app again.

I've merged the PR. The ultimate validation is checking that the error doesn't appear in production after the updated version of the app is released. We don't know when that's going to be so we have to keep this task somewhere until then.

Jpita moved this task from QA to Design sign off on the Inuka-Team (Kanban) board.Nov 10 2020, 4:11 PM

I'll keep this open in the product column until our next release.

I'll keep this open in the product column until our next release.

We have a query on the Q2 dashboard for the production errors that need to be verified after the next release. It needs to be closed to appear there.

AMuigai closed this task as Resolved.Nov 17 2020, 4:00 PM

Great, thanks!