rstudio / shiny

Easy interactive web applications with R
https://shiny.posit.co/
Other
5.36k stars 1.87k forks source link

Error related to invalidateLater Error in has_one(keys) : key must be not be "" or NA #2710

Open davidlub opened 4 years ago

davidlub commented 4 years ago

Hi All,

I am pretty sure this is a bug (not me). I have a shiny app running on many servers, and after a recent update I get the error above with the traceback below. I think this is related to "invalidateLater" because of the reference to timerCallbacks in the trace. I removed all three uses of invalidateLater in the code and now it runs.

Shiny version: 1.4.0 Versions: platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 6.1
year 2019
month 07
day 05
svn rev 76782
language R
version.string R version 3.6.1 (2019-07-05) nickname Action of the Toes

Error in has_one(keys) : key must be not be "" or NA

traceback() 15: stop(e) 14: h(simpleError(msg, call)) 13: .handleSimpleError(function (e) { if (is.null(attr(e, "stack.trace", exact = TRUE))) { calls <- sys.calls() parents <- sys.parents() attr(calls, "parents") <- parents attr(e, "stack.trace") <- calls } if (deepStacksEnabled()) { if (is.null(attr(e, "deep.stack.trace", exact = TRUE)) && !is.null(.globals$deepStack)) { attr(e, "deep.stack.trace") <- .globals$deepStack } } stop(e) }, "key must be not be \"\" or NA", base::quote(has_one(keys))) 12: has_one(keys) 11: map$has(key) 10: .funcs$remove(as.character(id)) 9: timerCallbacks$executeElapsed() 8: serviceApp() 7: ..stacktracefloor..(serviceApp()) 6: withCallingHandlers(expr, error = doCaptureStack) 5: domain$wrapSync(expr) 4: promises::with_promise_domain(createStackTracePromiseDomain(), expr) 3: captureStackTraces({ while (!.globals$stopped) { ..stacktracefloor..(serviceApp()) } }) 2: ..stacktraceoff..(captureStackTraces({ while (!.globals$stopped) { ..stacktracefloor..(serviceApp()) } })) 1: runApp(port = 5657, launch.browser = TRUE) ?invalidateLater traceback() 15: stop(e) 14: h(simpleError(msg, call)) 13: .handleSimpleError(function (e) { if (is.null(attr(e, "stack.trace", exact = TRUE))) { calls <- sys.calls() parents <- sys.parents() attr(calls, "parents") <- parents attr(e, "stack.trace") <- calls } if (deepStacksEnabled()) { if (is.null(attr(e, "deep.stack.trace", exact = TRUE)) && !is.null(.globals$deepStack)) { attr(e, "deep.stack.trace") <- .globals$deepStack } } stop(e) }, "key must be not be \"\" or NA", base::quote(has_one(keys))) 12: has_one(keys) 11: map$has(key) 10: .funcs$remove(as.character(id)) 9: timerCallbacks$executeElapsed() 8: serviceApp() 7: ..stacktracefloor..(serviceApp()) 6: withCallingHandlers(expr, error = doCaptureStack) 5: domain$wrapSync(expr) 4: promises::with_promise_domain(createStackTracePromiseDomain(), expr) 3: captureStackTraces({ while (!.globals$stopped) { ..stacktracefloor..(serviceApp()) } }) 2: ..stacktraceoff..(captureStackTraces({ while (!.globals$stopped) { ..stacktracefloor..(serviceApp()) } })) 1: runApp(port = 5657, launch.browser = TRUE

wch commented 4 years ago

Can you provide the output of sessioninfo::session_info()? (you may need to install the sessioninfo package first.)

Also, can you provide a minimal reproducible example? We'll need that in order to investigate the problem. See here for more information: https://community.rstudio.com/t/shiny-debugging-and-reprex-guide/10001