Repository navigation
Description
System details
RStudio Edition : Server (Linux); also Desktop on Windows under CI for the r2d3 case
RStudio Version : N/A
OS Version : Ubuntu 24.04 (Server); Windows Server 2025 (r2d3 under CI)
R Version : N/A
Steps to reproduce the problem
Using RStudio Server on Linux. These steps cover the SQL preview path; the
r2d3 preview path (below) fails the same way.
- Create a file
injection.sqlwith this content:
-- !preview conn=writeLines("proof", "~/proof.txt")
SELECT 1
- Open
injection.sqlin the source editor. - Run the SQL preview (the Preview button, or the "Preview SQL" command).
- The connection expression is untrusted, so the backend declines to
evaluate it and shows a consent dialog.
- The connection expression is untrusted, so the backend declines to
- Click Yes to consent.
- The IDE throws an uncaught client exception:
TypeError: Cannot read properties of null (reading 'WXc')in obfuscated GWT code. - The error dialog that should report the failed connection never
renders.
- The IDE throws an uncaught client exception:
For the r2d3 path, repeat with a file injection.js containing
// !preview r2d3 data={ writeLines("proof", "~/proof.txt"); c(0.3, 0.6, 0.8) }
followed by a d3 body, run the "Preview" (r2d3) command, and click Yes at the
consent dialog. On Windows under CI and on Linux Server, the IDE throws the
same null dereference (reading 'VXc' on Windows, reading 'WXc' on Linux
Server) during the widget render.
Describe the problem in detail
After the user consents to run an untrusted preview expression, the IDE
throws an uncaught GWT null dereference in compiled JS, which prevents the
follow-up UI from appearing (the error-confirmation dialog for SQL, the
rendered widget for r2d3). This occurs consistently on RStudio Server (Linux)
for both the SQL and r2d3 paths, and on Windows under CI for the r2d3 path. It
doesn't occur on macOS desktop, or on Windows desktop for the SQL path.
The obfuscated symbols differ by build (WXc on Linux Server, VXc on
Windows CI) but appear to point to the same null dereference. Decoding the
stack to a source location needs a build with PRETTY GWT symbols
(-DGWT_STYLE=PRETTY).
Describe the behavior you expected
Consenting to the preview would evaluate the expression and show the
resulting UI (the error confirmation, or the rendered widget) without
throwing an uncaught client exception.
See PR #17939, which marks the affected tests test.fixme on the platforms
above, and tracking issue #18064. The security behavior the tests cover is rstudio-pro#10981.
Note: This came out of a review of the PR, I haven't tried it yet myself.
Activity
Track Server-mode test skips in #18064 and #18065 and fixme the SQL skip
build: compile e2e builds with PRETTY GWT symbols for decodable clien…
Add Linux Server E2E automation (PR, scheduled, cache seed) + Server-…
fix r2d3 theme handshake null dereference (#18065) (#18092)