2

I want to set up rstudio-server on an iMac with support for multiple users and remote login. I followed the steps in the INSTALL tutorial: I built the source, set up the configuration files and the launchd daemon. At first, it works fine, but after some time, I get these warnings/errors when I plot:

2022-06-09 08:02:29.438 rsession[3050:139329] XType: failed to connect - Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process.}
2022-06-09 08:02:29.438 rsession[3050:139329] Font server protocol version mismatch (expected:5 got:0), falling back to local fonts
2022-06-09 08:02:29.438 rsession[3050:139329] XType: unable to make a connection to the font daemon!
2022-06-09 08:02:29.438 rsession[3050:139329] XType: XTFontStaticRegistry is enabled as fontd is not available.

Then I can't plot any more unless I restart R and re-run my code. Do you know what could be the issue? I could not get any help when opening an issue on the rstudio-server github since MacOS is not officially supported.

I was also looking at running rstudio-server via docker, but I couldn't find a good way to map the user namespace from macOS to the container.

Any help or suggestion would be greatly appreciated!

EDIT: It seems I was able to solve the issue by launching the fontd daemon with:

sudo launchctl load -w /System/Library/LaunchAgents/com.apple.fontd.useragent.plist
Nakor
  • 1,484
  • 2
  • 13
  • 23
  • 2
    Perhaps setting shared volumes as specified at https://rocker-project.org/use/shared_volumes.html would help. Personally, I'd go with docker if macos isn't supported. – gaut Aug 01 '22 at 18:19

1 Answers1

2

This seems like an issue with the MacOS font daemon, not with RStudio itself.

Someone reported a similar issue on PhantomJS. Rebooting resolved it for them.

This answer reported the same error for a different build, and they were able to resolve it by installing the correct "Apple Worldwide Developer Relations Certification Authority" in Keychain:

The one I had had an expiration date of February 2023. I deleted that one and went here, downloaded the one called "Worldwide Developer Relations - G3 (Expiring 02/20/2030 00:00:00 UTC)", then retried the build and it worked.

Salvatore
  • 10,815
  • 4
  • 31
  • 69
  • Thank you, it does look similar. I tried to add the certificate and rebuild from scratch but unfortunately, it didn't solve the problem for me. – Nakor Aug 04 '22 at 20:57