Sudden error "Table has no columns" on all sites using this library, version problem?

45 views
Skip to first unread message

Claudio

unread,
May 20, 2020, 9:39:43 AM5/20/20
to Google Visualization API
Hi,
I'm managing some old sites, done by others, that use the Google Chart library to draw Tables and Charts.
Charts still work, but the Tables are not working anymore.
I think something changed this month because some days ago I'm sure the sites were working.
These are sites that have been running for 5-6 years.
Because the problem is on all sites and on many of them the data have not changed this month I think that the problem is with the version of the library.


I can see that the code to load the library is:

google.load('visualization', '1.0', {'packages':['controls', "corechart"]});
google.setOnLoadCallback(drawDashboard);

And I have this error:

--> Table has no columns

The loaded version of the library is 48.1.


Reading the Google documentation I've seen that I can load another version of the library with this code:

google.load('visualization', '47', {'packages':['controls', 'corechart']});
google.setOnLoadCallback(drawDashboard);

but with this version I have the  same error: "Table has no columns".

With the version 46  I can see the rows of the tables but the filter of the table generates the error:
jsapi_compiled_format_module.js:45 Uncaught TypeError: Array.prototype.map called on null or undefined

With the version 45.2 I can see the rows of the tables but I have the error:
"Maximum call stack size exceeded".


So the problems are:

- Why the previous versions of the library doesn't work?

- The right way to load the library is with the command:

google.load('visualization', '47', {'packages':['controls', 'corechart']});
or the command:
google.charts.load('47', {packages: ['controls', 'corechart']}); ?


Thank you for your help

Claudio Battaglino

Daniel LaLiberte

unread,
May 20, 2020, 11:25:15 AM5/20/20
to Google Visualization API
It is difficult to guess why you are seeing any of these errors without details of your data and how it is being processed by your code.  The Table chart itself is very simple, but there have been a few changes in recent versions, especially regarding the safety of html that might be derived from your data.

You should also switch all of the mechanisms for loading to use the new loader.  See instructions at:   https://developers.google.com/chart/interactive/docs/basic_load_libs#update-library-loader-code

But updating your loader will probably not fix these problems.  If can point me at your web site, I can have a look.   Email me directly if you wish.

Domingo Pichardo

unread,
May 20, 2020, 1:04:11 PM5/20/20
to Google Visualization API
Our google visualization tools also stopped loading this morning failing to load the loader.js file.
I see the same behavior on developer.google.com/chart page.

Does anyone know if this is something temporary or if we should start looking at updating our implementations.

Thanks.

On Wednesday, May 20, 2020 at 9:39:43 AM UTC-4, Claudio wrote:

Daniel LaLiberte

unread,
May 20, 2020, 1:19:38 PM5/20/20
to Google Visualization API
Ah ha! Thanks Domingo.  It appears that the Google Charts documentation pages also have some use of the autoload parameter with incorrectly formatted JSON.  The solution is that all uses of the autoload parameter must be changed to use only strict JSON, and if not, you will see a JSON parsing error.  

It is possible you could see JSON parsing errors for other reasons as well, but the autoload parameter is a big one.  

This is new, and we can't easily parse the autoload parameter as non-strict JSON, so it would be better to make the change now.  Alternatively, you can stop using the autoload parameter entirely, and instead replace it with an equivalent call of google.charts.load(), maybe including the 'callback' setting if you need that.   

I hope this won't be a huge problem for people to fix.  Let us know if there is a significant reason to delay this change.


--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/1b05aa39-1bc1-44f0-9223-2189382843a6%40googlegroups.com.


--

Domingo Pichardo

unread,
May 20, 2020, 2:01:13 PM5/20/20
to Google Visualization API
Thank you Daniel.  I appreciate the guidance.
Using the new version works, so it's a rather simple update.

Thanks!


On Wednesday, May 20, 2020 at 1:19:38 PM UTC-4, Daniel LaLiberte wrote:
Ah ha! Thanks Domingo.  It appears that the Google Charts documentation pages also have some use of the autoload parameter with incorrectly formatted JSON.  The solution is that all uses of the autoload parameter must be changed to use only strict JSON, and if not, you will see a JSON parsing error.  

It is possible you could see JSON parsing errors for other reasons as well, but the autoload parameter is a big one.  

This is new, and we can't easily parse the autoload parameter as non-strict JSON, so it would be better to make the change now.  Alternatively, you can stop using the autoload parameter entirely, and instead replace it with an equivalent call of google.charts.load(), maybe including the 'callback' setting if you need that.   

I hope this won't be a huge problem for people to fix.  Let us know if there is a significant reason to delay this change.


To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
Message has been deleted

Dianna Whitt

unread,
May 20, 2020, 5:24:23 PM5/20/20
to Google Visualization API
Daniel,
How would this new loader work with chartWrapper? 

Thanks,
Dianna

Daniel LaLiberte

unread,
May 20, 2020, 6:02:05 PM5/20/20
to Google Visualization API
The ChartWrapper should load packages the same as the old loader, at least after version 45.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/a45a78a8-d51a-482c-b8af-725402b19982%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages