Unexpected Response when Uploading to RStudio behind NginX Proxy

I had identical symptoms to those described very well in this thread when setting up a production R-Studio server behind an NginX proxy: Unexpected empty response from server... Curious That thread didn't have a solution, so I thought I'd share mine.

Morgan's description of the symptoms are very clear:

If you upload from the desktop, your file is in that folder and will look like this.. upload2bff404d992e.bin upload2bff43b2eadb.bin upload2bffee808fa.bin. In these cases, the last 8 chars appear random, so possibly a hash of a timestamp or something. Anyhoo, despite the .bin extension, everything is plain text.

So now, all that's needed is for R Studio to transfer /tmp/RtmpRqSHM8/upload2bff404d992e.bin to /home/userid/test-location

So, this feels like a file monitor/file mover process is not called or does not run or is not running and that is what prompts the message displayed.

In my case, I had the good fortune of having a simple, working configuration that I'd put together for a test environment before setting up the production server that didn't work at first. By default, my production nginx servers all include the anti-clickjacking add-header directive for: X-Frame-Options: DENY;

R-Studio server uses iframes in the interpreter UI: relaxing that directive to add the header X-Frame-Options:SAMEORIGIN rather than DENY got R-Studio uploads working well.

Hope that may help someone someday.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.