Rstudio 2024 with invalid CSRF

My Cluster is Rocky 8.10. I install OOD latest version but when i tried to use Rstudio bc_example_rstudio with my rocky 8.10 image it show [rserver] ERROR Failed to validate sign-in with invalid CSRF form. I did have searched in many threads to add like csrf_token in submit.yml.erb but still doesn’t work.

Hi and welcome!

Can you share your view.html.erb and the portion of the script that sets the CSRF token.

This is view.html.erb

<script type="text/javascript">
	(function () {
		  let date = new Date();
		  date.setTime(date.getTime() + (7*24*60*60*1000));
		  let expires = "expires=" + date.toUTCString();
		  let cookiePath = "path=/rnode/" + "<%= host.to_s %>" + "/" + "<%= port.to_s %>/";
		  /**
			    rstuido wants a cookie called csrf-token - but that's going to change in 2020!
			  */
			  let cookie = `csrf-token=<%= csrf_token %>;${expires};${cookiePath};SameSite=strict;secure`;
		  document.cookie = cookie;
	})();
</script>
<form action="/rnode/<%= host %>/<%= port %>/auth-do-sign-in" method="post" target="_blank">
  <input type="hidden" name="username" value="<%= ENV["USER"] %>">
  <input type="hidden" name="password" value="<%= password %>">
  <input type="hidden" name="staySignedIn" value="1">
  <input type="hidden" name="appUri" value="">
  <button class="btn btn-primary" type="submit">
    <i class="fa fa-registered"></i> Connect to RStudio Server
  </button>
</form>

I can open interactive app but it show like this

the logs on .local/share//rstudio/logs/rserver.log is

2024-11-23T01:23:50.997162Z [rserver] ERROR Failed to validate sign-in with invalid CSRF form; LOGGED FROM: bool rstudio::server::auth::common::validateSignIn(const rstudio::core::http::Request&, rstudio::core::http::Response*) src/cpp/server/auth/ServerAuthCommon.cpp:136

rsession.log

2024-11-23T01:21:50.208656Z [rsession-wpeeranon] ERROR system error 2 (No such file or directory) [path: /sys/fs/cgroup/memory/memory.limit_in_bytes]; OCCURRED AT rstudio::core::Error rstudio::core::FilePath::openForRead(std::shared_ptr<std::basic_istream<char> >&) const src/cpp/shared_core/FilePath.cpp:1504; LOGGED FROM: rstudio_boost::shared_ptr<rstudio::core::system::{anonymous}::LinuxMemoryProvider> rstudio::core::system::{anonymous}::getMemoryProvider() src/cpp/core/system/LinuxResources.cpp:425