pkgdown github action build error 'subscript out of bounds'

Hello,

I am having trouble getting a github action to complete a pkgdown site build. Here is my yaml file. I'm using the default template from rlibs for a pkgdown github action. The error is occurring within the step "r-lib/actions/setup-r-dependencies@v2", but where within that script is unclear to me. Here's a log file from the failed build (first error occurs at line 2676):

Error: Error: <callr_remote_error: subscript out of bounds>

The error may be occuring in this step in the 'setup-r-dependencies' file:

- name: Installing pak querying dependencies

(lines 69-91). However, I'm not sure about this and do not know how to proceed. This is clearly an R error indicating that an object is being indexed past its dimensions, but what this object is, how it was generated, etc, are not clear to me. I can build the pkgdown site locally with no problem. Package vignettes also build fine with pkgdown::build_articles(). Any suggestions? (Even for troublehshooting).

This appears to be a bug, so I will attempt the suggested workaround from that post.

You'll need to show us the workflow file and the run that fails. Without these it is very hard to help you

I posted all the links to those (workflow, log, etc) in my original post...? They are long files, especially the log files, which is why I posted only the relevant error and where to find it in the log file. I am also this person. I was going to dig more into the file for 'setup-r-dependencies@v2' and see if I can identify where things go wrong.

Right, sorry, I missed that. Unfortunately this seems to be a pak bug that comes out in certain cases for ?ignore.

If I add the repo to options(repos), then it works fine:

pak::repo_add(glmmADMB = "http://glmmadmb.r-forge.r-project.org/repos")
pak::lockfile_create(c("deps::.", "any::pkgdown", "local::."), dependencies = TRUE)
pak::lockfile_install()

This is how you can modify .Rprofile to add the other repo: actions/setup-r at v2 · r-lib/actions · GitHub Or maybe it is easier to use the extra-repositories parameter to add your extra repo.

I'm sorry, but I'm unclear about what to add and where. I added the repo as such between "setup-r@v2" and "setup-r-dependencies@v2":

      - name: set some special options for glmmADMB
        run: |
          cat('\noptions(repos = c("http://glmmadmb.r-forge.r-project.org/repos", 
          "https://cloud.r-project.org/"))', file = "~/.Rprofile", append = TRUE)
        shell: Rscript {0}

I can run the scripts you suggest (pak::repo_add(....)) in an interactive R session, but I don't understand where they belong in the workflow. When they are included in the .Rprofile, they fail.

That does not belong in the workflow, that was a test that I ran interactively.

Maybe it is easier to use the extra-repositories parameter instead of updating the R profile?

Yes, I gathered. That tests also works fine for me in an interactive, but the workflow still fails.

I don't know what process the "extra-packages" parameter refers to. I have spent hours looking at the documentation for pak, github actions and rlibs/actions, and this is just not clear. I'm going to stop working on this for the time being; it is just not worth anymore than the 20+ hours I've invested. Thank your for your time spent trying to help me resolve this. I kindly request you also do not spend any of your limited time trying to resolve my issue. Thank you again.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.