'There was a problem with this visualization' - 'Cannot read property 'rows' of undefined'

Hi,

When I open one of my tables, I get this error, it just started a few days ago:

There was a problem with this visualization

Here's the full error message

Cannot read property 'rows' of undefined

However all queries appear to work just fine. It is just when opening the raw table, it never did it before, and I'm concerned it is indicative of some other more harmful problem that may present itself soon. Has anyone seen it before and know how to address it? I have not found this exact problem on the forum yet.

Thanks!

{
  "browser-info": {
    "language": "en-US",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.7+10",
    "java.vendor": "AdoptOpenJDK",
    "java.vendor.url": "https://adoptopenjdk.net/",
    "java.version": "11.0.7",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.7+10",
    "os.name": "Linux",
    "os.version": "4.14.138-89.102.amzn1.x86_64",
    "user.language": "en",
    "user.timezone": "GMT"
  },
  "metabase-info": {
    "databases": [
      "redshift"
    ],
    "hosting-env": "unknown",
    "application-database": "h2",
    "application-database-details": {
      "database": {
        "name": "H2",
        "version": "1.4.197 (2018-03-18)"
      },
      "jdbc-driver": {
        "name": "H2 JDBC Driver",
        "version": "1.4.197 (2018-03-18)"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2020-12-17",
      "tag": "v0.37.4",
      "branch": "release-x.37.x",
      "hash": "e0d5287"
    },
    "settings": {
      "report-timezone": "US/Eastern"
    }
  }
}

Hi @jazz78
I have seen the problem before in specific cases:
https://github.com/metabase/metabase/issues/12586
https://github.com/metabase/metabase/issues/13536

But not by just showing a plain table. Check for detailed errors in Admin > Troubleshooting > Logs.
Try doing a manual sync of your data - Admin > Databases > (your-db) > Sync database schema now.
And check the log for errors during sync too.

Would also recommend that you upgrade to 0.37.8 and migrate away from H2:
https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html

Hi @flamber

Thanks very much. Will try that and report back. Will also plan to do the upgrade. Thank you!

Hi @flamber

So far we have done:

  1. Upgrade to .37.8
  2. Manual Sync -Admin > Databases > (your-db) > Sync database schema now

The problem persists.

The logs show this warning that may be revelant, not sure:

[ae5e83a0-a9b8-4cf2-af82-fb6ecd2c8ec9] 2021-02-11T13:00:34-06:00 WARN metabase.driver.sql-jdbc.sync.describe-table Don't know how to map column type 'JSON' to a Field base_type, falling back to :type/*.

Thanks

@jazz78 I’m 90% sure your problem is solved in the upcoming 0.38.0, which is almost done.
Are you using Views on Redshift?
Can you provide the schema of your table? This is how to do describe table_name on Redshift:

SELECT *
FROM pg_table_def
WHERE tablename = 'table_name'
AND schemaname = 'public';

Hi @flamber,

Thanks so much for the follow up - i'm not sure how to tell if I am using views on redshift. This data is coming in from materialized view in Panoply so it quite possibly is. See 'transformations' on this link:

https://panoply.io/docs/manage-data/data-ingestion-engine/

Attached is the schema - thanks!

Hi @flamber

An update, I was making some other general adjustments to that materialized view, now I can actually click on the error and it now shows:

"Text '43921-01-01' could not be parsed, unparsed text found at index 2"

I am not sure if this helps, or illuminates something here, adding it just in case.

I am not sure what to make of it, if it's related to the prior thing, or something brand new, that I need to be concerned about.

Again - it appears other queries and reports seem to be working normally so far, it is just showing on the full table view.

Thanks

@flamber - Another general point is that we have many materialized views from panoply pointing in to metabase, and it is only this one table causing an issue.

@jazz78 Okay, 99% sure your problem will be solved on 0.38.0 after it has synced:
https://github.com/metabase/metabase/issues/13141
https://github.com/metabase/metabase/issues/13622

@flamber got it thanks very much!

Hi @flamber

An update on this. We have not upgraded to 0.38.0 yet but the issue is now resolved.

it turns out that we had some bad data in one of the source fields. i am not 100% sure how things went down but i think something like:

  1. field X - may have previously been a text field (it’s sort of an ancillary field has some importance but less used)
  2. we had reassembled some of our data in panoply, and subsequently for sure field X was classified as a date field (it is date data) - ( did not realize this change was made in field type)
  3. some bad data in the raw data, must have made some of the records materialize or load badly for that field, because essentially the data was input in the wrong order making it not a date

solution
a) we fixed the raw data
b) everything worked.

So the confusing part here for me was the sort of ‘partial’ working. Panoply worked fine, metabase loaded fine, and every report we examined in metabase ran fine, it was just that raw open view of the table was a problem. So if something else had kicked out sooner, we might have had a better clue.

Anyway - I wanted to provide an update ,and thank you for taking a look at it, and also apologize as poor data hygiene was ultimately a factor, probably 100% factor in our issue.

Best

1 Like