This project is read-only.

Errors installing and downloading packages in version 1.1

Topics: Administration, Installing Orchard, Troubleshooting
Apr 14, 2011 at 1:48 PM


I'm geting the following errors when I try to install the Code Generation (version 1.1.30) and the Advanced Menu packages (version 1.2.1). I'm assuming other modules will have the same problems.

These errors are from the log file. The error message displayed to the user about permissions seems to be a little misleading since the actual error is a null argument exception, but that's an assumption on my part. I'm testing this locally, trying both the WebMatrix IIS Express and the Visual Studio default Web Server and I'm using a Sql Server compact database.

I followed the instructions for the clean install for version 1.1. I also tried this with the default database created with a new install as opposed to copying in my app_data folder from my 1.0 version. With version 1.0, I never had a problem installing modules.

Package Install error:

2011-04-14 00:41:39,025 [9] Orchard.Packaging.Controllers.PackagingServicesController - Package installation failed.
Orchard.OrchardException: There was an error installing the requested package. This can happen if the server does not have write access to the '~/Modules' or '~/Themes' folder of the web site. If the site is running in shared hosted environement, adding write access to these folders sometimes needs to be done manually through the Hoster control panel. Once Themes and Modules have been installed, it is recommended to remove write access to these folders. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: input
   at System.Version.Parse(String input)
   at Orchard.Packaging.Services.ExtensionReferenceRepository.<GetPackages>b__4(<>f__AnonymousType1`2 <>h__TransparentIdentifier0)
   at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x)
   at System.Linq.Enumerable.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__0.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__0.MoveNext()
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   at NuGet.PackageRepositoryExtensions.FindPackage(IPackageRepository repository, String packageId, Version version)
   at NuGet.PackageRepositoryExtensions.FindPackage(IPackageRepository repository, String packageId)
   at NuGet.ProjectInstallWalker.OnBeforeDependencyWalk(IPackage package)
   at NuGet.PackageWalker.Walk(IPackage package)
   at NuGet.InstallWalker.ResolveOperations(IPackage package)
   at NuGet.ProjectManager.Execute(IPackage package, IPackageOperationResolver resolver)
   at NuGet.ProjectManager.AddPackageReference(IPackage package, Boolean ignoreDependencies)
   at NuGet.ProjectManager.AddPackageReference(String packageId, Version version, Boolean ignoreDependencies)
   at NuGet.ProjectManager.AddPackageReference(String packageId, Version version)
   at Orchard.Packaging.Services.PackageInstaller.ExecuteInstall(IPackage package, IPackageRepository packageRepository, String sourceLocation, String targetPath)
   at Orchard.Packaging.Services.PackageInstaller.InstallPackage(IPackage package, IPackageRepository packageRepository, String location, String applicationPath)
   at Orchard.Packaging.Services.PackageInstaller.Install(String packageId, String version, String location, String applicationPath)
   at Orchard.Packaging.Services.PackageManager.<>c__DisplayClass8.<Install>b__7()
   at Orchard.Packaging.Services.PackageManager.DoInstall(Func`1 installer)
   --- End of inner exception stack trace ---
   at Orchard.Packaging.Services.PackageManager.DoInstall(Func`1 installer)
   at Orchard.Packaging.Services.PackageManager.Install(String packageId, String version, String location, String applicationPath)
   at Orchard.Packaging.Controllers.PackagingServicesController.InstallGallery(String packageId, String version, Int32 sourceId, String redirectUrl)

I also tried the download option and then the "Install a module from your computer" on the Modules / Installed tab. I get a different error but I assume it is related to when I tried to use the install option:

Download / Install from computer error:

2011-04-14 00:42:19,973 [9] Orchard.Packaging.Controllers.PackagingServicesController - Package uploading and installation failed.
System.IO.FileFormatException: File contains corrupted data.
   at MS.Internal.IO.Zip.ZipIOEndOfCentralDirectoryBlock.FindPosition(Stream archiveStream)
   at MS.Internal.IO.Zip.ZipIOEndOfCentralDirectoryBlock.SeekableLoad(ZipIOBlockManager blockManager)
   at MS.Internal.IO.Zip.ZipArchive..ctor(Stream archiveStream, FileMode mode, FileAccess access, Boolean streaming, Boolean ownStream)
   at MS.Internal.IO.Zip.ZipArchive.OpenOnStream(Stream stream, FileMode mode, FileAccess access, Boolean streaming)
   at System.IO.Packaging.ZipPackage..ctor(Stream s, FileMode mode, FileAccess access, Boolean streaming)
   at System.IO.Packaging.Package.Open(Stream stream, FileMode packageMode, FileAccess packageAccess, Boolean streaming)
   at System.IO.Packaging.Package.Open(Stream stream)
   at NuGet.ZipPackage.EnsureManifest()
   at NuGet.ZipPackage..ctor(String fileName)
   at Orchard.Packaging.Controllers.PackagingServicesController.InstallLocally(String redirectUrl)

Thanks for any help you can provide


Apr 19, 2011 at 6:32 PM
Edited Apr 19, 2011 at 6:34 PM

I just tried installing both of these modules from 1.1.30 using the online gallery, and could not repro the issue, both installed fine (btw, the CodeGeneration module latest version was already installed by default)

Given the error message you're getting, I suspect that the account you're running IIS Express under (that should be the currently logged in user) does not have adequate "write" permissions to the various folders (including the "modules" subfolder) in your Orchard site.  Make sure that your user account that is running IIS Express has those permissions.

Apr 20, 2011 at 3:58 AM

With a clean install, I was able to install these modules without problems, but the problem I was having was when I was trying to upgrade from Orchard 1.0. The previous version of the Hierarchical menu for Orchard 1.0 caused an exception in version 1.1 so I tried uninstalling it using nuget. Also, copying in my Orchard 1.0 App_Data folder allowed me to upgrade the modules per the upgrade instructions, but I just couldn't install any new ones.

We haven't really done much with Orchard yet, so it was easier for us to just start out from scratch with 1.1.

I didn't have to adjust any folder permissions locally with the clean install for Orchard 1.0 or Orchard 1.1, so I don't think the problem I was having had anything to do with permissions. I don't know why the input value for the System.Version.Parse(String input) method above would be null, but that was the cause of the problem.

Since we're starting out from scratch again with 1.1, for us, the issue has been resolved, but others may have similar problems.

Thanks for the feedback.

Apr 20, 2011 at 5:07 AM

Did you enable the Recipes feature?

Apr 20, 2011 at 5:38 AM

Yes, I enabled the Recipies feature and followed the other instructions in the upgrade page. I tried both the clean upgrade and the no-so-clean upgrade and couldn't get it working. That's why we ended up just starting from scratch with Orchard 1.1.

I wonder if the System.Version.Parse error was a result of something in the database. Perhaps some module didn't set the version info when installing so the system threw an exception when trying to do the upgrade. We had installed only the Open Authentication and the Hiearchical Menu modules for Orchard 1.0.

Hopefully, subsequent upgrades for third party modules, or at least the ones we tried to install, won't have these problems.