Skip to content
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.ps1 fails to fetch resources due to TLS 1.2 not active by default #421

Closed
JesseNaranjo opened this issue Feb 23, 2018 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@JesseNaranjo
Copy link

JesseNaranjo commented Feb 23, 2018

Actual behavior

Executing the Install.ps1 script fails to fetch resources from GitHub.com, causing install to fail on Windows systems.

Output (including error messages produced):

C:\<...snip...>\Wiki.js install.ps1
 __    __ _ _    _    _     
/ / /\ \ (_) | _(_)  (_)___ 
\ \/  \/ / | |/ / |  | / __|
 \  /\  /| |   <| |_ | \__ \
  \/  \/ |_|_|\_\_(_)/ |___/
                   |__/     
   < INSTALL >

Specify the full path where Wiki.js should be installed (e.g. C:\wiki):
Path: C:\Wiki.js
[1/6] Fetching 7zip helper... OK
[2/6] Fetching latest build... Exception calling "DownloadFile" with "2" argument(s): "The request was aborted: Could not create SSL/TLS secure channel."
At C:\<...snip...>\Wiki.js install.ps1:61 char:1
+ $downloader.DownloadFile("https://github.com/Requarks/wiki/releases/d ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException
 
OK
[3/6] Fetching dependencies... Exception calling "DownloadFile" with "2" argument(s): "The request was aborted: Could not create SSL/TLS secure channel."
At C:\<...snip...>\Wiki.js install.ps1:65 char:1
+ $downloader.DownloadFile("https://github.com/Requarks/wiki/releases/d ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException
 
OK
[4/6] Extracting app files... Error: 7-Zip encountered a fatal error while extracting the files
At C:\<...snip...>\Wiki.js install.ps1:45 char:9
+     2 { throw "Error: 7-Zip encountered a fatal error while extractin ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Error: 7-Zip en...cting the files:String) [], RuntimeException
    + FullyQualifiedErrorId : Error: 7-Zip encountered a fatal error while extracting the files

Expected behavior

All resources download successfully and Wiki.js is fully installed.

Expected output (received after adding line in "Solution" section below):

C:\<...snip...>\Wiki.js install.ps1
 __    __ _ _    _    _     
/ / /\ \ (_) | _(_)  (_)___ 
\ \/  \/ / | |/ / |  | / __|
 \  /\  /| |   <| |_ | \__ \
  \/  \/ |_|_|\_\_(_)/ |___/
                   |__/     
   < INSTALL >

Specify the full path where Wiki.js should be installed (e.g. C:\wiki):
Path: C:\Wiki.js
[1/6] Fetching 7zip helper... OK
[2/6] Fetching latest build... OK
[3/6] Fetching dependencies... OK
[4/6] Extracting app files... OK
[5/6] Extracting dependencies... OK
[6/6] Creating config file... OK
[6/6] Removing installation files... 
Installation Complete

Thank you for installing Wiki.js!
Please consider donating to our open collective to help maintain this project:
https://opencollective.com/wikijs/donate

- Launch configuration wizard: node wiki configure
- Start Wiki.js server: node wiki start

Steps to reproduce the behavior

Running the Install.ps1 script on Windows Server 2016 without any configuration changes. This probably has more to do with PowerShell than with Windows directly.

Solution

Append the following line at the top of the script to instruct PowerShell to prioritize the use of TLS 1.2.

[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"

This is a working copy of the Install.ps1 script with the modification - it's the very first line.

Wiki.js install.ps1.txt

@NGPixel NGPixel self-assigned this Feb 23, 2018
@NGPixel NGPixel added the bug Something isn't working label Feb 23, 2018
@NGPixel
Copy link
Member

NGPixel commented Feb 23, 2018

Install script was updated. Thanks!

@NGPixel NGPixel closed this as completed Feb 23, 2018
@JesseNaranjo
Copy link
Author

That was quick! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants