Your first error was about contrib.url so installed packages, and now you are talking about tinytex.
You said rendering at command line work, so tinytex should not be an issue.
try
rmarkdown::render("file.Rmd", "pdf_document'")
if you want to check.
The message above seems to have downloading the file correctly.
Anyway, update all the package, start in a fresh session and redo the step.
We need a reproducible example if you want us to help further. It is difficult to say much more. Anything can be the cause in your environment installation or else if we can't reproduce on our side.