Questions "doing science" forever under specific database/collection permission

Hi there,

I would like to report a bug in Metabase.

When

  • a non-admin user accesses a question created via Ask a question > Custom question, and
  • that user is denied access to the database from which the question was created, and
  • that user is granted either view or curate access to the collection in which the question was saved,

then

  • Metabase shows DOING SCIENCE... forever.

Interestingly, when the question was created via Ask a question > Native query, then under the same access condition Metabase shows the result just fine.

Thank you for your help.


Here’s the detail of Metabase in my system.

  • Browser and its version: Chrome Version 76.0.3809.132 (Official Build) (64-bit)
  • Operating system: macOS Mojave Version 10.14.4 (18E226)
  • The type of database(s) connected to Metabase: BigQuery
  • The version of Metabase run: 0.33.0
  • Metabase hosting environment: Docker
  • Metabase’s internal database type: PostgreSQL
  • Repeatable steps to reproduce the issue:
    1. Prepare an admin user and a non-admin user. Let’s call them (a) and (u), respectively
    2. As (a), create a question from a database via Ask a question > Custom question. Let’s call this question (q) and this database (d)
    3. As (a), save (q) to a collection. Let’s call this collection (c)
    4. As (a), deny (u)'s access to (d)
    5. As (a), grant (u)'s either view or curate access to (c)
    6. As (u), try to access (q)
    7. Metabase shows DOING SCIENCE... forever
  • Relevant error messages in the JavaScript developer’s console in the web browser:
app-main.bundle.js?9610de92c13b6b8c0d54:5 Error loading metadata for card TypeError: Cannot read property 'schemaNames' of null
    at t.value (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at p (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at Function.f.shouldRender (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at t.value (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at u._renderValidatedComponentWithoutOwnerOrContext (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at u._renderValidatedComponent (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at u._updateRenderedComponent (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at u._performComponentUpdate (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at updateComponent (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at u.receiveComponent (vendor.bundle.js?9610de92c13b6b8c0d54:1)

app-main.bundle.js?9610de92c13b6b8c0d54:5 Uncaught (in promise) TypeError: Cannot read property 'schemaNames' of null
    at t.value (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at p (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at Function.f.shouldRender (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at t.value (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at u._renderValidatedComponentWithoutOwnerOrContext (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at u._renderValidatedComponent (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at u._updateRenderedComponent (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at u._performComponentUpdate (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at updateComponent (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at u.receiveComponent (vendor.bundle.js?9610de92c13b6b8c0d54:1)

app-main.bundle.js?9610de92c13b6b8c0d54:5 Uncaught TypeError: Cannot read property 'schemaNames' of null
    at t.value (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at p (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at Function.f.shouldRender (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at t.value (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at u._renderValidatedComponentWithoutOwnerOrContext (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at u._renderValidatedComponent (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at u._updateRenderedComponent (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at u._performComponentUpdate (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at updateComponent (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at u.receiveComponent (vendor.bundle.js?9610de92c13b6b8c0d54:1)

app-main.bundle.js?9610de92c13b6b8c0d54:5 Error getting setting table.columns TypeError: Cannot read property 'cols' of undefined
    at Object.getDefault (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at g (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at t.getComputedSettings (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at h (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at app-main.bundle.js?9610de92c13b6b8c0d54:5
    at vendor.bundle.js?9610de92c13b6b8c0d54:1
    at vendor.bundle.js?9610de92c13b6b8c0d54:1
    at vendor.bundle.js?9610de92c13b6b8c0d54:1
    at vendor.bundle.js?9610de92c13b6b8c0d54:1
    at vendor.bundle.js?9610de92c13b6b8c0d54:1

app-main.bundle.js?9610de92c13b6b8c0d54:5 Error getting setting table._cell_background_getter TypeError: Cannot read property 'rows' of undefined
    at Object.getValue (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at g (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at t.getComputedSettings (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at h (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at app-main.bundle.js?9610de92c13b6b8c0d54:5
    at vendor.bundle.js?9610de92c13b6b8c0d54:1
    at vendor.bundle.js?9610de92c13b6b8c0d54:1
    at vendor.bundle.js?9610de92c13b6b8c0d54:1
    at vendor.bundle.js?9610de92c13b6b8c0d54:1
    at vendor.bundle.js?9610de92c13b6b8c0d54:1

app-main.bundle.js?9610de92c13b6b8c0d54:5 Uncaught (in promise) TypeError: Cannot read property 'schemaNames' of null
    at t.value (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at p (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at Function.f.shouldRender (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at t.value (app-main.bundle.js?9610de92c13b6b8c0d54:5)
    at u._renderValidatedComponentWithoutOwnerOrContext (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at u._renderValidatedComponent (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at u._updateRenderedComponent (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at u._performComponentUpdate (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at updateComponent (vendor.bundle.js?9610de92c13b6b8c0d54:1)
    at u.receiveComponent (vendor.bundle.js?9610de92c13b6b8c0d54:1)

Hi @vincentimo
Very detailed report :+1:
It sounds very much like this issue, but it was fixed in 0.33.0: https://github.com/metabase/metabase/issues/10402
Do when you see the “doing science”, can you check the Metabase log for errors or permission warnings?
I don’t think it’s going to make any change upgrading to 0.33.2, but there has been a lot of other fixes, so it might be worth it just for that.

Hi @flamber, thank you for your response.

For some reason the issue persists in our system while we use Metabase 0.33.0.

We'd tried to check the Metabase log while the Metabase was "doing science", but it didn't show any entries for the question being opened. Considering the error message in the JavaScript developer’s console in the web browser showed Cannot read property 'schemaNames' of null, we suspect the request was prevented in the front end.

By the way, when you follow the steps above, is the issue reproduced in your system?

I don’t think it’s going to make any change upgrading to 0.33.2, but there has been a lot of other fixes, so it might be worth it just for that.

Agreed, there's no harm in trying the new version.

@vincentimo

I cannot reproduce on any of the 0.33.x versions.
Which database are you using?

Could it be that it’s an issue with the database not syncing/scanning correctly, which can cause all types of other problems? Admin > Databases > (db) > “Sync database schema now” and “Re-scan field values now”.
And check the Metabase log for any errors, since startup through sync/scan through accessing the question with the user.

Without ways to reproduce or logs errors, it can be really tricky to debug issues.