Skip to content

Boxstarter should detect if Chocolatey can be installed and stop gracefully #376

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

Closed
dummys opened this issue Nov 29, 2018 · 12 comments · Fixed by #411
Closed

Boxstarter should detect if Chocolatey can be installed and stop gracefully #376

dummys opened this issue Nov 29, 2018 · 12 comments · Fixed by #411
Labels
5 - Released The issue has been resolved, and released to the public for consumption Bug Issues where something has happened which was not expected or intended Priority_HIGH Issues that are considered to be a high priority to get fixed
Milestone

Comments

@dummys
Copy link

dummys commented Nov 29, 2018

Hello, using latest boxstarter install script with powershell under windows 10 x64 1803 fail, but it seems related to chocolatey install and not boxstarter...

EDIT: I want to install manually chocolatey, but install link is broken.

iex ((New-Object System.Net.WebClient).DownloadString('https://boxstarter.org/bootstrapper.ps1')); get-boxstarter -Force

And here is the log:

PS C:\WINDOWS\system32> iex ((New-Object System.Net.WebClient).DownloadString('http://boxstarter.org/bootstrapper.ps1')); get-boxstarter -Force
Welcome to the Boxstarter Module installer!
Chocolatey is going to be downloaded and installed on your machine. If you do not have the .NET Framework Version 4 or greater, that will also be downloaded and installed.
Cannot convert value "<!DOCTYPE html>
<html lang="en" class="static ">
    <head>
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>Chocolatey Gallery</title>
        <link href="../Content/site.css" rel="stylesheet" />
        <link href="../Content/chocolatey.css" rel="stylesheet" />
        <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <script src="../Scripts/header/modernizr-2.6.2.js"></script>
    </head>
    <body>
        <div id="content-wrapper">
            <header class="main">
                <div id="logo"><a href="../">Chocolatey Gallery</a></div>
            </header>
            <nav class="main">
                <ul id="menu">
                    <li><a href="../">Home</a></li>
                    <li><a href="../Packages">Packages</a></li>
                    <li><a href="https://github.com/chocolatey/choco/wiki">Documentation</a></li>
                    <li><a href="/packages/upload" class="upload">Upload Package</a></li>
                </ul>
            </nav>
            <div id="body">
                <div class="error-show-code"></div>
                <div class="error-page">
                    <h1>Error: Oh no, we broke something!</h1>
                    <p>You might be here because:</p>
                    <ul>
                        <li>There is an error on our server and the server is &quot;given her all she's got,
captain.&quot; </li>
                        <li>The system is down, the system is down, the system is down.</li>
                        <li>Our name is smalls.</li>
                    </ul>
                    <p>
                        We have logged the error and we will look into it, and make sure it doesn’t happen again.
However if you keep
                        seeing this page please File a bug on <a
href="https://github.com/chocolatey/chocolatey.org/issues">the Chocolatey Gallery issue tracker</a>.
                    </p>
                </div>
            </div>
        </div>
        <div id="layout-footer" class="group">
            <footer id="footer">
                <ul class="recommended">
                                        <li><a href="https://github.com/chocolatey/choco/wiki">Overview</a>
                                                <p>
                                                        Where did Chocolatey get its name? What exactly is chocolatey anyway?</p>
                                        </li>
                                        <li><a href="https://groups.google.com/group/chocolatey">Discussion</a>
                                                <p>
                                                        Find a possible bug? Got a feature request? Get involved in the discussion!</p>
                                        </li>
                                        <li><a href="https://bit.ly/chocolateyVideo">Video</a>
                                                <p>
                                                        Want to see Chocolatey in action?</p>
                                        </li>
                                        <li><a href="https://github.com/chocolatey/choco/wiki/ChocolateyFAQs">FAQ</a>
                                                <p>
                                                        Read the Frequently Asked Questions about Chocolatey.</p>
                                        </li>
                </ul>
                <div class="license">
                                        <p>
                                                <a href="https://twitter.com/chocolateynuget" class="twitter-follow-button" data-show-count="true"
                                                        data-width="250px" data-lang="en">Follow @@chocolateynuget</a> <a href="https://twitter.com/share"
                                                                class="twitter-share-button" data-hashtags="chocolatey" data-lang="en">Tweet</a>
                                                <script type="text/javascript">
                                                        !function (d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (!d.getElementById(id)) { js =
d.createElement(s); js.id = id; js.src = "//platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs); }
} (document, "script", "twitter-wjs");
                                                </script>
                                                <br />
                                                &copy; 2014 RealDimensions Software, LLC.
                                        </p>
                </div>
                <div class="supporters">
                                        Site made possible by the following sponsors:
                                        <ul class="supporters">
                                                <li></li>
                                                <li><a href="http://codingutopia.com">RealDimensions</a> <a id="realdimensions-logo"
href="http://codingutopia.com"></a></li>
                                                <li><a href="https://appharbor.com">AppHarbor</a> <a id="appharbor-logo" href="https://appharbor.com">
                                                </a></li>
                        <li><a href="https://turbo.net">Turbo.net</a> <a id="turbo-logo" href="https://turbo.net">
                        </a></li>
                                                <li></li>
                                        </ul>
                </div>
            </footer>
                </div>
        <script src="../Scripts/jquery-1.8.3.js"></script>
        <script type="text/javascript">
            function submitQuery() {
                window.location = "../packages?q="
                + encodeURIComponent($("#searchBoxInput").val());
                return false;
            }
        </script>
    </body>
</html>" to type "System.Xml.XmlDocument". Error: "Reference to undeclared entity 'copy'. Line 74, position 8."
At line:173 char:3
+   [xml]$result = Download-String $url
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : MetadataError: (:) [], ArgumentTransformationMetadataException
    + FullyQualifiedErrorId : RuntimeException

Exception calling "IsBypassed" with "1" argument(s): "This operation is not supported for a relative URI."
At line:130 char:15
+     } elseif (!$downloader.Proxy.IsBypassed($url)) {
+               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : InvalidOperationException

Exception calling "DownloadFile" with "2" argument(s): "The path is not of a legal form."
At line:167 char:3
+   $downloader.DownloadFile($url, $file)
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentException


ERROR: The system cannot find the file specified.
C:\Users\mofo\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip



System ERROR:
The system cannot find the file specified.
Unable to unzip package using 7zip. Perhaps try setting $env:chocolateyUseWindowsCompression = 'true' and call install
again. Error: 7-Zip encountered a fatal error while extracting the files
At line:216 char:9
+     2 { throw "$errorMessage 7-Zip encountered a fatal error while ex ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Unable to unzip...cting the files:String) [], RuntimeException
    + FullyQualifiedErrorId : Unable to unzip package using 7zip. Perhaps try setting $env:chocolateyUseWindowsCompres
   sion = 'true' and call install again. Error: 7-Zip encountered a fatal error while extracting the files
@flcdrg
Copy link
Member

flcdrg commented Nov 29, 2018 via email

@dummys
Copy link
Author

dummys commented Nov 29, 2018

ok, perhaps chocolatey should add a sanitiy check of the server before installation ?

like getting this page: https://status.chocolatey.org/ and check if all is green for example.

@pauby
Copy link
Member

pauby commented Nov 29, 2018

@dummys That's an issue you should raise in the Chocolatey repositories.

@hobbes
Copy link

hobbes commented Nov 29, 2018

The website issue is chocolatey, but the install script behaviour is a boxstarter issue. I was bitten by the same error and it took some times to discover that the issue came from the chocolatey website.

@pauby
Copy link
Member

pauby commented Nov 29, 2018

The website issue is chocolatey, but the install script behaviour is a boxstarter issue.

Chocolatey installs the packages. Boxstarter executes the commands. So if you want Chocolatey to 'sanity check of the server before installation' then you raise Chocolatey issue.

How is it a Boxstarter issue?

@hobbes
Copy link

hobbes commented Nov 29, 2018

because this happens during the chocolatey installation phase, choco is not yet on the machine

@dummys
Copy link
Author

dummys commented Nov 30, 2018

it's back in work again.

@dummys dummys closed this as completed Nov 30, 2018
@pauby
Copy link
Member

pauby commented Nov 30, 2018

@hobbes so it's just the Chocolatey installation phase you're concerned about? Not the installation of other packages?

@pauby pauby reopened this Nov 30, 2018
@pauby pauby changed the title Boxstarter install under windows 10 always fail Boxstarter should detect if Chocolatey can be installed Nov 30, 2018
@pauby pauby added Discussion Improvement Issues that enhances existing functionality, or adds new features labels Nov 30, 2018
@hobbes
Copy link

hobbes commented Nov 30, 2018

@pauby exactly.

Now the package installation phase could also detect the problem when it happens at that stage and handle it, but that's a completely different problem, dependent on chocolatey.

@pauby pauby added Up For Grabs 0 - Backlog Issue is accepted, but is not ready to be worked on or not in current sprint and removed Discussion labels Mar 19, 2019
@pauby
Copy link
Member

pauby commented Oct 8, 2019

I'm back looking at this again. I'm still not sure what we are supposed to do with this.

The issue originally was that chocolatey.org was not available which caused the Boxstarter run to fail (in this case fail to even install Chocolatey). What would be the desired outcome?

If Boxstarter cannot install Chocolatey do we completely fail the script? Just skip the choco command(s) so we have a half built system?

I'm still not convinced this is a Boxstarter issue.

@pauby pauby added 0 - _Triaging Issue is accepted, but a milestone has yet to be added for the issue 0 - Waiting on User Insufficient information for issue or PR, issue may be closed if no response from user and removed 0 - Backlog Issue is accepted, but is not ready to be worked on or not in current sprint Improvement Issues that enhances existing functionality, or adds new features Hacktoberfest labels Oct 8, 2019
@hobbes
Copy link

hobbes commented Oct 9, 2019

As boxstarter needs choco to do its things, I think that the install script should gracefully fail when choco cannot be installed.
By gracefully, I mean with a usefull error message, and leaving the system in a state where boxstarter is not half installed.

@pauby pauby added 0 - Backlog Issue is accepted, but is not ready to be worked on or not in current sprint Bug Issues where something has happened which was not expected or intended and removed 0 - Waiting on User Insufficient information for issue or PR, issue may be closed if no response from user 0 - _Triaging Issue is accepted, but a milestone has yet to be added for the issue labels Oct 9, 2019
@pauby pauby added Hacktoberfest Priority_HIGH Issues that are considered to be a high priority to get fixed labels Oct 9, 2019
@pauby pauby added this to the v2.13.0 milestone Oct 9, 2019
@pauby
Copy link
Member

pauby commented Oct 9, 2019

Boxstarter doesn't need choco for everything. It needs choco to install packages.

The way you are bootstrapping Boxstarter causes it to download and install Chocolatey to get Boxstarter installed.

I've been looking at this from the wrong side. We should detect and stop if the bootstrapping fails. You're right.

@pauby pauby added 4 - Done Code has been added to the repository, and has been reviewed by a team member and removed 0 - Backlog Issue is accepted, but is not ready to be worked on or not in current sprint labels Oct 10, 2019
mwallner pushed a commit that referenced this issue Oct 10, 2019
@pauby pauby changed the title Boxstarter should detect if Chocolatey can be installed Boxstarter should detect if Chocolatey can be installed and stop gracefully Oct 19, 2020
@pauby pauby added 5 - Released The issue has been resolved, and released to the public for consumption and removed 4 - Done Code has been added to the repository, and has been reviewed by a team member labels Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Released The issue has been resolved, and released to the public for consumption Bug Issues where something has happened which was not expected or intended Priority_HIGH Issues that are considered to be a high priority to get fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants