AndreaCirilloAC / updateR

update your R version in a breeze ( on OSX) √
Other
143 stars 24 forks source link

Password:Error ... Argument is of length zero #37

Open NicolausSteno opened 3 years ago

NicolausSteno commented 3 years ago

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")

Sebastardito commented 3 years ago

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

Sebastardito commented 3 years ago

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??

NicolausSteno commented 3 years ago

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

jmoshiri commented 3 years ago

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

miles-1 commented 3 years ago

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

ghost commented 3 years ago

Also having the same problem with Big Sur

BenoitFayolle commented 3 years ago

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..

mk9y commented 3 years ago

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.

aperigord commented 3 years ago

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

Ethan-Ting commented 1 year ago

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

daniela-palleschi commented 1 year ago

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

HarveyXWu commented 1 year ago

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

shujuecn commented 1 year ago

So am I… So is BigSur 11.3.1…

sutzig commented 1 year ago

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

marcinschmidt commented 9 months ago

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

qiuxintao101 commented 9 months ago

Same error. macOS Monterey 12.6 doesn't work.

m-yday commented 8 months ago

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

QizhiSu commented 7 months ago

Same error here.

Sebastardito commented 7 months ago

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.

byelenin commented 7 months ago

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)

ncedi12 commented 5 months ago

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

trantor27 commented 1 month ago

I solved by deleting line 59 (check_compactability(status = latest)). Obviously, this eliminates a verification step that can be useful; to do this you need to be sure of the version of MacOS you are using.