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

Error while creating lockfile not thrown properly #358

Open
gaborcsardi opened this issue Jan 14, 2022 · 7 comments
Open

Error while creating lockfile not thrown properly #358

gaborcsardi opened this issue Jan 14, 2022 · 7 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@gaborcsardi
Copy link
Member

Run r-lib/actions/setup-r-dependencies@v2
Run ## Installing pak
Installing pak
Dependency resolution
  ℹ Creating lockfile '.github/pkg.lock'
  
  ✔ Updated metadata database: 2.88 MB in 7 files.
  
  ℹ Creating lockfile '.github/pkg.lock'
  ℹ Updating metadata database
  
  Error: Error: <rlib_error in throw(cond, parent = e): You can only throw conditions>

one of the log with call stack
https://github.com/rstudio/rmarkdown/runs/4815089673?check_suite_focus=true

@hsbadr
Copy link

hsbadr commented Jan 16, 2022

Similar crash at https://github.com/hsbadr/HiClimR/runs/4831022375 (error: R session crashed with exit code -9):

Creating lockfile '.github/pkg.lock'Updated metadata database: 2.87 MB in 7 files.Creating lockfile '.github/pkg.lock'Updating metadata database
  <error: R session crashed with exit code -9>
  NULL
  NULL
  
  Error: Error: <error: R session crashed with exit code -9>
  $calls
  $calls[[1]]
  pak::lockfile_create(c("deps::.", "any::sessioninfo", extra_deps), 
      lockfile = ".github/pkg.lock", dependencies = c(needs, ("all")))
  
  $calls[[2]]
  remote(function(...) {
      get("lockfile_create_internal", asNamespace("pak"))(...)
  }, list(pkg = pkg, lockfile = lockfile, lib = lib, upgrade = upgrade, 
      dependencies = dependencies))
  
  $calls[[3]]
  err$throw(res$error)
  
  
  $parents
  [1] 0 1 2
  
  $envs
  $envs[[1]]
  [1] "0x55ccba4c3188"
  
  $envs[[2]]
  [1] "0x55ccba4db590"
  
  $envs[[3]]
  [1] "0x55ccba7cbde0"
  
  
  $topenvs
  $topenvs[[1]]
  [1] "namespace:pak"
  
  $topenvs[[2]]
  [1] "namespace:pak"
  
  $topenvs[[3]]
  [1] "0x55ccba8cf980"
  
  
  $indices
  [1] 1 2 3
  
  $nframes
  [1] 3
  
  $messages
  $messages[[1]]
  [1] "R session crashed with exit code -9"
  
  
  $ignore
  NULL
  
  $classes
  [1] "error"     "condition"
  
  $pids
  [1] 14824 14824 14824
  
  attr(,"class")
  [1] "rlib_trace"
  Execution halted
  Error: Process completed with exit code 1.

@gaborcsardi
Copy link
Member Author

I pushed some changed to v2 that seem to fix this: r-lib/actions#483 (comment)

@hsbadr
Copy link

hsbadr commented Jan 16, 2022

I pushed some changed to v2 that seem to fix this: r-lib/actions#483 (comment)

Thanks! Will test it.

gaborcsardi added a commit to r-lib/pkgcache that referenced this issue Jan 17, 2022
@gaborcsardi
Copy link
Member Author

pkgcache now forces HTTP 1.1 as well, so when that is on CRAN it will solve this issue.

Except for the pre-bundled pak binaries of course. For those (and until pkgcache is on CRAN) the workaround is to force HTTP 1.1 with the env var:

PKGCACHE_HTTP_VERSION=2

(Yes, it HTTP 1.1 corresponds to the value 2.)

@bniebuhr
Copy link

Hi,
I am having what I believe it is the same problem here: https://github.com/NINAnor/oneimpact/actions/runs/4790505912/jobs/8519719745

But I am pretty new to continuous integration and using pak in this context, so I am not sure how to set it up even with these hints above... anyone could help?
The file that creates that is this one.

@gaborcsardi
Copy link
Member Author

@bniebuhr Can you try using the suggested syntax? I.e. any::pkgdown and also local::. if you need to install the local package. See
https://github.com/r-lib/actions/blob/788d7d59f05b5ac5b9cf4630428a2502514e98fb/examples/pkgdown.yaml#L35

@bniebuhr
Copy link

It worked, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants