Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Not installing on Windows 10 w/ non-english locales #1290

Open
maartenvandamme81 opened this issue Jun 22, 2017 · 18 comments
Open

Not installing on Windows 10 w/ non-english locales #1290

maartenvandamme81 opened this issue Jun 22, 2017 · 18 comments

Comments

@maartenvandamme81
Copy link

Description

Chefdk does not install on Windows 10 Creators edition. I have tried the most recent version of chefdk and older versions but they all fail with error code 1603. I think its related to the fact that this Windows version comes by default with .NET framework 4.7 with no option to revert to .NET framework 4.6.2.

Are you working on an update of chefdk to be compatible with the latest version of Windows or .NET framework?

ChefDK Version

Version 1.5.0

Platform Version

Windows 10 Creators edition (1703)

@stuartpreston
Copy link

I'm running Windows 10 v1703 and did not have any problems installing 1.5.0 - there may be some errors visible in a verbose log. Try installing using msiexec /i chefdk-1.5.0-1-x86.msi /l*V chefdk-install.log and inspecting the log when you get the failure?

@maartenvandamme81
Copy link
Author

maartenvandamme81 commented Jun 22, 2017

Thanks Stuart, I see multiple error messages in the log file but it doesn't help me to find a solution to fix this issue. I have attached the install log file. Note that I am running the installer on a clean install of Windows 10 - 1703; Did your Windows version got upgraded to 1703 or was it a clean install of 1703?

I have tried installing from different accounts but no luck. i have tried installing chefdk on my laptop (also running 1703) and there I have the same issue. Any help on this is greatly appreciated.

Update: I just tested a clean install of the same Windows 10 ISO in a vm, and I managed to install Chef on it without problem, must be something I did post install that is causing the trouble.

chefdk-install.txt

@stuartpreston
Copy link

The stack trace in your log seems to indicate the unzipping of the ChefDK contents on your original system failed with the following error: "1 is not a supported code page." which is a very curious error.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: 1 is not a supported code page.
Parameter name: codepage
   at System.Text.Encoding.GetEncoding(Int32 codepage)
   at ICSharpCode.SharpZipLib.Zip.ZipFile.ReadEntries()
   at ICSharpCode.SharpZipLib.Zip.ZipFile..ctor(Stream stream)
   at ICSharpCode.SharpZipLib.Zip.FastZip.ExtractZip(Stream inputStream, String targetDirectory, Overwrite overwrite, ConfirmOverwriteDelegate confirmDelegate, String fileFilter, String directoryFilter, Boolean restoreDateTime, Boolean isStreamOwner)
   at CustomActionFastMsi.CustomActions.FastUnzip(Session session)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object parameters, Object arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture)
   at Microsoft.Deployment.WindowsInstaller.CustomActionProxy.InvokeCustomAction(Int32 sessionHandle, String entryPoint, IntPtr remotingDelegatePtr)
CustomAction FastUnzip returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)

I can see in the log you are using an English (1033) system locale but are the are any other regional settings that may be applied here?

@maartenvandamme81
Copy link
Author

maartenvandamme81 commented Jun 23, 2017

Thank you Stuart, you were absolutely right. I had indeed changed location and keyboard settings. Even when reverting those to default (US) chefdk still refused to install. This morning I installed Windows from scratch, using the default settings (location us, keyboard us, timezone pacific) and I was able to install chefdk without issues. After the install I changed my regional settings and chefdk is still working fine.

Still seems like a bug with chefdk. Anyway, thanks for your help on this Stuart, much appreciated.

@stuartpreston
Copy link

Glad you are unblocked - please could you provide the location and keyboard settings from your original system? Also the output of running chcp in a cmd window?

@maartenvandamme81
Copy link
Author

Sure. Location: Switzerland, Keyboard: Swiss French, time zone: Amsterdam, Berlin, Bern, ...

chcp output (run on the new Windows install): Active code page: 437

@derwasp
Copy link

derwasp commented Jun 26, 2017

Just saying that I also ran into the same issue, but I don't know what was the original location set for my laptop, since it was given to me by my employer.
I would very much appreciate a solution.

@SympaHannuPiki
Copy link

SympaHannuPiki commented Jul 4, 2017

I just received brand new laptop with Creators edition pre-installed (1703, 15063.413) and run into same problem with exactly same codepage 1 error. Only things I have installed before ChefDK installation, was Visual Studio 2017.2 Enterprise with basically everything and msysgit. Below some information I did dug with help of @stuartpreston:

[System.Threading.Thread]::CurrentThread.CurrentCulture.TextInfo

ANSICodePage   : 1252
OEMCodePage    : 850
MacCodePage    : 10000
EBCDICCodePage : 20278
LCID           : 1035
CultureName    : fi-FI
IsReadOnly     : False
ListSeparator  : ;
IsRightToLeft  : False

@stuartpreston
Copy link

Thanks for the additional report, @SympaHannuPiki

I acquired the Finnish ISO for Windows 10 and installed it with all the defaults (Suomi). I was able to successfully install ChefDK 1.5.0 using the command above.

image

image

As this worked correctly, the only thing common in the issue at the moment appears to be that your laptops arrived with an OEM install of Windows and in a non-English locale.

Here's the gist with the install.log in case you are able to compare against your failing one:
https://gist.github.com/stuartpreston/9663c5cc7c1a2e693cdee82ef2d6e6f0

@SympaHannuPiki
Copy link

SympaHannuPiki commented Jul 5, 2017

@stuartpreston, you can find my log file from here: https://gist.github.com/SympaHannuPiki/2879d1a84fd4688ba0299065dcd1d444

I made comparison, removed timestamps first to make it easier... but didn't found much before the actual error, except you didn't have system restore enabled and it failed on background. I did enable it earlier as I thought it was causing the problem, but no change.

@SympaHannuPiki
Copy link

I just got more information from vendor:
Media used to install OS: Windows 10 Enterprise, Version 1703 (Updated Mar '17) 64 Bit English | X21-36478. US version, not international.

@cheeseplus cheeseplus changed the title Not installing on Windows 10 Creators edition Not installing on Windows 10 w/ non-english locales Jul 12, 2017
@bronislavs
Copy link

Hi.

Same ERROR for me.
New LapTop.
OEM installed Windows.
Region Germany.
Is there any progress or workaround on this issue?

@tknerr
Copy link
Contributor

tknerr commented Aug 17, 2017

Same issue here, trying to install ChefDK 1.5.0 on Windows 10 Creators Update. This is what I get in the chefdk-install.log:

Starting FastUnzip
FASTZIPDIR = C:\opscode\
FASTZIPAPPNAME = chefdk
Starting extraction
Exception thrown by custom action:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: 1 is not a supported code page.
Parameter name: codepage
   at System.Text.Encoding.GetEncoding(Int32 codepage)
   at ICSharpCode.SharpZipLib.Zip.ZipFile.ReadEntries()
   at ICSharpCode.SharpZipLib.Zip.ZipFile..ctor(Stream stream)
   at ICSharpCode.SharpZipLib.Zip.FastZip.ExtractZip(Stream inputStream, String targetDirectory, Overwrite overwrite, ConfirmOverwriteDelegate confirmDelegate, String fileFilter, String directoryFilter, Boolean restoreDateTime, Boolean isStreamOwner)
   at CustomActionFastMsi.CustomActions.FastUnzip(Session session)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object parameters, Object arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture)
   at Microsoft.Deployment.WindowsInstaller.CustomActionProxy.InvokeCustomAction(Int32 sessionHandle, String entryPoint, IntPtr remotingDelegatePtr)
CustomAction FastUnzip returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 4:20:21: InstallFinalize. Return value 3.

Played around with setting locale / region and keyboard settings, always rebooting inbetween, but nothing helped so far.

Code page:

C:\tools\installers>chcp
Active code page: 437

Windows version:

PS C:\tools\installers> [System.Environment]::OSVersion.Version

Major  Minor  Build  Revision
-----  -----  -----  --------
10     0      15063  0

Culture:

PS C:\tools\installers> [System.Threading.Thread]::CurrentThread.CurrentCulture.TextInfo


ANSICodePage   : 1252
OEMCodePage    : 437
MacCodePage    : 10000
EBCDICCodePage : 37
LCID           : 1033
CultureName    : en-US
IsReadOnly     : False
ListSeparator  : ,
IsRightToLeft  : False

Any ideas?

/cc @damphyr @krystianmali

@tknerr
Copy link
Contributor

tknerr commented Aug 17, 2017

FYI - found a workaround here:
https://forums.sonarr.tv/t/update-process-failed-1-is-not-a-supported-code-page/3253/10

Another way to fix this is to actually change the system settings of the Windows Machine to English. This can be done from Control Panel > Region > Administrative Tab > Copy Settings.

The "Copy Settings" to user and system accounts did the trick for me

@stuartpreston
Copy link

Thanks @tknerr for providing the additional report and clarifying the workaround, that's useful to know and sorry this isn't a delightful experience on non-English locale systems.

As you can probably see from your own debug, we use a .NET library (SharpZipLip) embedded in an MSI CustomAction to extract the .zip file with the ChefDK contents onto the machine. Unfortunately, the .zip file format does not specify a codepage for the filenames, so the library has to attempt to autodetect the codepage by inspecting the contents of the .zip file. I suspect that as we build on an English language system and none of the filenames are unicode, this codes the filenames in a certain way that means later when we try and unpack on a non-English system with a wider character set we get this failure.

The library we use is slightly old though, I'm hoping that we may be able to resolve this by bumping up the versions and/or making some changes to force the zip file to be read correctly. Sorry for the inconvenience.

@figaw
Copy link

figaw commented Aug 25, 2017

@tknerr I did the "Copy Settings" workaround, but I didn't have to change my language settings, I simply checked the two boxes and rebooted my system. I'm on a danish installation.

Code page:

C:\>chcp
Active code page: 437

Windows version:

PS C:\> (Get-ItemProperty -Path c:\windows\system32\hal.dll).VersionInfo.FileVersion
10.0.15063.502 (WinBuild.160101.0800)

Culture:

PS C:\> [System.Threading.Thread]::CurrentThread.CurrentCulture.TextInfo

ANSICodePage   : 1252
OEMCodePage    : 850
MacCodePage    : 10000
EBCDICCodePage : 20277
LCID           : 1030
CultureName    : da-DK
IsReadOnly     : False
ListSeparator  : ;
IsRightToLeft  : False

@SympaHannuPiki
Copy link

Another workaround is to install it manually as I did:

  1. Download preferred .msi file
  2. Extract that file (I used 7-zip)
  3. Extract content of largest file from output directory of previous step into c:\opscode\chef
    3.1 Feel free to use some other path as well, but then you might need to alter following steps a bit
  4. Rename "StartChefDkScript" PowerShell file found from step 2 directory to StartChefDkScript.ps1 and execute it as an administrator
  5. Now it should work

@CuchulainX
Copy link

I encountred same issues with installs here in Germany with International codepage 850

Execute the command with the code page for US
chcp 437
followed by

$result = Start-Process msiexec.exe -Wait -PassThru -ArgumentList "/qn /L*v msiexec_log.log /i $(Get-Location)\chefdk-x64.msi"
$result.ExitCode

All should be well
Best
/Cuchulain

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

9 participants