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
install_github fails with unzip error #1464
Comments
I just tried installing the zip file directly and got the same problem, so the problem is probably not with devtools itself?
|
I have the same problem for several weeks too, still looking for a solution. |
Today, I ran into the problem by letting several people install the However, some of the Windows users ran into the problem described above which looked as follows in our case: > devtools::install_github("rstudio/tutor")
Downloading GitHub repo rstudio/tutor@master
from URL https://api.github.com/repos/rstudio/tutor/zipball/master
Error in utils::unzip(src, exdir = target) :
cannot open file 'C:/Users/mshumper/AppData/Local/Temp/RtmpeE4D2Q/devtools23e061002ad9/rstudio-tutor-1476bf6/R/ace.R': No such file or directory All users installed the current R version 3.3.3 and the current RStudio version 1.0.136 today prior to trying to install Even though I am on Windows as well I was not able to reproduce the bug on my machine. |
This sounds very similar to the problem described in Issue #1433. The work-around was to get rid of .Rbuildignore. |
@gaborcsardi @jimhester have you seen this before? |
Haven't. Can't reproduce. Maybe a "wrong" unzip program again? Although I am not sure how removing |
This looks like the same bug that has been bedevilling my team for years (!). We all have Windows 7 x64 PC, each with the same corporate "build" and have same admin privileges. Yet In particular, note this behaviour:
I've spent quite a bit of time debugging this all to no avail. Squashing this bug would be massive for us. |
@imanuelcostigan Can you pls share a zip file that is problematic, and also the winzip version your colleagues have? |
@imanuelcostigan you might also try comparing |
It's possible that this may also be related to the path length. |
@hadley In the original error, the path is only about 90 characters long, that should be ok. |
@gaborcsardi good point. I'll keep the other issue open |
@hadley getOption("unzip") yields "internal" for me. @pgwatson @jonathanrandall can you please add what you get from the same command to this thread? Thanks |
"internal" |
getOption(“unzip”) also yields “internal” and fails for me
However if I set the unzip option to point to the unzip.exe program bundled with the github application then everything appears to work correctly.
The version info for unzip.exe bundled with github is
Github/unzip.exe -v
UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.
Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.
Compiled with gcc 4.9.2 for Unix (Cygwin) on Nov 4 2014.
UnZip special compilation options:
ACORN_FTYPE_NFS
ASM_CRC
COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)
SET_DIR_ATTRIB
SYMLINKS (symbolic links supported, if RTL and file system permit)
TIMESTAMP
UNIXBACKUP
USE_EF_UT_TIME
USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)
USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported)
UNICODE_SUPPORT [wide-chars, char coding: UTF-8] (handle UTF-8 paths)
MBCS-support (multibyte character support, MB_CUR_MAX = 6)
LARGE_FILE_SUPPORT (large files over 2 GiB supported)
ZIP64_SUPPORT (archives using Zip64 for large files supported)
USE_BZIP2 (PKZIP 4.6+, using bzip2 lib version 1.0.6, 6-Sept-2010)
VMS_TEXT_CONV
WILD_STOP_AT_DIR
[decryption, version 2.11 of 05 Jan 2007]
UnZip and ZipInfo environment options:
UNZIP: [none]
UNZIPOPT: [none]
ZIPINFO: [none]
ZIPINFOOPT: [none]
|
Interestingly if I point instead to the version 6.00 unzip bundled with Rtools then the devtools::install_github process still fails
The Rtools version of unzip (which doesn’t work) has several different compilation flags set compared to the version from github (which does work)
Compilation flags follow:
Rtools/unzip.exe -v
UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.
Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.
Compiled with Microsoft C 13.10 (Visual C++ 7.1) for
Windows 9x / Windows NT/2K/XP/2K3 (32-bit) on Apr 20 2009.
UnZip special compilation options:
ASM_CRC
COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)
NTSD_EAS
SET_DIR_ATTRIB
TIMESTAMP
UNIXBACKUP
USE_EF_UT_TIME
USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)
USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported)
UNICODE_SUPPORT [wide-chars] (handle UTF-8 paths)
MBCS-support (multibyte character support, MB_CUR_MAX = 1)
LARGE_FILE_SUPPORT (large files over 2 GiB supported)
ZIP64_SUPPORT (archives using Zip64 for large files supported)
USE_BZIP2 (PKZIP 4.6+, using bzip2 lib version 1.0.5, 10-Dec-2007)
VMS_TEXT_CONV
[decryption, version 2.11 of 05 Jan 2007]
UnZip and ZipInfo environment options:
UNZIP: [none]
UNZIPOPT: [none]
ZIPINFO: [none]
ZIPINFOOPT: [none]
Github/unzip.exe -v
UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.
Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.
Compiled with gcc 4.9.2 for Unix (Cygwin) on Nov 4 2014.
UnZip special compilation options:
ACORN_FTYPE_NFS
ASM_CRC
COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)
SET_DIR_ATTRIB
SYMLINKS (symbolic links supported, if RTL and file system permit)
TIMESTAMP
UNIXBACKUP
USE_EF_UT_TIME
USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)
USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported)
UNICODE_SUPPORT [wide-chars, char coding: UTF-8] (handle UTF-8 paths)
MBCS-support (multibyte character support, MB_CUR_MAX = 6)
LARGE_FILE_SUPPORT (large files over 2 GiB supported)
ZIP64_SUPPORT (archives using Zip64 for large files supported)
USE_BZIP2 (PKZIP 4.6+, using bzip2 lib version 1.0.6, 6-Sept-2010)
VMS_TEXT_CONV
WILD_STOP_AT_DIR
[decryption, version 2.11 of 05 Jan 2007]
UnZip and ZipInfo environment options:
UNZIP: [none]
UNZIPOPT: [none]
ZIPINFO: [none]
ZIPINFOOPT: [none]
|
I'm going to reopen this so we can include some basic fix for devtools (to at least help diagnose the problem) |
@hadley let me know if my team or I can help provide you any more info. |
I am pretty sure this issue is only tangentially related to devtools code, the error is coming from the internal unzip code. Possible causes could be
|
And devtools does respect the |
I think we'll close this issue since it doesn't seem like devtools' problem - but feel free to continue to contribute insights here (so people find them when googling), and we are likely to explore alternatives to the internal zip utility in remotes. |
@jimhester I'm pretty sure that the issue isn't caused by either of those. We continued to see the same error when setting a different temp directory that users definitely had read/write access to and the directory was not being removed as we were able to see the directory after the process failed. In fact, unzipping the package failed using WinZip with the same sort of error in a user directory. In summary, what we have found was the unzipping the package:
|
Everything now works. |
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
I'm trying to install my own package from github: plantarum/flowPloidy, onto a Windows computer. Starting from a fresh session, installing devtools from Cran, I try:
This fails with:
I looked into those directories, and the toplevel directory 'C:/Users/jamest/AppData/Local/Temp/RtmpKWeuxp/devtools1fc45f5c7551/plantarum-flowPloidy-88ad2c0/ is there, and in the downloaded zip file the R folder exists and contains all the code files as you expect.
I tried debugging my way through the code, and got as far as the function get0 before I gave up trying to figure out the ultimate source of the error.
install_github works no problem for this package under Linux.
Thanks for any help or suggestions,
Tyler
R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
The text was updated successfully, but these errors were encountered: