Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no package 'macos' was found #3775

Closed
abduazizR opened this issue Jul 1, 2024 · 22 comments
Closed

no package 'macos' was found #3775

abduazizR opened this issue Jul 1, 2024 · 22 comments
Assignees
Labels
bug Something isn't working lang: r support

Comments

@abduazizR
Copy link

I keep getting this warning message in R console and I am not sure if there is an R package called macos that I need to install

Warning messages:
1: In utils::packageDescription(package, fields = "Version") :
  no package 'macos' was found
2: In utils::packageDescription(package, fields = "Version") :
  no package 'macos' was found

Session Info


─ Session info ─────────────────────────────────────────────────────
 setting  value
 version  R version 4.4.1 (2024-06-14)
 os       macOS Sonoma 14.5
 system   aarch64, darwin20
 ui       X11
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       America/Chicago
 date     2024-07-01
 pandoc   NA

─ Packages ─────────────────────────────────────────────────────────
 ! package            * version date (UTC) lib source
   abind                1.4-5   2016-07-21 [1] RSPM (R 4.4.0)
 P arrow              * 16.1.0  2024-05-25 [?] RSPM
 P assertthat           0.2.1   2019-03-21 [?] RSPM
 P backports            1.5.0   2024-05-23 [?] RSPM
 P base64enc            0.1-3   2015-07-28 [?] RSPM
   binman               0.1.3   2022-09-01 [1] RSPM (R 4.4.0)
 P BiocManager          1.30.23 2024-05-04 [?] RSPM
 P bit                  4.0.5   2022-11-15 [?] RSPM
 P bit64                4.0.5   2020-08-30 [?] RSPM
 P bitops               1.0-7   2021-04-24 [?] RSPM
 P broom                1.0.6   2024-05-17 [?] RSPM
 P broom.helpers        1.15.0  2024-04-05 [?] RSPM
   car                  3.1-2   2023-03-30 [1] RSPM (R 4.4.0)
   carData              3.0-5   2022-01-06 [1] RSPM (R 4.4.0)
   caTools              1.18.2  2021-03-28 [1] RSPM (R 4.4.0)
 P cellranger           1.1.0   2016-07-27 [?] RSPM
   cli                  3.6.2   2023-12-11 [1] RSPM (R 4.4.0)
 P clipr                0.8.0   2022-02-22 [?] RSPM
   colorspace           2.1-0   2023-01-23 [1] RSPM (R 4.4.0)
   countrycode          1.6.0   2024-03-22 [1] RSPM (R 4.4.0)
   ctrdata            * 1.19.0  2024-06-30 [1] RSPM (R 4.4.0)
   curl                 5.2.1   2024-03-01 [1] RSPM (R 4.4.0)
 P data.table           1.15.4  2024-03-30 [?] RSPM
 P DBI                * 1.2.3   2024-06-02 [?] RSPM
 P digest               0.6.35  2024-03-11 [?] RSPM
   dplyr              * 1.1.4   2023-11-17 [1] RSPM (R 4.4.0)
 P duckdb             * 1.0.0   2024-06-13 [?] RSPM
 P evaluate             0.24.0  2024-06-10 [?] RSPM
   fansi                1.0.6   2023-12-08 [1] RSPM (R 4.4.0)
   fastDummies        * 1.7.3   2023-07-06 [1] RSPM (R 4.4.0)
 P fastmap              1.2.0   2024-05-15 [?] RSPM
 P forcats            * 1.0.0   2023-01-29 [?] RSPM
   generics             0.1.3   2022-07-05 [1] RSPM (R 4.4.0)
   ggplot2            * 3.5.1   2024-04-23 [1] RSPM (R 4.4.0)
   glue               * 1.7.0   2024-01-09 [1] RSPM (R 4.4.0)
 P gt                   0.10.1  2024-01-17 [?] RSPM
   gtable               0.3.5   2024-04-22 [1] RSPM (R 4.4.0)
 P gtsummary          * 1.7.2   2023-07-15 [?] RSPM
 P here               * 1.0.1   2020-12-13 [?] RSPM
 P highr                0.11    2024-05-26 [?] RSPM
 P hms                  1.1.3   2023-03-21 [?] RSPM
 P htmltools            0.5.8.1 2024-04-04 [?] RSPM
 P httr                 1.4.7   2023-08-15 [?] RSPM
 P httr2              * 1.0.1   2024-04-01 [?] RSPM
 P janitor            * 2.2.0   2023-02-02 [?] RSPM
   jqr                  1.3.3   2023-12-04 [1] RSPM (R 4.4.0)
 P jsonlite             1.8.8   2023-12-04 [?] RSPM
 P knitr                1.47    2024-05-29 [?] RSPM
 P lattice              0.22-6  2024-03-20 [?] CRAN (R 4.4.1)
 P lazyeval             0.2.2   2019-03-15 [?] RSPM
   lifecycle            1.0.4   2023-11-07 [1] RSPM (R 4.4.0)
   lubridate          * 1.9.3   2023-09-27 [1] RSPM (R 4.4.0)
   magrittr             2.0.3   2022-03-30 [1] RSPM (R 4.4.0)
   munsell              0.5.1   2024-04-01 [1] RSPM (R 4.4.0)
   netstat            * 0.1.2   2022-08-28 [1] RSPM (R 4.4.0)
 P nlme                 3.1-164 2023-11-27 [?] CRAN (R 4.4.1)
   nodbi              * 0.10.5  2024-06-30 [1] RSPM (R 4.4.0)
 P pacman               0.5.1   2019-03-11 [?] RSPM
   pillar               1.9.0   2023-03-22 [1] RSPM (R 4.4.0)
   pkgconfig            2.0.3   2019-09-22 [1] RSPM (R 4.4.0)
 P processx             3.8.4   2024-03-16 [?] RSPM
 P ps                   1.7.6   2024-01-18 [?] RSPM
   purrr              * 1.0.2   2023-08-10 [1] RSPM (R 4.4.0)
   R.methodsS3          1.8.2   2022-06-13 [1] RSPM (R 4.4.0)
   R.oo                 1.26.0  2024-01-24 [1] RSPM (R 4.4.0)
   R.utils              2.12.3  2023-11-18 [1] RSPM (R 4.4.0)
   R6                   2.5.1   2021-08-19 [1] RSPM (R 4.4.0)
 P rappdirs             0.3.3   2021-01-31 [?] RSPM
   Rcpp                 1.0.12  2024-01-09 [1] RSPM (R 4.4.0)
 P readr              * 2.1.5   2024-01-10 [?] RSPM
 P readxl               1.4.3   2023-07-06 [?] RSPM
   renv                 1.0.7   2024-04-11 [1] RSPM (R 4.4.0)
   repr                 1.1.7   2024-03-22 [1] RSPM (R 4.4.0)
   rlang                1.1.4   2024-06-04 [1] RSPM (R 4.4.0)
 P RPostgreSQL        * 0.7-6   2024-01-11 [?] RSPM
 P rprojroot            2.0.4   2023-11-05 [?] RSPM
   RSelenium          * 1.7.9   2022-09-02 [1] RSPM (R 4.4.0)
   rstatix            * 0.7.2   2023-02-01 [1] RSPM (R 4.4.0)
 P RVerbalExpressions * 0.1.1   2024-03-20 [?] RSPM
 P rvest              * 1.0.4   2024-02-12 [?] RSPM
   scales               1.3.0   2023-11-28 [1] RSPM (R 4.4.0)
 P selectr              0.4-2   2019-11-20 [?] RSPM
   semver               0.2.0   2017-01-06 [1] RSPM (R 4.4.0)
 P sessioninfo          1.2.2   2021-12-06 [?] RSPM
   skimr              * 2.1.5   2022-12-23 [1] RSPM (R 4.4.0)
 P snakecase            0.11.1  2023-08-27 [?] RSPM
   stringi              1.8.4   2024-05-06 [1] RSPM (R 4.4.0)
   stringr            * 1.5.1   2023-11-14 [1] RSPM (R 4.4.0)
   tibble             * 3.2.1   2023-03-20 [1] RSPM (R 4.4.0)
   tidyr              * 1.3.1   2024-01-24 [1] RSPM (R 4.4.0)
   tidyselect           1.2.1   2024-03-11 [1] RSPM (R 4.4.0)
 P tidyverse          * 2.0.0   2023-02-22 [?] RSPM
   timechange           0.3.0   2024-01-18 [1] RSPM (R 4.4.0)
 P tzdb                 0.4.0   2023-05-12 [?] RSPM
   utf8                 1.2.4   2023-10-22 [1] RSPM (R 4.4.0)
 P V8                   4.4.2   2024-02-15 [?] RSPM
   vctrs                0.6.5   2023-12-01 [1] RSPM (R 4.4.0)
 P waldo              * 0.5.2   2023-11-02 [?] RSPM
   wdman              * 0.2.6   2022-09-01 [1] RSPM (R 4.4.0)
   withr                3.0.0   2024-01-16 [1] RSPM (R 4.4.0)
   xfun                 0.45    2024-06-16 [1] RSPM (R 4.4.0)
   xml2                 1.3.6   2023-12-04 [1] RSPM (R 4.4.0)
 P yaml                 2.3.8   2023-12-11 [?] RSPM
 P zip                  2.3.1   2024-01-27 [?] RSPM

 [1] /Users/abdullah/Dissertation/dissertation_work/renv/library/macos/R-4.4/aarch64-apple-darwin20
 [2] /Users/abdullah/Library/Caches/org.R-project.R/R/renv/sandbox/macos/R-4.4/aarch64-apple-darwin20/f7156815

 P ── Loaded and on-disk path mismatch.

────────────────────────────────────────────────────────────────────

@jennybc
Copy link
Member

jennybc commented Jul 1, 2024

I've never seen this. Do you have any "interesting" startup files? Meaning: site or user-level or project-specific .Rprofile or similar.

@jennybc
Copy link
Member

jennybc commented Jul 1, 2024

Oh, yeah, I see this is an renv project. Can you reproduce this warning outside of Positron?

@DavisVaughan
Copy link
Contributor

This renv vignette on "renv in packages"
https://github.com/rstudio/renv/blob/1f99d7d8ce7829fa67f3295f5a447e3df09c7a38/vignettes/packages.Rmd#L75

has this


For package projects using renv, a library path outside of the project
directory will be used instead. As an example, on macOS, this might look like:

```
> .libPaths()
[1] "/Users/kevin/Library/Caches/org.R-project.R/R/renv/library/example-552f6e80/R-4.3/aarch64-apple-darwin20"
[2] "/Users/kevin/Library/Caches/org.R-project.R/R/renv/sandbox/R-4.3/aarch64-apple-darwin20/ac5c2659"
```

Note the example-552f6e80 in the place where macos is above in the session info output

 [1] /Users/abdullah/Dissertation/dissertation_work/renv/library/macos/R-4.4/aarch64-apple-darwin20
 [2] /Users/abdullah/Library/Caches/org.R-project.R/R/renv/sandbox/macos/R-4.4/aarch64-apple-darwin20/f7156815

that certainly seems like a place to start. Possibly this issue only comes up when using renv in an R package

@DavisVaughan
Copy link
Contributor

It seems like the addition of the macos/ bit is relatively new, from here:
rstudio/renv@a65b13f

@jennybc
Copy link
Member

jennybc commented Jul 1, 2024

I wonder @kevinushey will immediately spot the problem.

@DavisVaughan
Copy link
Contributor

@abduazizR if there is anything else you can provide (like a video) of what you were doing when this warning popped up, that would be helpful.

I've got R 4.5.0 along with the latest renv in an renv project and don't see these warnings

> .libPaths()
[1] "/Users/davis/Desktop/posit-user-training/renv/library/macos/R-4.5-r86792/aarch64-apple-darwin20"              
[2] "/Users/davis/Library/Caches/org.R-project.R/R/renv/sandbox/macos/R-4.5-r86792/aarch64-apple-darwin20/4cd76b74"

@abduazizR
Copy link
Author

I tried working the last couple of days running different things to get the message but I don't get it anymore for some reason! I will post it if I see it gain

@jennybc
Copy link
Member

jennybc commented Jul 2, 2024

I'm going to optimistically chalk this up to some unhappy renv state that you have successfully worked through 🤞

@jennybc jennybc closed this as completed Jul 2, 2024
@baslat
Copy link

baslat commented Jul 9, 2024

I'm getting this warning too. Also on a renv project, but not a package. R 4.4.1. Typically use VSCode, but trying out positron. Haven't seen the warning before in VSC. Seems to happen fairly regularly when I run tar_load() (but not always). I'll keep playing around.

@juliasilge
Copy link
Contributor

@baslat If you are able to come up with a clear example where this happens for you, we would be super appreciative!

@baslat
Copy link

baslat commented Jul 9, 2024

No luck getting it reproducible yet, but I can confirm that the {rlang} functions below don't capture the warning.

rlang::global_entrace()
options(rlang_backtrace_on_warning_report = "full")

# do something to make the warning appear

rlang::last_warnings() # shows nothing
last.warning # shows the 'macos' warning

@VLucet
Copy link

VLucet commented Jul 24, 2024

I'm getting something similar, while using renv and targets in conjunction with positron (latest build as of writing). It seems to happen when using tab completion... I am not able to isolate this either.

In utils::packageDescription(package, fields = "Version") :
  no package 'linux-pop-jammy' was found

@DavisVaughan
Copy link
Contributor

If you can get it to reliably reproduce, then you could try:

  • Setting options(warn = 2) at the beginning of your R session
  • Triggering the issue, which should error now
  • Run traceback() and report everything you see

It is possible that could help us

@VLucet
Copy link

VLucet commented Jul 31, 2024

@DavisVaughan I have been trying to set options(warn = 2) to catch that error. I must have tried a dozen time, either setting the option when I start my session, or half-way through it when I see the warning pop up. It feels like whenever I change the option, the behavior also disappears. I know that sounds odd but it is really what it seems.

@kevinushey
Copy link
Contributor

I wonder if this would help identify the issue:

trace(utils::packageDescription, quote({
   if (identical(pkg, "macos")) {
      print(rlang::trace_back())
   }
}))

(replace "macos" with "linux-pop-jammy" as appropriate)

@kevinushey
Copy link
Contributor

Sorry, I should clarify. After running that code, you need to then try to trigger the unexpected warning messages again; if the warning occurs, you should also hopefully get an R backtrace printed to the console.

@VLucet
Copy link

VLucet commented Jul 31, 2024

Here is an example of what gets printed:

Tracing utils::packageDescription(package, fields = "Version") on entry 
    ▆
 1. └─.ps.help.getHtmlHelpContents(topic = "mutate")
 2.   └─getHtmlHelpContentsInstalled(helpFiles, package)
 3.     └─tools::Rd2HTML(rd, out = htmlFile, package = package)
 4.       └─utils::packageDescription(package, fields = "Version")
Warning in utils::packageDescription(package, fields = "Version") :
  no package 'linux-pop-jammy' was found

@DavisVaughan
Copy link
Contributor

DavisVaughan commented Jul 31, 2024

Oh that's super helpful @VLucet thanks!

It looks like we are somehow extracting the wrong package here
https://github.com/posit-dev/ark/blob/70552b8664708b682df52f29116d61decc745775/crates/ark/src/modules/positron/help.R#L142-L149

Note that we are looking for a pattern like "/library/([^/]+)/" and renv does seem to create a libpath like that

> .libPaths()
[1] "/Users/davis/Desktop/posit-user-training/renv/library/macos/R-4.5-r86792/aarch64-apple-darwin20"

And the match there would indeed be macos


So it looks like we need to reinvestigate how .ps.help.getHtmlHelpContents(topic = "mutate") can get triggered (probably help on hover or something) and then refresh ourselves with what the helpFile path looks like to see if there is a more robust way to get at the package name.

Maybe we can follow the same heuristics as utils:::.getHelpFile()? We call it in getHtmlHelpContentsInstalled() with helpFile and it does this, which locates the package name and presumably works?

> utils:::.getHelpFile
function (file) 
{
    path <- dirname(file)
    dirpath <- dirname(path)
    if (!file.exists(dirpath)) 
        stop(gettextf("invalid %s argument", sQuote("file")), 
            domain = NA)
    pkgname <- basename(dirpath)
    RdDB <- file.path(path, pkgname)
    if (!file.exists(paste0(RdDB, ".rdx"))) 
        stop(gettextf("package %s exists but was not installed under R >= 2.10.0 so help cannot be accessed", 
            sQuote(pkgname)), domain = NA)
    tools:::fetchRdDB(RdDB, basename(file))
}

@DavisVaughan DavisVaughan reopened this Jul 31, 2024
@DavisVaughan DavisVaughan added this to the 2024.10.0 Pre-Release milestone Jul 31, 2024
@DavisVaughan DavisVaughan self-assigned this Aug 5, 2024
@blairj09
Copy link

FWIW I'm also seeing this (the macos flavor)

@juliasilge juliasilge added bug Something isn't working support labels Aug 13, 2024
@whipson
Copy link

whipson commented Aug 20, 2024

I'm seeing this too in an renv project on R 4.4.1:

Warning message:
In utils::packageDescription(package, fields = "Version") :
  no package 'macos' was found

DavisVaughan added a commit that referenced this issue Sep 24, 2024
@DavisVaughan
Copy link
Contributor

QA - See this note about a reliable way to reproduce the original issue posit-dev/ark#537 (comment)

@jonvanausdeln
Copy link
Contributor

Verified Fixed

Positron Version(s) : 2024.09.0-95
OS Version(s) : MacOS 14

Test scenario(s)

Using repro steps provided, works as expected.

Link(s) to TestRail test cases run or created:

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working lang: r support
Projects
None yet
Development

No branches or pull requests

10 participants