Warning: Error in $: $ operator is invalid for atomic vectors

I'm trying to run and deploy a shiny application using github code from a scientific paper as the weblink provided to the tool won't load. I am using the following UI and server code linked here (it was too long to copy and paste): R Code - Google Drive

After scouring the internet, I thought it was because of not specifying the ID in tabsetPanel but that didn't seem to change anything when I specified an ID. Any insight into what may be going wrong?

I have google drive blocked on my corporate firewall; so I can't see your code - though I could probably look at a public github.
Anyway; here is a way to trivially reproduce your error; hopefully this will help you understand it.

(a_number <- 5)

Or in plain english; $ syntax is used to pull named objects out of lists.. but atomic vectors (plain series of numbers; or factors , or strings etc), $ is disallowed.

Thanks! I understand the concept but wasn't able to trace the source. Here is the public facing github with the code I'm using in case that is helpful: GitHub - selcukorkmaz/geneSurv: geneSurv: an interactive web-based tool for survival analysis in genomics research

Welcome to the community @abadgerw123! Looking at the server code, the app sources several .R scripts (which are not provided). When I comment those out and launch the app, I'm not able to recreate the error. Therefore, I think the issue is coming from one of these scripts. Does the error happen to reference any of them?

in addition to scottyd22's advice; I recommend you run shiny::devmode() before launch the app as it improves the error messages. often giving you locations / line numbers

1 Like

Thanks, Both! I was able to address the error by reverting to older versions of the packages. However, upon deploying the application and going to the webpage (geneSurv: Survival Analysis for Genomics), I am now running into the following error when I go to the data upload tab:

2023-01-26T10:50:44.407979+00:00 shinyapps[8126639]: Warning: Error in <-: attempt to set an attribute on NULL
2023-01-26T10:50:44.409976+00:00 shinyapps[8126639]: Stack trace (innermost first):
2023-01-26T10:50:44.409988+00:00 shinyapps[8126639]: 88: I
2023-01-26T10:50:44.409996+00:00 shinyapps[8126639]: 87: JSEvals
2023-01-26T10:50:44.410001+00:00 shinyapps[8126639]: 86: createPayload
2023-01-26T10:50:44.410005+00:00 shinyapps[8126639]: 85: origRenderFunc
2023-01-26T10:50:44.410008+00:00 shinyapps[8126639]: 84: renderFunc
2023-01-26T10:50:44.410011+00:00 shinyapps[8126639]: 83: origRenderFunc
2023-01-26T10:50:44.410028+00:00 shinyapps[8126639]: 82: output$dataUpload
2023-01-26T10:50:44.410039+00:00 shinyapps[8126639]: 15:
2023-01-26T10:50:44.410045+00:00 shinyapps[8126639]: 14: do.call
2023-01-26T10:50:44.410059+00:00 shinyapps[8126639]: 13: fn
2023-01-26T10:50:44.410062+00:00 shinyapps[8126639]: 12: doTryCatch
2023-01-26T10:50:44.410065+00:00 shinyapps[8126639]: 11: tryCatchOne
2023-01-26T10:50:44.410068+00:00 shinyapps[8126639]: 10: tryCatchList
2023-01-26T10:50:44.410083+00:00 shinyapps[8126639]: 9: tryCatch
2023-01-26T10:50:44.410089+00:00 shinyapps[8126639]: 8: retry
2023-01-26T10:50:44.410094+00:00 shinyapps[8126639]: 7: connect$retryingStartServer
2023-01-26T10:50:44.410102+00:00 shinyapps[8126639]: 6: eval
2023-01-26T10:50:44.410105+00:00 shinyapps[8126639]: 5: eval
2023-01-26T10:50:44.410108+00:00 shinyapps[8126639]: 4: eval
2023-01-26T10:50:44.410126+00:00 shinyapps[8126639]: 3: eval
2023-01-26T10:50:44.410132+00:00 shinyapps[8126639]: 2: eval.parent
2023-01-26T10:50:44.410136+00:00 shinyapps[8126639]: 1: local

Any insight as to where I may be going wrong?

I got bored when I realised it uses a tonne of libraries and theres no renv.lock to make getting the right libraries together straightforward. More power to you if you've had the discipline to work all that out.

It is suspicious to me that this app doesnt seem to have typical things I would expect to see in most non trivial shiny apps; no sign of req()s to sanitise inputs ? or alternatives like validate/need... I would question whether its worth the efforts to revive this.

Perhaps you could contact the author.

Thanks! I haven't been able to get ahold of the authors unfortunately. I thought all was good once it deployed successfully after reverting packages back to older versions but I am quite naive when it comes to all this so not sure how else to debug what I now see in the log.

I've ultimately been able to download the right packages versions using an older version of R (3.3.2). However, when I try and deploy the app, I get the following error:

Error: Unhandled Exception: Child Task 1268176331 failed: Error building image: R version 3.3.2 currently unavailable
In addition: Warning messages:
1: invalid uid value replaced by that for user 'nobody'
2: invalid gid value replaced by that for user 'nobody'

Any way I can get around this as I cannot use another version of R?