You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, we are trying to implement future_promise in our shiny app and we're facing an odd problem. Please refer to the attached file (in txt format since github doesn't like .r files).
This test app tries to plot some graph after having triggered a future_promise. There 3 relevant blocks in the code (the fourth is just a control scenario).
On my local machine (MacOs) running this app opens spontaneously an extra RStudio/Quartz session, due to the block in lines 64-68 that runs the future_fun() function (second code block). On our remote server instead, this triggers a full error: "Unhandled promise error: cannot open file 'Rplots.pdf'".
The third block also triggers the same behaviour (you need to comment out the second block to observe it). The difference is that the future_fun() is run in an eventReactive() and its output is then called in a renderPlot() call.
This happens only the first time the app is run, and you need to restart the R session to reproduce it. BTW, force closing the extra RStudio session crashes also the main session, so it's like a restart...
The code in block 1 instead runs fine (you need to comment out block 2 and 3 first), because future_fun() updates a reactiveVal() whose change then triggers the plotting.
But the most interesting piece is that one uncomments Cairo(file='/dev/null') on line 26 the strange behaviour and errors go away. If you uncomment the Cairo call, run the app (without errors) and then comment it again the errors do not appear anyway. So everything happens in some initialization phase.
We couldn't find any reference to this behaviour and it took us a while to reconstruct it. It is especially annoying serverside since it triggers a full error not just an empty plot.
Hello, we are trying to implement future_promise in our shiny app and we're facing an odd problem. Please refer to the attached file (in txt format since github doesn't like .r files).
test.txt
This test app tries to plot some graph after having triggered a future_promise. There 3 relevant blocks in the code (the fourth is just a control scenario).
On my local machine (MacOs) running this app opens spontaneously an extra RStudio/Quartz session, due to the block in lines 64-68 that runs the
future_fun()
function (second code block). On our remote server instead, this triggers a full error: "Unhandled promise error: cannot open file 'Rplots.pdf'".The third block also triggers the same behaviour (you need to comment out the second block to observe it). The difference is that the
future_fun()
is run in aneventReactive()
and its output is then called in arenderPlot()
call.This happens only the first time the app is run, and you need to restart the R session to reproduce it. BTW, force closing the extra RStudio session crashes also the main session, so it's like a restart...
The code in block 1 instead runs fine (you need to comment out block 2 and 3 first), because
future_fun()
updates areactiveVal()
whose change then triggers the plotting.But the most interesting piece is that one uncomments
Cairo(file='/dev/null')
on line 26 the strange behaviour and errors go away. If you uncomment the Cairo call, run the app (without errors) and then comment it again the errors do not appear anyway. So everything happens in some initialization phase.We couldn't find any reference to this behaviour and it took us a while to reconstruct it. It is especially annoying serverside since it triggers a full error not just an empty plot.
Local session:
Server side:
The text was updated successfully, but these errors were encountered: