suttacentral / bilara

Our Computer Aided Translation software
10 stars 8 forks source link

Bilara *still* sometimes doesn't load properly #56

Closed sujato closed 4 years ago

sujato commented 4 years ago

This is just one of those gnarly bugs that is so hard pin down. yesterday I closed the issue for this, because I tested a bunch and it didn't happen. Now here it is again!

  1. Open Bilara, navigate to text.
  2. The text page is blank.
  3. Go "Home".
  4. Press "Go back", and the page is there.

Console error:

Uncaught (in promise) TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at HTMLElement.render (translation-view.js:170)
    at HTMLElement.update (lit-element.ts:217)
    at HTMLElement.performUpdate (updating-element.ts:704)
    at HTMLElement._enqueueUpdate (updating-element.ts:653)

This error appears even when the page loads correctly. But what happens, it comes up, then quickly fixes itself. I'm not exactly sure what's going on, but in the console the "live" errors are colored, the "stale" errors are b&w. When the page doesn't show, the error remains colored, when it does show, the error becomes b&w.

You can see a page loading "correctly" in the gif.

Screencast from 15-04-20 08_19_18

Both Chrome and Firefox report the same error, and identify line 170 in translation-views.js as the culprit (Type error, cannot convert undefined or null to object):

segmentIds = Object.keys(this._segments);