krlmlr / r-appveyor

Tools for using R with AppVeyor (https://appveyor.com)
132 stars 60 forks source link

R release builds failing (3.3.0 "corrupted and unreadable") #68

Closed achubaty closed 8 years ago

achubaty commented 8 years ago

I'm assuming this is a transient issue caused by the release of R 3.3.1 but I figure I should report it here anyway, in case an update is required on your end.

== 06/22/2016 15:12:13: Version: release
== 06/22/2016 15:12:14: URL path: 
== 06/22/2016 15:12:14: Downloading R from: https://cloud.r-project.org/bin/windows/base/R-3.3.0-win.exe
== 06/22/2016 15:12:15: Running R installer
This command cannot be run due to the error: The file or directory is corrupted and unreadable

Thank you.

achubaty commented 8 years ago

looks like this is the same error as #62

gaborcsardi commented 8 years ago

That's probably me not updating rversions.r-pkg.org. I'll try to get to it today.

achubaty commented 8 years ago

https://github.com/krlmlr/r-appveyor/blob/master/scripts/appveyor-tool.ps1#L68-L74

for appveyor builds using release, does it make more sense to use the persistent link CRAN provides to the release version?

https://cran.rstudio.com/bin/windows/base/release.htm

of course you can use a different CRAN mirror if desired.

krlmlr commented 8 years ago

@achubaty: I find parsing r-pkg.org easier than parsing the persistent CRAN link, I guess the latter requires some web scraping. I'd review a PR, though.

achubaty commented 8 years ago

@krlmlr sorry I should have been more clear. I meant to use the persistent link for the download. I'll take a closer look and see if a PR will make it clearer/cleaner. The goal is to ensure that release (and devel) always work, with fewer manual updates required.

achubaty commented 8 years ago

hmm I can't get this to work...I don't know PowerShell enough to know whether it is able to correctly resolve the redirect URL to get the .exe.

gaborcsardi commented 8 years ago

@krlmlr Looks like you don't need to parse HTML, that link just redirects to the installer.

achubaty commented 8 years ago

hmm I can't get this to work...I don't know PowerShell enough to know whether it is able to correctly resolve the redirect URL to get the .exe.

I see it's using curl -L which should follow the redirect. but see https://curl.haxx.se/docs/faq.html#Redirects_work_in_browser_but_no

krlmlr commented 8 years ago

Contents of release.htm:

<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=R-3.3.1-win.exe">
<body></body>

Doesn't seem like CURL can do it (but then I didn't really look into it): http://stackoverflow.com/a/32939779/946850

achubaty commented 8 years ago

@gaborcsardi does r-pkg.org use a cronjob or similar to update the json for r-release and r-oldrel? something along these lines would reduce the manual updating you otherwise have to do.

library(jsonlite)
library(rversions)
cat(toJSON(r_oldrel()), file = "r-oldrel.json")
cat(toJSON(r_release()), file = "r-release.json")
gaborcsardi commented 8 years ago

Should be OK now, just updated it to 3.3.1.

The reason for the manual update is that https://github.com/metacran/r-builder relies on it, so I have to make the new version available there.

This will solve it: https://github.com/metacran/rversions.app/issues/2

I just need to remember implementing it before the next R release time.....

achubaty commented 8 years ago

Awesome, thanks!

krlmlr commented 8 years ago

I guess this can be closed. Please comment or add a new issue if the problem persists.

gaborcsardi commented 7 years ago

@krlmlr OK, so now we have the opposite problem. rversions reports the new version, 3.3.2, but no windows downloads are available just yet.

I am implementing https://github.com/metacran/rversions.app/issues/2 right now, FYI.

gaborcsardi commented 7 years ago

OK, so I guess you can query http://rversions.r-pkg.org/r-release-win now.

krlmlr commented 7 years ago

Thanks. Does it make sense to have http://rversions.r-pkg.org/r-oldrel-win, too?

gaborcsardi commented 7 years ago

I think oldrel is fine. Older binaries are always available AFAICT.

IndrajeetPatil commented 6 years ago

I am getting the same error. What should I do? Is my R directory corrupt or something? I ran devtools::check() and that did not give me any warnings, errors, or notes, so surprised that the build is faling.

[00:00:00] Build started
[00:00:00] $ErrorActionPreference = "Stop"
[00:00:00] Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1"
[00:00:00] Import-Module '..\appveyor-tool.ps1'
[00:00:00] 
[00:00:00] git clone -q --branch=master https://github.com/IndrajeetPatil/ggstatsplot.git C:\projects\ggstatsplot
[00:00:02] git checkout -qf ca469e3557262436f85cd61ce8877e5d26f2e485
[00:00:02] Running Install scripts
[00:00:02] Bootstrap
[00:00:02] == 03/11/2018 03:32:50: Bootstrap: Start
[00:00:02] == 03/11/2018 03:32:50: Adding GnuWin32 tools to PATH
[00:00:02] == 03/11/2018 03:32:50: Setting time zone
[00:00:02] UTC
[00:00:02] GMT Standard Time
[00:00:02] == 03/11/2018 03:32:50: Version: patched
[00:00:03] == 03/11/2018 03:32:51: URL path: 
[00:00:03] == 03/11/2018 03:32:51: Downloading R from: https://cloud.r-project.org/bin/windows/base/R-3.4.3patched-win.exe
[00:00:03] == 03/11/2018 03:32:51: Running R installer
[00:00:03] This command cannot be run due to the error: The file or directory is corrupted and unreadable.
[00:00:03] 7z a failure.zip *.Rcheck\*
[00:00:03] 
[00:00:03] 7-Zip [64] 16.04 : Copyright (c) 1999-2016 Igor Pavlov : 2016-10-04
[00:00:03] 
[00:00:03] Scanning the drive:
[00:00:03] 0 files, 0 bytes
[00:00:03] 
[00:00:03] Creating archive: failure.zip
[00:00:03] 
[00:00:03] Items to compress: 0
[00:00:03] 
[00:00:03] 
[00:00:03] Files read from disk: 0
[00:00:03] Archive size: 22 bytes (1 KiB)
[00:00:03] Everything is Ok
[00:00:03] appveyor PushArtifact failure.zip
[00:00:11] 
[00:00:11] Uploading artifact failure.zip (22 bytes)...100%
krlmlr commented 6 years ago

@IndrajeetPatil: This problem looks like a duplicate of #112.