Can't solve package or namespace load failed for R ‘later’

Issue

I am using Rstudio to load the package "later" running into the following error:

library(later)
Fehler: package or namespace load failed for ‘later’:
 .onLoad in loadNamespace() für 'later' fehlgeschlagen, Details:
  Aufruf: createCallbackRegistry(id, parent_id)
  Fehler: Can't create event loop 0 because it already exists.

Loading the package using the RGUI works fine. Any suggestions what is causing the problem?

Furthermore, loading the package seems to work when I wait a couple of minutes after opening Rstudio.

I do not understand what kind of event loop might already exist.

It might be noteworthy that this problem seem to occur, when I work remote.

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252    LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                    LC_TIME=German_Germany.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] later_1.3.0

Solution

You get the message you saw if you try to run the later:::.onLoad function twice. That shouldn’t happen normally, but it might happen if you load it, unload it, and load it again.

Given your comment that it works if you wait a couple of minutes, I’d guess that RStudio is loading it then unloading it, but there’s some delay in the full unloading. I don’t know if there’s any way to affect this.

Answered By – user2554330

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published