April 22 2026: v5.5.0 is now available on CRAN and contains the fix for this issue.
Please restart your R session after installation to avoid conflicts with loaded packages.
Update March 18 2026:
Deparse errors (Error in deparse(substitute(e2, env = caller_env(2))) : 'S4SXP' or Error in deparse(substitute(e2, env = caller_env(2))) : cannot get a slot ("slots") from an object of type "NULL") when running plotting functions such as VlnPlot (#10101) or RidgePlot with ggplot2 v4+ should now be fixed with #10333.
To install the fix:
devtools::install_github("satijalab/seurat", ref = "main", force = TRUE)
# Restart R session
# packageVersion("Seurat") should show "5.4.0.9013"
This fix will also be included in a forthcoming CRAN release. Feel free to update here with further issues or questions!
Hi everyone,
A number of users have reported Error in deparse(substitute(e2, env = caller_env(2))) : 'S4SXP' errors when running plotting functions such as VlnPlot (#10101).
While we work to address this (and, more broadly, to support the latest ggplot2 release),
for now we recommend downgrading ggplot2:
# Install release prior to ggplot2 v4.0.0
devtools::install_version("ggplot2", "3.5.2", force = TRUE)
# Restart R session
Please report if you receive similar errors and include the output of running sessionInfo().
This issue will be pinned and open for further updates.
Thanks!
April 22 2026: v5.5.0 is now available on CRAN and contains the fix for this issue.
Please restart your R session after installation to avoid conflicts with loaded packages.