Visualisation graphs not reading Timeseries

Dear Metabase Team,

It seems that Metabase still reads our data correctly but got the visualization part glitched. Time not showing properly and went wrong. Is there a way to solve this issue? Thanks.

Hi @SteveFan
Which version of Metabase? If you’re using 0.33.1, then upgrade to 0.33.2

Hi Flamber,

Thanks for your reply. I am using 0.33.2. And this issued happened just this morning (AEST brisbane time). @flamber

Kind Regards

Hmmm… interesting. I can clearly see the chart is all messed up, but not sure what’s going on. It looks a lot like the problem that 0.33.1 introduced, but was fixed by 0.33.2 the next day. Can you double-check that you’re using 0.33.2?

So everything was working fine yesterday, but it just started to misbehave today?
And you were using 0.33.2 yesterday too?

Which database are you querying?
Could there have been some change in the database, since yesterday, which is causing this?

Hi @flamber,

Yes, I can confirm that I am using 0.33.2, and everything worked fine yesterday but just started to misbehave today. The database I am querying is Postgresql – Google Cloud, and there was no change before this problem happened. Here is a screenshot of my Metabase version:

Okay, thanks for double checking.
I have never heard about visualizations suddenly changing, so it might be a little difficult to debug (unless you can reproduce the issue with the Sample Dataset), but let’s try investigating.

Is this problem only with one question or multiple/every questions? If only a single question, then goto the question and click the pencil (:pencil2:) next to the question title and select “View revision history”, just to make sure the questions hasn’t been edited by someone.

Which browser are you using? Have you tried another browser (use incognito-mode to ensure there’s no extension messing with something)?

Hi @flamber

Thanks for reply. Unfortunately, this problem is happening to all questions…I mean all queries/questions that have using time as X axis are messed up.
Also, I have tried to edit the query and create a new graph, or change the visualisation graph type, but still got the same problem.
And I have tried to let my colleague to access the graph, he got the same problem, so I suppose it is not the browser issue. I have also tried the incognito-mode, still failed, pretty sad isn’t it…It is really weird.

Kind Regards

It’s getting stranger and stranger. Which browser are you using?
Can you reproduce the problem also with Sample Dataset, just to try to figure out if the issue is specific to your queried database or if it is general issue with Metabase?

Hi @flamber
Trust me, it has now become even weirder. As you said, I created queries using the sample dataset, it seems that the problem only exists when the query is originally created by me. But if I use the integrated “Editor” function in the Metabase, the problem is gone. Here are pictures of the comparison:

FYI, in the first graph, the left graph is using the sample dataset and the right graph is using our data. They both showed correctly, using the Metabase integrated function.
However, in the picture below, even the sample dataset failed to show correct visualization when I am creating an original query.

@flamber Sorry I forgot to mention that I am using Chrome.

Okay, but you have to remember that the Sample Dataset is a H2 database, so you need to use syntax specific to that database and not Postgres.

So if you make a question of Sample Dataset’s Order table, Sum of Total by CreatedAt:Month in the query browser (the visual interface) and then click the Editor-button in top-right, then you’ll see a “View the SQL”-button in top-right. If you click that, it’ll show you the code, which should look like this:

SELECT parsedatetime(formatdatetime("PUBLIC"."ORDERS"."CREATED_AT", 'yyyyMM'), 'yyyyMM') AS "CREATED_AT", sum("PUBLIC"."ORDERS"."TOTAL") AS "sum"
GROUP BY parsedatetime(formatdatetime("PUBLIC"."ORDERS"."CREATED_AT", 'yyyyMM'), 'yyyyMM')
ORDER BY parsedatetime(formatdatetime("PUBLIC"."ORDERS"."CREATED_AT", 'yyyyMM'), 'yyyyMM') ASC

Does that fail too?

I’m a little curious what you meant with “only exists when the query is originally created by me”.
Are you saying that the problem is only with all questions created by you?
Or did you mean that the problem is only with Native questions (SQL), which only you create, since the other users are using the visual query browser?

Hi @flamber
Thanks for reply. The query you gave me worked successfully.
The problem happens to all native queries. There are some other native queries created by my colleagues and we have the same problem. Without using the format you gave to me above, all queries worked fine before this morning.

I find that if I code time as “settlement_time”, it will show correct visualisation. If I code as settlement_time without quotation marks, it will fail. But this did not happen before.

Okay, so the problem is specific to your database (Postgres) and not the Sample Dataset (H2), but only when using Native question (SQL). Correct?

Could it be that Google has changed something or are you managing the Postgres and it’s just hosted on Google?

Sorry, forget about what I have just said. It succeeded without quotation as I have just tried opening an old query we created long time ago. For some reason, the problem is very random. Because as I have just opened queries had this problem, they failed again. I am confused.
Yes, it happens only when using native question. I don’t think Google has changed anything, I will double check it now.

Hi, I work with Steve. I tried opening one of these graphs and I get an error in the Chrome dev tools console
Refused to execute script from ‘https://metabase.< company-name >.com/snippets/text.js’ because its MIME type (‘text/html’) is not executable, and strict MIME type checking is enabled.

The returned content looks a lot like the base HTML for the metabase app, rather than snippets/text.js - would this indicate an error has occurred in the metabase app?

@aston Yeah, that’s a return of an old error in 0.33, but the editor doesn’t use that text snippet, since it uses SQL-code only, so it doesn’t matter if it is loaded or not. So you can safely ignore that.

If Google has changed something, then we should see several other people reporting issues Monday morning (depending on their timezone).
Not sure if Metabase can do anything in that case, but definitely something we want to know about.

I must admit that I’m lost. I have never seen anything like this before and I have no idea what the root cause could be.

Let’s try to ping @maz and see if he can ask one of the developers, when they wake up.
(@maz I’m not even sure who to ask. I was thinking of Paul in the beginning, but when the issue was narrowed to Native, then I’m not sure if Tom or Cam would be better)