Cannot display schema list(0.35.x)

We have upgraded metabase from 0.34.3 to 0.35.3.

Then, the schema list displayed on the question page is no longer displayed.

Please tell me how to display the schema list

metabase_20200428_01

After investigation
When the management DB of metabase is mysql or Postgres and a new question is created, the schema list does not appear after that.

In the case of H2, there was no problem.

The JavaScript Console is as follows.

Hi @oke
I’m trying to reproduce this now, but just to understand you correctly:

  1. Setup Metabase with application database as Postgres/MySQL
  2. Try to create a new question by clicking “Ask a question”, but it will shows the loading spinner forever.
    Is that correctly understood?

If you click over to “Browse Data” and then back to “Ask a question”, does that fix the problem?

Can you post “Diagnostic Info” from Admin > Troubleshooting?

1.Setup metabase with postgres/mysql(MD_DB_XXXX)
2.metabase connect application database ( Postgres/ Mysql)
3.Ask a question
4.dispaly schema list <- OK
5.save question
6.Ask a question again
7. display Schema list <- NG ( Loading)

anytime
Browse Data can display the data correctly

correct pattern
1.Setup metabase with h2 (MD_DB_XXXX)
・・・
7. display Schema list <- OK

Blockquote
{
“browser-info”: {
“language”: “ja”,
“platform”: “MacIntel”,
“userAgent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36”,
“vendor”: “Google Inc.”
},
“system-info”: {
“file.encoding”: “UTF-8”,
“java.runtime.name”: “OpenJDK Runtime Environment”,
“java.runtime.version”: “1.8.0_242-b08”,
“java.vendor”: “Oracle Corporation”,
“java.vendor.url”: “http://java.oracle.com/”,
“java.version”: “1.8.0_242”,
“java.vm.name”: “OpenJDK 64-Bit Server VM”,
“java.vm.version”: “25.242-b08”,
“os.name”: “Linux”,
“os.version”: “3.10.0-1062.18.1.el7.x86_64”,
“user.language”: “en”,
“user.timezone”: “Asia/Tokyo”
},
“metabase-info”: {
“databases”: [
“mysql”,
“postgres”
],
“hosting-env”: “unknown”,
“application-database”: “mysql”,
“application-database-details”: {
“database”: {
“name”: “MySQL”,
“version”: “8.0.19”
},
“jdbc-driver”: {
“name”: “MariaDB Connector/J”,
“version”: “2.5.1”
}
},
“run-mode”: “prod”,
“version”: {
“tag”: “v0.35.1”,
“date”: “2020-04-02”,
“branch”: “release-0.35.x”,
“hash”: “e67f169”
},
“settings”: {
“report-timezone”: null
}
}
}

@oke
Excellent steps-to-reproduce, but I’ve tried several times and I cannot reproduce this on 0.35.3 - both on Postgres and MariaDB.

Do you do anything else between some of the steps?
Do you see any other errors in the browser console or in Admin > Troubleshooting > Logs?

I think you’re seeing this issue, but we haven’t been able to reproduce it:
https://github.com/metabase/metabase/issues/12323

Sorry, I forgot that I had version up.

1.Setup metabase0.34.3 with postgres/mysql(MD_DB_XXXX)
2.metabase connect application database ( Postgres/ Mysql)
3.versionup metabase0.35.3
4.Ask a question
5.dispaly schema list <- OK
6.save question
7.Ask a question again
8. display Schema list <- NG ( Loading)

@oke

I still cannot reproduce when setting up a new instance on 0.34.3 with MariaDB backend, and then upgrading to 0.35.3.

I think you might be doing something extra between the steps, since I’m not able to reproduce.
Are you seeing any errors in Admin > Troubleshooting > Logs?
Can you attach the complete log from the setup of 0.34.3 to when it fails to load the database/schema selector?

Here’s what I’m doing:

  1. Start new installation of 0.34.3 with MariaDB
  2. Complete the setup - no databases setup, just the Sample Dataset
  3. Shutdown
  4. Upgrade to 0.35.3
  5. Ask a question
  6. Shows database/schema selector
  7. Sample Dataset > Orders, and Save question
  8. Ask a question, again
  9. It still shows the database/schema selector

The procedure is looks like same
I created a new VM and tried it, but it did not reproduce.
Probably something is happening around the application database settings.
For example, a table alias

It’s hard to provide a full log, but I’ve got the SQL that was executed instead, so I’ll send it to you.
It looks like the last two SQLs are not running.
Don’t worry about different numbers of databases

//Success (metabase 0.34.3)

SELECT collection.personal_owner_id, collection.id FROM collection WHERE (personal_owner_id in (1))
SELECT permissions_group_membership.user_id, permissions_group_membership.group_id FROM permissions_group_membership WHERE (user_id in (1))
SELECT id FROM metabase_database WHERE is_sample = TRUE LIMIT 1
SELECT * FROM metabase_database ORDER BY lower(name), lower(engine)
SELECT collection.id FROM collection WHERE (location like ‘/1/%’)
SELECT p.object FROM permissions_group_membership pgm INNER JOIN permissions_group pg ON pgm.group_id = pg.id INNER JOIN permissions p ON p.group_id = pg.id WHERE pgm.user_id = 1
SELECT * FROM metabase_database ORDER BY lower(name), lower(engine)
SELECT * FROM metabase_database ORDER BY lower(name), lower(engine)
SELECT collection.id FROM collection WHERE (location like ‘/1/%’)
SELECT p.object FROM permissions_group_membership pgm INNER JOIN permissions_group pg ON pgm.group_id = pg.id INNER JOIN permissions p ON p.group_id = pg.id WHERE pgm.user_id = 1
SELECT metabase_database.id FROM metabase_database
SELECT metabase_database.engine FROM metabase_database WHERE id = 1 LIMIT 1
SELECT metabase_database.engine FROM metabase_database WHERE id = 3 LIMIT 1
SELECT collection.id FROM collection WHERE (location like ‘/1/%’)
SELECT metabase_database.engine FROM metabase_database WHERE id = 2 LIMIT 1
SELECT report_card.name, report_card.description, report_card.database_id, report_card.dataset_query, report_card.id, report_card.collection_id, report_card.result_metadata FROM report_card WHERE (result_metadata IS NOT NULL AND archived = FALSE AND (database_id in (1, 3, 2)) AND TRUE) ORDER BY lower(name) ASC
SELECT p.object FROM permissions_group_membership pgm INNER JOIN permissions_group pg ON pgm.group_id = pg.id INNER JOIN permissions p ON p.group_id = pg.id WHERE pgm.user_id = 1
SELECT * FROM metabase_table WHERE (active = TRUE AND (db_id in (2, 3, 1))) ORDER BY lower(schema) ASC, lower(display_name) ASC

//Failure (metabase 0.35.3)

SELECT id FROM metabase_database WHERE is_sample = TRUE LIMIT 1
SELECT collection.personal_owner_id, collection.id FROM collection WHERE (personal_owner_id in (1))
SELECT permissions_group_membership.user_id, permissions_group_membership.group_id FROM permissions_group_membership WHERE (user_id in (1))
SELECT * FROM metabase_database ORDER BY lower(name), lower(engine)
SELECT collection.id FROM collection WHERE (location like ‘/1/%’)
SELECT p.object FROM permissions_group_membership pgm INNER JOIN permissions_group pg ON pgm.group_id = pg.id INNER JOIN permissions p ON p.group_id = pg.id WHERE pgm.user_id = 1
SELECT * FROM metabase_database ORDER BY lower(name), lower(engine)
SELECT collection.id FROM collection WHERE (location like ‘/1/%’)
SELECT p.object FROM permissions_group_membership pgm INNER JOIN permissions_group pg ON pgm.group_id = pg.id INNER JOIN permissions p ON p.group_id = pg.id WHERE pgm.user_id = 1
SELECT * FROM metabase_database ORDER BY lower(name), lower(engine)
SELECT * FROM metabase_table WHERE (active = TRUE AND (db_id in (7, 4, 5, 3, 6, 2))) ORDER BY lower(schema) ASC, lower(display_name) ASC
SELECT collection.id FROM collection WHERE (location like ‘/1/%’)
SELECT p.object FROM permissions_group_membership pgm INNER JOIN permissions_group pg ON pgm.group_id = pg.id INNER JOIN permissions p ON p.group_id = pg.id WHERE pgm.user_id = 1
SELECT metabase_database.id FROM metabase_database
SELECT metabase_database.engine FROM metabase_database WHERE id = 7 LIMIT 1
SELECT metabase_database.engine FROM metabase_database WHERE id = 4 LIMIT 1
SELECT metabase_database.engine FROM metabase_database WHERE id = 6 LIMIT 1
SELECT metabase_database.engine FROM metabase_database WHERE id = 3 LIMIT 1
SELECT metabase_database.engine FROM metabase_database WHERE id = 2 LIMIT 1
SELECT metabase_database.engine FROM metabase_database WHERE id = 5 LIMIT 1
SELECT report_card.name, report_card.description, report_card.database_id, report_card.dataset_query, report_card.id, report_card.collection_id, report_card.result_metadata FROM report_card WHERE (result_metadata IS NOT NULL AND archived = FALSE AND (database_id in (7, 4, 6, 3, 2, 5)) AND TRUE) ORDER BY lower(name) ASC
SELECT * FROM collection WHERE (id in (34))

@oke

It looks like you’ve setup many databases, not just “Sample Dataset” - I’m guessing it has something to do with that.

  1. What do you mean by “it’s not running” and “Failure” ?
  2. Do you see any errors in Admin > Troubleshooting > Logs?

I understand the cause.

It seems that it occurred when “Enabled Nested Queries” was turned off

@oke Excellent! :tada: Now I’ve reproduced as well with “Enabled Nested Queries” turned off. At least it’s not specific to the type of application database, and has a workaround (turn on the setting).

I was able to avoid it, so it’s OK.
Thank you very much.