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

Latest OneGet install seems to break PowerShellGet on Windows 7/PowerShell 4.0 #112

Closed
gwojan opened this issue Mar 9, 2015 · 23 comments
Closed

Comments

@gwojan
Copy link

gwojan commented Mar 9, 2015

I tried Find-Module and get:

PS> Find-Module
WARNING: The property 'Role' cannot be found on this object. Verify that the property exists.

The version installed is 1.15.65.21517. I have not tested on Windows 8.1/Server 2012 R2.

@fearthecowboy
Copy link
Contributor

How very strange.

I'll look into it right now.

@fearthecowboy
Copy link
Contributor

Does Find-Package work?

@fearthecowboy
Copy link
Contributor

and can you run :

$debugPreference = "Continue"
find-module -verbose 

And show me the output?

@gwojan
Copy link
Author

gwojan commented Mar 9, 2015

Find-Package works but writes 'WARNING: The property 'Role' cannot be found on this object. Verify that the property exists.' if no package is provided.

1845# Find-Module -Verbose
DEBUG: 00:00:00.0000003 In PSModule Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0060008 In PSModule Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0159791 In PSModule Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0330256 In PSModule Provider - 'Find-Package'.
DEBUG: 00:00:00.0333045 OPTION: MessageResolver => Microsoft.PowerShell.OneGet.Cmdlets.GetMessageString
DEBUG: 00:00:00.0334141 OPTION: ProviderName => PSModule
DEBUG: 00:00:00.0335259 OPTION: Verbose => True
VERBOSE: The -Repository parameter was not specified. PowerShellGet will use all of the registered repositories.
VERBOSE: Getting the provider object for the OneGet Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/' and OneGetProvider is 'NuGet'.
DEBUG: 00:00:00.0402067 Calling 'NuGet::FindPackage' '','','','0'
DEBUG: 00:00:00.0402316 Iterating
DEBUG: 00:00:00.0402488 Done Iterating
DEBUG: 00:00:00.0402668 Iterating
DEBUG: 00:00:00.0666725 Calling 'ProviderService::GetKnownFolder'
DEBUG: 00:00:00.0673975 Searching repository 'https://www.powershellgallery.com/api/v2/' for ''
DEBUG: 00:00:00.3594633 Yielding
DEBUG: 00:00:00.3597357 Yielding
DEBUG: 00:00:00.3599970 Yielding
DEBUG: 00:00:00.3603665 Yielding
DEBUG: 00:00:00.3605326 Yielding
DEBUG: 00:00:00.3607525 Yielding
DEBUG: 00:00:00.3610809 Yielding
DEBUG: 00:00:00.3613232 Yielding
DEBUG: 00:00:00.3615637 Yielding
DEBUG: 00:00:00.3617532 Yielding
DEBUG: 00:00:00.3621021 Yielding
DEBUG: 00:00:00.3623954 Yielding
DEBUG: 00:00:00.3625526 Yielding
DEBUG: 00:00:00.3628092 Yielding
DEBUG: 00:00:00.3631596 Yielding
WARNING: The property 'Role' cannot be found on this object. Verify that the property exists.
DEBUG: 00:00:00.3636468 Yielding
.
. Deleted a few duplicate lines here
.
DEBUG: 00:00:00.4828426 Yielding
DEBUG: 00:00:00.4060125 MSG:ScriptStackTrace «at New-SoftwareIdentityFromPackage, C:\Program Files
(x86)\WindowsPowerShell\Modules\PowerShellGet\PSGet.psm1: line 3009
at Find-Package, C:\Program Files (x86)\WindowsPowerShell\Modules\PowerShellGet\PSGet.psm1: line 2684»

@fearthecowboy
Copy link
Contributor

Ah perfect, I see what happened.

Role got turned into Roles -- I didn't realize that PowerShellGet used that.

I'll have the developer take a look at that today.

G

@gwojan
Copy link
Author

gwojan commented Mar 9, 2015

Sweet! Thanks. :D

@fearthecowboy
Copy link
Contributor

try the latest: http://oneget.org/install-oneget-1.15.68.37192.exe

(close powershell before installing if you want to skip the reboot)

This one should work now; I fixed the bug, and sync'd with the latest PowerShellGet code (hopefully that's not introducing problems ;P ).

G

@gwojan
Copy link
Author

gwojan commented Mar 9, 2015

Thank you! The new version is now installed. Find-Module now works but it only returns 24 packages if run with no arguments where previously would return all 100+ packages.

@fearthecowboy
Copy link
Contributor

Hmm.

It's possible that I wasn't supposed to grab that version yet. Gimme a day to find out what's going on...

@gwojan
Copy link
Author

gwojan commented Mar 9, 2015

No problem. Thanks again. At least I can filter by name now and get something sensible.

@fearthecowboy
Copy link
Contributor

Ah crap. I think I found another bug.. If a dependency hasn't got a version, it's abending the whole request. FFS.

@fearthecowboy
Copy link
Contributor

The latest build : http://oneget.org/install-oneget-1.15.69.22059.exe should fix that last problem

G

@gwojan
Copy link
Author

gwojan commented Mar 12, 2015

Thanks Garrett. Find-Module now appears to work as expected. However attempting to install a module with this version and the newest version, 1.15.69.28170, I see the following errors but The modules do appear to install correctly.

2030# Install-Module pester
The property 'SourceNotFound' cannot be found on this object. Verify that the property exists.
At C:\Program Files (x86)\WindowsPowerShell\Modules\powershellget\PSGet.psm1:121 char:16
+                   $SourceNotFound = $LocalizedData.SourceNotFound
+                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], PropertyNotFoundException
    + FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'RepositoryIsNotTrusted' cannot be found on this object. Verify that the property exists.
At C:\Program Files (x86)\WindowsPowerShell\Modules\powershellget\PSGet.psm1:123 char:17
+                 $RepositoryIsNotTrusted = $LocalizedData.RepositoryIsNotTrusted
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], PropertyNotFoundException
    + FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'SourceNotFound' cannot be found on this object. Verify that the property exists.
At C:\Program Files (x86)\WindowsPowerShell\Modules\powershellget\PSGet.psm1:121 char:16
+                   $SourceNotFound = $LocalizedData.SourceNotFound
+                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], PropertyNotFoundException
    + FullyQualifiedErrorId : PropertyNotFoundStrict

The property 'RepositoryIsNotTrusted' cannot be found on this object. Verify that the property exists.
At C:\Program Files (x86)\WindowsPowerShell\Modules\powershellget\PSGet.psm1:123 char:17
+                 $RepositoryIsNotTrusted = $LocalizedData.RepositoryIsNotTrusted
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], PropertyNotFoundException
    + FullyQualifiedErrorId : PropertyNotFoundStrict


The package(s) come from a package source that is not marked as trusted.
Are you sure you want to install software from 'https://www.powershellgallery.com/api/v2/'?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):

@fearthecowboy
Copy link
Contributor

grr. I must have missed something when merging from the internal repo.

Gimme a few minutes, I'll see what I can do.

G

@fearthecowboy
Copy link
Contributor

Try the latest build : http://oneget.org/install-oneget-1.15.72.26175.exe

Note: recent changes have broken get-package for PowerShellGet -- I don't think that should break anything else tho;

@gwojan
Copy link
Author

gwojan commented Mar 13, 2015

You're way too quick! ;-)

I see you posted another later release on Twitter. I'm guessing I should test that one? What's the difference between x.26175 and x.28306?

@fearthecowboy
Copy link
Contributor

I'm incrementally fixing bugs... the last one changes the way that -IncludeDependencies works -- a few days ago I made a change where when a provider returns a package they can now return dependency references with the package (which can even be cross-provider dependencies!), and then a new API that for finding arbitrary dependencies based on those references.

For an example, run:

# show the dependency references for zlib 
(find-package -provider nuget -source http://nuget.org/api/v2 zlib ).Dependencies

#show a package with it's dependencies:
find-package -provider nuget -source http://nuget.org/api/v2 zlib -includedependencies | fl

# look at the .Status to see which are dependencies

@gwojan
Copy link
Author

gwojan commented Mar 23, 2015

@fearthecowboy The latest experimental build, 1.15.79.25169, PowerShellGet appears to be broken again. Both Find-Module and Install-Module fail with the following warning:

WARNING: Unable to index into an object of type Microsoft.OneGet.Packaging.SoftwareIdentity.

@fearthecowboy
Copy link
Contributor

Ah, ok.

We had a set of internal changes that went thru the end of last week; I think I have to sync my copy of PowerShellGet again.

@fearthecowboy
Copy link
Contributor

Try now!

#OneGet EXPERIMENTAL build available: http://oneget.org/install-oneget-1.15.82.35272.exe

@Ma-XX-oN
Copy link

Hi, this still seems to be a problem under Windows 8.1. I don't want to install any experimental builds, especially old ones, so, how can I download and install oneget? I've done what it says, less changing to the wip branch, and it seems to do get to the tests, but it fails on 'Invoke-Pester':

Running powershell pester tests
Invoke-Pester : The term 'Invoke-Pester' 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.
At D:\Projects\oneget\Test\run-tests.ps1:170 char:1
+ Invoke-Pester -Path "$($TestHome)\ModuleTests\tests"
+ ~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Invoke-Pester:String) [], Comma
   ndNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Finished tests

I'm not sure what I'm to do now. When I go back into the ISE, and click on the Accept button here:

image

I get an Initialization failed. Unable to find package provider 'NuGet'.. So what now?

Maxx

@Jaykul
Copy link

Jaykul commented Jan 27, 2016

Invoke-Pester is from the Pester module, you'll need to install that if you want to run the tests. Beyond that, I don't know why you'd be getting an error with the NuGet provider.

My suggestion would be to install the down-level (pre)release bits which seem to be the latest until the WMF 5 Release is fixed. You can follow the links from the PowerShellGallery front page.

@quoctruong
Copy link

Hi Ma-XX-oN. The .exe that you are using install a very old version of OneGet. If you want the latest build, you can get it from the master branch. We updated it about 2 weeks ago.

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

No branches or pull requests

5 participants