Table list doesn't load after saving a question

After saving a question, I’m unable to ask a new question as my list of tables won’t load.

This is the stack trace I’m seeing in the console:

{:message nil,
 :type java.lang.NullPointerException,
  "--> api.database$card_has_ambiguous_columns_QMARK_.invokeStatic(database.clj:96)"

If I go in and manually mark it as archived in the report_card table (MySQL), my list will again load. However, saving a new question produces the same results.

I’ve tried running versions 0.32.0 through 0.32.4 of the .jar with no difference in outcome.

Has anyone else encountered this?

Hi @harrywynn
Are there any errors/warnings before the actual stacktrace?
So you’re using MySQL as your backend for metadata? Which version of MySQL?
Do you see any errors in MySQL?
Are you using a reverse proxy like Nginx?

Hey @flamber

No, there aren’t any other errors or warnings before this happens. Everything seems to be working fine up until that point. I’m just running the .jar from the terminal on macOS right now. MySQL version is 5.7.16

If I run a new question and save it then everything works fine. If I archive the question, again everything is fine. If I flip the question back to not be archived, then it breaks again.

I’m not sure if there’s something else that needs to be flipped, but editing the internal database is not recommended - you should be using the API:

I was just editing it manually to try and get to the bottom of why the saved card is causing my list of databases to not load. It’s not something I would do as a permanent solution.

I’m not sure how to debug - haven’t seen that error before.
Did you upgrade to 0.32.4 or are you just starting out with Metabase?
Do you see any errors in MySQL?
Are you trying to make a query on a table, which is empty?
Can you reproduce this error, when using the Sample Dataset? If yes, please give steps.

@flamber thanks for your help here. I was experiencing errors with the saves to report_card and the data being too long for the result_metadata column, so I change the type. Apparently this also caused the other problem I originally posted about here as changing it back to text resolved it for me.

Yeah, you need to define larger type for some columns, since TEXT/BLOB is “only” 64KB, whereas MEDIUM.... can be 16MB and LONG.... can be 4GB.
Specially a problem in the table query_cache if you have large results.

I suppose this is still a bug though, as changing the column type to medium or long blob causes the break.

But what errors do you get? Check Metabase log and MySQL log.

If you’re changing a column type from TEXT to MEDIUMBLOB, then it will probably fail, since it’s two different types, but you should be able to change it to MEDIUMTEXT

I’m using MariaDB 10.3 and I think I only changed the COLLATION to utf8mb4_unicode_ci and then column query_cache.results from BLOB to LONGBLOB

Derp, changing it to blob was definitely my problem. Thanks for pointing it out!