updateR icon indicating copy to clipboard operation
updateR copied to clipboard

Password:Error ... Argument is of length zero

Open NicolausSteno opened this issue 4 years ago • 22 comments

When I run the updateR() function, I type my password and I get this error message both in the console and RStudio:

Updated ~/.Rprofile Password:Error in if (!compactible) stop(sprintf(e, status$latest, macOS), call. = FALSE) : argument is of length zero

And it doesn't carry on with the update. I also tried this as suggested on other material:

updateR(admin_password = "os_admin_user_password")

But I get another error:

Error in updateR(admin_password = "os_admin_user_password") : unused argument (admin_password = "os_admin_user_password")

NicolausSteno avatar Jan 01 '21 17:01 NicolausSteno

I have the exact same problem! Any idea of how to solve it?

Sebastardito avatar Jan 05 '21 05:01 Sebastardito

Do you think it could be an issue given by the macOS version (the latest Big Sur, in my case)?? Are you using Big Sur??

Sebastardito avatar Jan 06 '21 06:01 Sebastardito

Yes I am using Big Sur and as a result of the update there were quite a few changes with paths and things like that to be fair, but no idea whether this is the reason

NicolausSteno avatar Jan 06 '21 09:01 NicolausSteno

I have the same issue and am also running Big Sur! Would love to know if anyone has found a fix

jmoshiri avatar Jan 09 '21 18:01 jmoshiri

I have the same issue and am also running Big Sur! Would love to know if anyone has found a fix

Same problem, also Big Sur

Edit: You can just like this comment if you have this problem w/ big sur

miles-1 avatar Jan 19 '21 03:01 miles-1

Also having the same problem with Big Sur

ghost avatar Jan 20 '21 01:01 ghost

I believe it comes from the fact that sessionInfo$running = macOS 10.16 is not parsed correctly by the check_compactability() function. This function expects a ver.major.minor syntax which should be the case for Big Sur (11.X.X) but for some reason Apple has the osVersion variable named 10.16 currently. It might change later. I edited the check_compactability() function likewise to fix the issue: Original :

macOS <- sessionInfo()$running %>%
                regmatches(., regexpr("(\\d+)\\.(\\d+)\\.(\\d+)$", .)) %>%
                sub("^(.+\\.(.+)?)\\..+", "\\1", x = .) %>%
                as.numeric()

Fix:

running_os <- sessionInfo()$running
macOS <- regmatches(running_os, regexpr("(\\d+)\\.(\\d+)\\.?(\\d+)?$", running_os)) %>%
                sub("^(.+\\.(.+)?)\\..+", "\\1", x = .) %>%
                as.numeric()

basically made the minor upgrade number optional. The code broke further down the updateR() function so have no idea if it really fixes the issue or if it's safe to use this fix in all cases..

BenoitFayolle avatar Mar 04 '21 16:03 BenoitFayolle

running_os <- sessionInfo()$running macOS <- regmatches(running_os, regexpr("(\d+)\.(\d+)\.?(\d+)?$", running_os)) %>% sub("^(.+\.(.+)?)\..+", "\1", x = .) %>% as.numeric() updateR() Enter password for mk: **** Updated ~/.Rprofile Password:Error in if (!compactible) stop(sprintf(e, status$latest, macOS), call. = FALSE) : argument is of length zero

Just tried, and failed as above shows.

mk9y avatar Mar 06 '21 16:03 mk9y

I have the same mistake and the fix does not change anything

aperigord avatar Mar 16 '21 14:03 aperigord

Has this error been solved yet? I came across the same situation in macOS 13.3.1 (22E261).

Ethan-Ting avatar Apr 25 '23 06:04 Ethan-Ting

I'm also getting this error with macOS Ventura 13.2.1, still no solutions?

daniela-palleschi avatar May 17 '23 14:05 daniela-palleschi

I'm also getting this error with macOS Ventura 13.2.1, still no solutions?

Same issue with macOS Ventura 13.3.1 for both m1 and Intel mac, still waiting for a solution

HarveyXWu avatar May 20 '23 06:05 HarveyXWu

So am I… So is BigSur 11.3.1…

shujuecn avatar May 24 '23 05:05 shujuecn

Error persists with macOS Ventura 13.4. Suggested work around did not work.

sutzig avatar Aug 14 '23 12:08 sutzig

Same error (Platform: x86_64-apple-darwin20 (64-bit), Running under: macOS Monterey 12.7.2). The fix doesn't work.

marcinschmidt avatar Jan 11 '24 09:01 marcinschmidt

Same error. macOS Monterey 12.6 doesn't work.

qiuxintao101 avatar Jan 25 '24 18:01 qiuxintao101

Error persists on macOS Sonoma 14.3 It seems this issue has had no progress for a really long while

m-yday avatar Feb 27 '24 09:02 m-yday

Same error here.

QizhiSu avatar Mar 22 '24 15:03 QizhiSu

Best solution currentlly is uninstalling R, and then reinstall it using Homebrew. --> brew install r With homebrew you can easily keep R up-to-date using "brew update && brew upgrade". Headache-free for sure.

Sebastardito avatar Mar 25 '24 00:03 Sebastardito

I got the same error message...

R version 4.3.2 (2023-10-31) -- "Eye Holes" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin20 (64-bit)

byelenin avatar Mar 29 '24 03:03 byelenin

So basically, @AndreaCirilloAC wrote a package and doesn't bother to maintain it or help people fix the same bloody error! Cos it's now 2024 and still the error is unresolved

ncedi12 avatar May 29 '24 18:05 ncedi12