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

Web installer fails to find ChocolateyInstaller.psm1 #330

Closed
DarwinJS opened this issue Jun 15, 2015 · 20 comments
Closed

Web installer fails to find ChocolateyInstaller.psm1 #330

DarwinJS opened this issue Jun 15, 2015 · 20 comments

Comments

@DarwinJS
Copy link
Contributor

Ran the web installer just now and got:

Import-Module : The specified module 'C:\Users\ProtectedAdmin\AppData\Local\Tem
p\chocolatey\chocInstall\tools\chocolateyInstall\helpers\chocolateyInstaller.ps
m1' was not loaded because no valid module file was found in any module directo
ry.
At C:\Users\ProtectedAdmin\AppData\Local\Temp\chocolatey\chocInstall\tools\choc
olateysetup.psm1:46 char:16

  • Import-Module <<<< $installModule -Force
  • CategoryInfo : ResourceUnavailable: (C:\Users\Protec...yInstall
    er.psm1:String) [Import-Module], FileNotFoundException
  • FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Comm
    ands.ImportModuleCommand

Then a bunch of failures on all follow chocolatey CMDLets used to setup

In the above folder there is only one .PSM1 called chocolateysetup.psm1.

The downloaded Chocolatey.zip does not contain the file either.

@ferventcoder
Copy link
Member

It has to unpack it from choco, but to do that you need .NET Framework 4.0+ installed and able to be used. The installer attempts this but it may not be able to do so.

@ferventcoder
Copy link
Member

Can you verify this is the issue?

@ferventcoder
Copy link
Member

ping @DarwinJS

@DarwinJS
Copy link
Contributor Author

Sorry Rob - been out for a week. I've had it happen several times more.

I believe I have isolated it to Windows 7 RTM.

When I started with a clean VM with no SP1 - it did not work. After reseting the VM and installing SP1, it did work.

Both tests were conducted on 32-bit - I don't have an x64 VM without SP1.

I'm not sure how far back you intend to go, but maybe if pre-SP1 is not supported, you might want to indicate the required service pack in documentation and then also have the installer error out with RTM. Although this would likely also affect 2008 R2, hypervisors templates have for 2008 R2, have SP1 applied.

I feel like I'm you're "oldest possible versions of Windows and PowerShell" tester - but I promise that that it has not been by design - just circumstance :)

D.

@ferventcoder
Copy link
Member

Is it that you have to install sp1 to install .net4?

@DarwinJS
Copy link
Contributor Author

I checked that and it seems like RTM should be OK for .NET 4.0 (http://www.microsoft.com/en-US/download/details.aspx?id=17851).

Also - if that is the problem, the .NET installer does not seem to be generating an error (but I didn't dig very deep). Are you putting on 4.0?

I am running another test to see if .NET is successfully installed.

@DarwinJS
Copy link
Contributor Author

Ok, I ran the .NET version detector and it shows 4.0 installed. Folders are there. No errors.

The originally reported errors appear immediately after dot net install.

I figured out a restart does fix the situation - however, this is not required with any other post-SP1 scenario.

Hmm - with a restart fixing it I am thinking "edge case" - not sure if it is worth it for you to add warnings for RTM?

D.

@gep13
Copy link
Member

gep13 commented Jun 22, 2015

.NET version detector

What is this, and where can I get it? 😄 I always end up digging around the folder structure, and looking at registry keys!

@ferventcoder
Copy link
Member

The problem as I understand it is that even though .net 4 is installed, it is not usable without a reboot. Is that a fair assessment?

@DarwinJS
Copy link
Contributor Author

Yes, with the qualification that I didn't fully verify that it was .NET
itself that needed the reboot - however, it is likely since there was a
"windows update" on both the shutdown and startup screens. Maybe for RTM
is applies some optional Windows updates?

Dot net version detector is NOT a .net program itself and can be found
here: http://www.asoft.be/prod_netver.html

I wanted to do a chocolatey package, but it is a redirected URL rather than
a link right to the file name. I thought I saw a package done with one of
these - but can't remember where - do you know an example?

D.

On Mon, Jun 22, 2015 at 2:52 PM, Rob Reynolds notifications@github.com
wrote:

The problem as I understand it is that even though .net 4 is installed, it
is not usable without a reboot. Is that a fair assessment?


Reply to this email directly or view it on GitHub
#330 (comment).

@gep13
Copy link
Member

gep13 commented Jun 22, 2015

@DarwinJS said...
Dot net version detector is NOT a .net program itself and can be found
here: http://www.asoft.be/prod_netver.html

Thanks, hadn't seen that before.

@DarwinJS
Copy link
Contributor Author

I packaged this for chocolatey.

I called it "dotnetversiondetector" rather than "netversiondetector"
because without the word "dot" it seems it could easily be mistaken for
something to do with networking rather than dot net.

Fyi,
D.

On Mon, Jun 22, 2015 at 3:57 PM, Gary Ewan Park notifications@github.com
wrote:

@DarwinJS https://github.com/DarwinJS said...
Dot net version detector is NOT a .net program itself and can be found
here: http://www.asoft.be/prod_netver.html

Thanks, hadn't seen that before.


Reply to this email directly or view it on GitHub
#330 (comment).

@gep13
Copy link
Member

gep13 commented Jun 25, 2015

@DarwinJS said...
I packaged this for chocolatey.

Noice!

@ferventcoder
Copy link
Member

I feel like I'm you're "oldest possible versions of Windows and PowerShell" tester - but I promise that that it has not been by design - just circumstance :)

Actually unless you are going as far back as 2003 and XP (which is not supported) you are not quite there.

@johnnyramos
Copy link

I'm seeing this issue as well within our environment:

Extracting C:\WINDOWS\TEMP\chocolatey\chocInstall\chocolatey.zip to C:\WINDOWS\TEMP\chocolatey\chocInstall...


7-Zip (A) 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18



Processing archive: C:\WINDOWS\TEMP\chocolatey\chocInstall\chocolatey.zip



Extracting  _rels\.rels

Extracting  chocolatey.nuspec

Extracting  tools\chocolateyInstall.ps1

Extracting  tools\chocolateysetup.psm1

Extracting  tools\init.ps1

Extracting  tools\chocolateyInstall\choco.exe

Extracting  tools\chocolateyInstall\choco.exe.ignore

Extracting  package\services\metadata\core-properties\dd9b8525f38f4307833cdf92549fbcb8.psmdcp

Extracting  [Content_Types].xml



Everything is Ok



Files: 9

Size:       3780921

Compressed: 1268349

Installing chocolatey on this machine
STDERR: The specified module 'C:\WINDOWS\TEMP\chocolatey\chocInstall\tools\chocolateyInstall\helpers\chocolateyInstaller.psm1' was not loaded because no valid module file was found in any module directory.The term 'Install-ChocolateyEnvironmentVariable' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

This specific machine is Windows 10 - 10.0.10240.

@johnnyramos
Copy link

So, I just noticed that the 0.9.9 packages don't come with a helpers directory. I downloaded 0.9.8.23 for giggles and it had the helpers directory within the tools\chocolateyInstall.

0.9.8.23:
098choco

0.9.9:
099choco

@ferventcoder
Copy link
Member

@johnnyramos choco unpackself --force

@ferventcoder
Copy link
Member

No idea why Windows 10 would not work out of the box though.

@ferventcoder
Copy link
Member

@johnnyramos You might subscribe to #347 - where we would perform the unpack prior to shipping.

@ferventcoder
Copy link
Member

Closing this as fixed by association with #347.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants