Closed dchiquito closed 3 years ago
It does indeed seem to be a race condition. App.vue triggers the fetchSchema
action, which downloads the schema asynchronously. DandisetLandingView is the only place where that schema is accessed, but it passes the schema as a prop to both DandisetMain and Meditor, where they assume that it is a non-null object.
We could either properly null-check the schema wherever it is consumed (difficult, since the whole page basically just can't be rendered without it) or we could include the schema fetch in main.ts
as a prerequesite for loading the app. We already require loadUser
to fully execute before the app loads, so we could just tack the schema in there as well in a Promise.all([...])
, at the cost of a slightly longer page load time.
It's a race condition in that sometimes DandisetMain
loads before the fetch completes?
While spamming refresh on a staging dandiset page, I encountered this error: I think it's a race condition that prevents the entire dandiset page from loading.