rstudio / DT

R Interface to the jQuery Plug-in DataTables
https://rstudio.github.io/DT/
Other
596 stars 182 forks source link

RConnect Shiny Dashboard rendering DataTables Warning says: Table ID = DataTables_Table_0 - Ajax error #1088

Open babu-g opened 12 months ago

babu-g commented 12 months ago

RConnect shiny dashboard shows ajax error when accessing the shiny app

We are having an issue with multiple R Shiny Dashboard applications where the following error appears to the users whenever accessing the Shiny page.

ajax error

DataTables Warning says: Table ID = DataTables_Table_0 - Ajax error. For more information about this error, see http://datatables.net/tn/7 DataTables Warning; table id + DataTables_Table_18-Ajax Error.

We tried using Google Chrome's Developer pane to check for the error, but the server responded with some 500 - internal error.

So, we checked out some blog posts about the problem. One of them said to switch the Data.table to DT library, but when we loaded the page, the pop-up still showed up.

The application is running in on RHEL 7.9 with RStudio Connect Version 2022.08

Article reffered - https://community.rstudio.com/t/data-table-issue-while-rendering-the-shiny-page-datatables-warning-table-id-datatables-table-0-requested-unknown-parameter/44016

The below Shiny app code below:

Shiny Code.txt

Another question, are there any other alternative package that can be used instead of Data.table/DT?

We would be grateful for any clarification on how to rectify this issue. Thank you in advance.


By filing an issue to this repo, I promise that

I understand that my issue may be closed if I don't fulfill my promises.

stla commented 12 months ago

No idea, your code is not understandable without more contextx Regarding the aternatives, there is reactable and gt.

JessiBoggia commented 12 months ago

Hi All,

I am with Posit support and have been working with @babu-g to try and fix this issue. A number of staff have looked at this and we are not sure where the issue was coming from but we noted it was similar to an old issue here: https://github.com/rstudio/DT/issues/266

We are wondering if there are circumstances that could re-trigger this issue in more recent versions. Please feel free to reach out to me via the Posit slack if you have any questions about this case from us.

Thank you!

--Jessi - Support Engineer - Posit PBC

yihui commented 11 months ago

@babu-g The "Ajax error" could have many reasons, and it's hard to know without a reproducible example. The Shiny Code.txt you provided is not a reproducible example---we don't have ed_df_11.csv. You have output$summ_table <- DT::renderDataTable(...) in your server function, but summ_table is not present in the ui function, so the table won't be rendered at all.

Please also try to minimize the example. For example, remove packages that are not actually used in the example. Ideally, the example should use DT only, so we can be sure the problem is not caused by other packages, e.g., ggplot2 and plotly should be irrelevant. Keep deleting code until the problems goes away, and then you will be much closer to the root of the problem. For now, it's too hard to tell.

We tried using Google Chrome's Developer pane to check for the error, but the server responded with some 500 - internal error.

500 typically indicates an R error occurred. For security reasons, the error won't be shown in the JS console. You have to check the server log in Connect to see what happened.

JessiBoggia commented 11 months ago

Hi @yihui ,

Thanks so much for looking into this and clarifying. I am hoping that @babu-g will clean up the sample and retest soon. In the meantime regarding:

500 typically indicates an R error occurred. For security reasons, the error won't be shown in the JS console. You have to check the server log in Connect to see what happened.

I did a sweep of the logs and the Connect dev team checked behind me and they didn't see anything pertinent to the issue either. Do you know what kind of output we should be looking for? I am happy to check again and see if that sheds any light on this issue.

Appreciatively,

Jessi

yihui commented 11 months ago

Okay, if there isn't anything pertinent to the issue in the Connect logs, I'll definitely need a minimal reproducible example before I can investigate the problem.

bkowshik commented 1 month ago

Getting this error when I visit this page now: https://rstudio.github.io/DT/server.html

image
yihui commented 1 month ago

@bkowshik #1145