I wrote an R package that has pdf files as vignettes and have successfully used it for 3 years. Now, when I try to open the pdfs I get the access error.:
Access to 127.0.0.1 was denied
You don't have authorization to view this page.
HTTP ERROR 403
I can't associate any particular update of RStudio where the problem started since I don't check the files every time I update. Here are the specs on my system:
R version 4.2.2 Patched (2022-11-10 r83330)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 21.1
The pdf file opens with xdg-open from the command line, but gives a bunch of statements like
qt5ct: using qt5ct plugin
Invalid Context= "Apps" line for icon theme: "/usr/share/icons/Mint-Y/apps/16/"
Invalid Context= "Apps" line for icon theme: "/usr/share/icons/Mint-Y/apps/16@2x/"
Invalid Context= "Mimetypes" line for icon theme: "/usr/share/icons/Mint-Y/mimetypes/16/"
Invalid Context= "Mimetypes" line for icon theme: "/usr/share/icons/Mint-Y/mimetypes/16@2x/"
Invalid Context= "Apps" line for icon theme: "/usr/share/icons/Mint-Y/apps/22/"
Invalid Context= "Apps" line for icon theme: "/usr/share/icons/Mint-Y/apps/22@2x/"
Invalid Context= "Apps" line for icon theme: "/usr/share/icons/Mint-Y/apps/24/"
Invalid Context= "Apps" line for icon theme: "/usr/share/icons/Mint-Y/apps/24@2x/"
Invalid Context= "Mimetypes" line for icon theme: "/usr/share/icons/Mint-Y/mimetypes/24/"
Invalid Context= "Mimetypes" line for icon theme: "/usr/share/icons/Mint-Y/mimetypes/24@2x/"
Invalid Context= "Apps" line for icon theme: "/usr/share/icons/Mint-Y/apps/32/"
Invalid Context= "Apps" line for icon theme: "/usr/share/icons/Mint-Y/apps/32@2x/"
As for the second item, Sys.getenv("R_PDFVIEWER") gives "/usr/bin/xdg-open".
What is a standard R package? How is yours different? Can you open the help pages of your package? Did you try reinstalling your package? Did you try restarting your machine?
Can you see the link in RStudio that points to the PDF? What does it say?
Sorry, a lot of questions, just shooting blindly in the dark....
By "standard" I meant a major package you can download from CRAN. The fact that I am having the same problem with pdfs in optimx means we don't have to consider anything I may have screwed up in the development and installation of my package. I have 4 Linux Mint machines (two are 21.1 and two are 20.3) and all have the same issue, even after rebooting. I don't have the problem on Windows 10 (i.e., the pdfs load). How would I go about seeing the link for the pdf in RStudio?
I just noticed this today as well. Any PDF vignette I try to view in RStudio produces the same error message: "Access to 127.0.0.1 was denied You don't have authorization to view this page. HTTP ERROR 403"
Currently running RStudio 2022.12.0 Build 353 with R 4.2.2 on Windows 10 .
When I run Sys.getenv("R_PDFVIEWER") I get an empty string ""
Also, I changed my default browser from Chrome to Firefox (I am at the "try random things" stage of problem solving). Firefox does not show the error but gives this address
and simply does not show the pdf. I don't understand why RStudio is going to the browsers rather than the pdf readers. Note that the pdf I am trying to load is located at
I don't have Linux Mint, but this sounds like an RStudio bug, which you can report in the Issues · rstudio/rstudio · GitHub repo. Do a search in the existing issues first, maybe it was already reported. Thanks!