New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intermittent error connecting to R on desktop build #8270
Comments
|
Do we have a way to reliably reproduce this? |
|
I have been trying to reproduce, but haven't been able to yet. |
|
I also haven't been able to reproduce. I think we'll have to audit the ways in which the error page can be triggered, and think about poking at the problem from ways that could manifest. |
|
Some thoughts on how we could approach this... One hypothesis is that we're getting the wrong return value here: rstudio/src/cpp/desktop/DesktopMainWindow.cpp Lines 664 to 685 in ece4e97
We could ignore the value of Another hypothesis is that we're getting multiple I'm not able to see how #8148 could affect this outcome, though... |
|
Yes - the only thing I can't think is that the potential for this bug was there before #8148 but adding the mutex and additional boolean flag check somehow changed the timing so that the bug is getting triggered more often. We could also lock the mutex in the section of the code that decides whether the load was okay, so that it's not possible to both load the cannot connect page and have connected successfully. |
|
I don't know if this could possibly have any impact, but I always open RStudio on a second monitor (my MacBook is always closed and I have it hooked to another monitor). |
|
I was able to reproduce locally, and it looks like I don't know why this is the case, but I think the right resolution here is to use a timer and allow a small window where we wait to see if a "failed" window load is followed by a "successful" window load, and forego displaying the error message when that happens. |
|
Noticed this doesn't manifest in daily 1.4.1038-2! Great work! |
|
Verified by community, and I also have not seen it lately. |
|
I'm still getting this intermittent error |
|
@hadley also reports seeing this in 1.4.1066. |
|
This had resolved for me, but it appeared again today on RDP 1.4.1063-1 |
|
Should (hopefully) be fixed by #8499. Please let us know if you're still seeing this issue in the latest builds! (If the issue still re-occurs, I think we should re-open and target for a future milestone as anything more invasive will be out of scope for 1.4) |
|
@mine-cetinkaya-rundel @blairj09 How is this looking on the latest daily? Improved, I hope? |
|
It's no better for me on 1.4.1073 |
|
Just tried it with 1.4.1078 and it's not better for me either |
|
@mine-cetinkaya-rundel Thank you, this is extremely helpful. Does clicking Reload (during the several seconds in which this screen is displayed) fix the problem? @kevinushey Maybe what's needed here is not waiting for a successful load to arrive (it seems like it never does in the most recent reports) but to do an automatic retry a limited number of times, perhaps separated by a short delay. What do you think? |
|
@jmcphers Yes, if I click reload it fixes the problem! |
|
With 1.4.1087, I'm seeing that intermittently upon launch RStudio gets stuck on the "This site can't be reached 127.0.0.1 refused to connect" screen, but this time with beach ball spinning so I can't click on Reload and it doesn't go away on its own. Force quitting and relaunching the project usually works. |
|
I see new behavior with RStudio Desktop Pro 1.4.1087.5 running on macOS 11.0.1
|
|
Not an ideal situation, but maybe @kevinushey could commandeer @blairj09's laptop for 20 minutes to debug what's going on so we can craft the correct fix. |
|
I've reverted 284c4b0 since it's evidently made the issue even worse. I'm going to spend some time seeing if I can properly reproduce the issue locally since I haven't been successful with speculative fixes thus far. |
|
The behavior is gone for me with 1.4.1090-1! |
|
Phew! Finally, that's fantastic news :) |
|
I'm marking this as Verified based on @blairj09's feedback |
|
Further verified with 1.4.1093-1. It seems the problem is fully resolved |

System details
Steps to reproduce the problem
Unknown, but for affected users it happens intermittently when starting RStudio.
Describe the problem in detail
Retrying usually addresses the problem as per @hadley.
Describe the behavior you expected
RStudio should be able to connect to R. We do see intermittent failures from time to time, but this one warrants further investigation since:
The text was updated successfully, but these errors were encountered: