Umbraco Forms - Stuck in Downloading and Upgrading
Hi guys,
After receiving your e-mail concerning security issues in Umbraco Forms I started updating clients' websites that use it. I was able to update a development environment quite easily, but I'm trying to update Umbraco Forms in our live environment and it is stuck in that "Downloading and Upgrading forms" message. I'm updating it through the Update button inside the backoffice.
My current Umbraco version is 7.3.0
I'm trying to install the update as a local package but I'm getting the following error:
Could not upload file
System.Exception: Error unpacking extension... ---> System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401) at System.Web.Security.RolePrincipal..ctor(SerializationInfo info, StreamingContext context) at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName) at Umbraco.Core.Packaging.PackageBinaryInspector.ScanAssembliesForTypeReference[T](String dllPath, String[]& errorReport) at umbraco.cms.businesslogic.packager.Installer.LoadConfig(String tempDir) at umbraco.cms.businesslogic.packager.Installer.Import(String InputFile) — End of inner exception stack trace — at umbraco.cms.businesslogic.packager.Installer.Import(String InputFile) at umbraco.presentation.developer.packages.Installer.uploadFile(Object sender, EventArgs e)
Hello Richard,
I have not seen this error before and have looked into the problem and it seems to be a problem in the .NET Framework when performing searches for Loading this assembly would produce a different grant set from other instances.
Hello Richard,
Can you provide some details on how you are installing Umbraco Forms 4.1.5 please and any further details about your environment setup, so that we can try to replicate the problem.
I've tried two methods to install Umbraco Forms. The first is through the packages section of the back office, browsing for Umbraco Forms and selecting install.
The second approach I've tried is to download the latest version from the package page on our and installing it as a local package.
I've asked our hosting team to provide environment details and I'll pass them on when I receive them.
I've received the following information from our hosting team:
Windows Server 2012R2 w/ IIS + SQL Server 2012 Web Edition, kept up to date with all appropriate patches
.Net 3.5 / 4 installed
ESET Antivirus installed
If there is anything else you would like to know specifically let me know and I'll ask them.
I've just tried with version 4.2.1 and unfortunately am having the same problem.
I get the following stack trace in the logs after I try:
2016-03-21 10:38:31,350 [P6416/D2/T17] ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Exception: Error unpacking extension... ---> System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)
at System.Web.Security.RolePrincipal..ctor(SerializationInfo info, StreamingContext context)
at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName)
at Umbraco.Core.Packaging.PackageBinaryInspector.ScanAssembliesForTypeReference[T](String dllPath, String[]& errorReport)
at umbraco.cms.businesslogic.packager.Installer.LoadConfig(String tempDir)
at umbraco.cms.businesslogic.packager.Installer.Import(String InputFile)
--- End of inner exception stack trace ---
at umbraco.cms.businesslogic.packager.Installer.Import(String InputFile)
at umbraco.presentation.developer.packages.Installer.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at umbraco.BasePages.BasePage.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.umbraco_developer_packages_installer_aspx.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Hello Francielle,
Sorry to hear you are having problems updating the Umbraco Forms product to 4.1.5.
I would recommend you upgrade Umbraco Forms in your development environment and deploy the changes to your live site/environment as you normally would to ensure the changes get picked up & most likely under source control in your company's website deployment workflow.
However you should be able to update directly on a live site. Is it possible to have your browser's Developer Tools open and monitor the console for any errors or any network requests that are returning a 400 or 500 error message that I can help investigate the problem.
OK thanks Francielle,
That gives us a starting point. So something on the server is having a problem installing the package.
You should be able to inspect the 500 error is returning in the Chrome Developer Tools. By ensuring the Developer Tools is open and making the request again.
In the Network tab you will see all the requests the browser is making, there should be a red one for the 500 error to umbraco/backoffice/UmbracoForms/Updates/InstallLatest?version=4.1.5 and in there you should see the response which should give us some more clues as to why this is happening.
2016-01-28 19:27:26,872 [P35052/D3/T54] INFO umbraco.BusinessLogic.Log - Log scrubbed. Removed all items older than 2016-01-27 19:27:26
2016-01-28 19:39:57,949 [P35052/D3/T9] ERROR Umbraco.Web.Strategies.ServerRegistrationEventHandler - Failed to update server record in database.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at Go3066(RegexRunner )
at System.Text.RegularExpressions.RegexRunner.Scan(Regex regex, String text, Int32 textbeg, Int32 textend, Int32 textstart, Int32 prevlen, Boolean quick, TimeSpan timeout)
at System.Text.RegularExpressions.Regex.Run(Boolean quick, Int32 prevlen, String input, Int32 beginning, Int32 length, Int32 startat)
at System.Text.RegularExpressions.Regex.IsMatch(String input)
at Umbraco.Core.Persistence.Database.AddSelectClause[T](String sql)
at Umbraco.Core.Persistence.Database.
OK Francielle,
It seems to be according to this log I am seeing a lot of 'System.OutOfMemoryException' was thrown I would check the server running the site for the upgrade has not run out of memory.
Alternatives would be to restart the site or follow other resources on the internet to do with System.OutOfMemoryException such as this & many others.
If you are getting this (very strange) error, I'm pretty sure this will happen with any package that contains binaries, not just Forms. Please confirm.
The issue is environment specific. It has to do with installed GAC'd + COM assemblies. Here's all of my notes and how to fix this:
All of my investigation points towards loading in an assembly that is already loaded and/or calls COM. In any case, option #3 is most likely the problem, otherwise #4 will solve the problem too but it's not as ideal.
showed that somehow this assembly has a different "SecurityDescriptor" in the "Shared Domain." The calling assembly MyCustomDLL.Base.DLL is not present in GAC and so it gets loaded in LoadFrom loader context. Now when calling assembly tries to load the assembly **.dll, fusion sees that it is GACed and already loaded in Load Context as a domain neutral assembly.
Trust issue - but a setting I've not seen before
There's instructions to change ensure this setting in the web.config and if it's not possible then there is a registry option too
COMPLUS_LoadedOptimization environment variable
Also indicates its an issue of an assembly calling interop/COM methods
How to fix - try these in this order:
Ensure your IIS Application Pool is configured to use .Net Version 4 with Integrated Pipeline and not enabling 32 bit applications
Try to add the to your web.config in the
Check your GAC to see if there are any assemblies registered there that seem unfamiliar - more specifically if there are any assemblies in the GAC that call into COM interop assemblies. Uninstall these assemblies from the GAC if you can and re-test.
Umbraco Forms - Stuck in Downloading and Upgrading
Hi guys, After receiving your e-mail concerning security issues in Umbraco Forms I started updating clients' websites that use it. I was able to update a development environment quite easily, but I'm trying to update Umbraco Forms in our live environment and it is stuck in that "Downloading and Upgrading forms" message. I'm updating it through the Update button inside the backoffice. My current Umbraco version is 7.3.0
I'm trying to install the update as a local package but I'm getting the following error:
Hello Richard,
I have not seen this error before and have looked into the problem and it seems to be a problem in the .NET Framework when performing searches for
Loading this assembly would produce a different grant set from other instances.
Recommended approaches have been:
http://www.glass.lu/Blog/Archive/Error%20Loading%20this%20assembly%20would%20produce%20a%20different%20grant%20set%20from%20other%20instances
http://www.neilpullinger.co.uk/2008/12/loading-this-assembly-would-produce.html
Let me know please Richard, if this is fixed by following this advice in the articles above?
Thanks,
Warren
Hi Warren,
Thanks for your help. We've tried clearing the .net cache but unfortunately this hasn't helped us.
Hello Richard,
Are you still seeing the same error or exception or has it changed?
Thanks,
Warren
Hi Warren,
It's still the same exception.
Richard
Hello Richard,
Can you provide some details on how you are installing Umbraco Forms 4.1.5 please and any further details about your environment setup, so that we can try to replicate the problem.
Many Thanks,
Warren
Hi Warren,
I've tried two methods to install Umbraco Forms. The first is through the packages section of the back office, browsing for Umbraco Forms and selecting install.
The second approach I've tried is to download the latest version from the package page on our and installing it as a local package.
I've asked our hosting team to provide environment details and I'll pass them on when I receive them.
Hi Warren,
I've received the following information from our hosting team:
Windows Server 2012R2 w/ IIS + SQL Server 2012 Web Edition, kept up to date with all appropriate patches .Net 3.5 / 4 installed ESET Antivirus installed
If there is anything else you would like to know specifically let me know and I'll ask them.
Hello Richard,
Is this still a problem for you with version 4.2.1 of Umbraco Forms?
I would recommend looking at the UmbracoLogFiles to see if there is any clues you could give me to help you figure this problem out.
Many Thanks,
Warren
Morning Warren,
I've just tried with version 4.2.1 and unfortunately am having the same problem.
I get the following stack trace in the logs after I try:
Hello Francielle,
Sorry to hear you are having problems updating the Umbraco Forms product to 4.1.5.
I would recommend you upgrade Umbraco Forms in your development environment and deploy the changes to your live site/environment as you normally would to ensure the changes get picked up & most likely under source control in your company's website deployment workflow.
However you should be able to update directly on a live site. Is it possible to have your browser's Developer Tools open and monitor the console for any errors or any network requests that are returning a 400 or 500 error message that I can help investigate the problem.
Many Thanks,
Warren
Hi Warren,
Here's the console log.
OK thanks Francielle,
That gives us a starting point. So something on the server is having a problem installing the package.
You should be able to inspect the 500 error is returning in the Chrome Developer Tools. By ensuring the Developer Tools is open and making the request again.
In the
Network
tab you will see all the requests the browser is making, there should be a red one for the 500 error toumbraco/backoffice/UmbracoForms/Updates/InstallLatest?version=4.1.5
and in there you should see the response which should give us some more clues as to why this is happening.Thanks,
Warren
Hi Warren,
Not sure the response is really helpful:
The dev environment is using this exact same server, so I'm not sure what would be the issue that generates the error on the live site.
OK that is not a super helpful 500 error message is it is, let's carry on debugging the problem.
Can you see any errors or issues in
App_Data/Logs/UmbracoTraceLog.txt
that point to the request?Hi Warren,
This is the latest log:
OK Francielle,
It seems to be according to this log I am seeing a lot of
'System.OutOfMemoryException' was thrown
I would check the server running the site for the upgrade has not run out of memory.Alternatives would be to restart the site or follow other resources on the internet to do with
System.OutOfMemoryException
such as this & many others.http://blogs.msdn.com/b/webtopics/archive/2009/05/22/troubleshooting-system.outofmemoryexceptions-in-asp.net.aspx
Let me know if restarting the site has helped resolve this problem.
Thanks,
Warren
Just to give a closing to my topic:
1) Was able to upgrade through "Update Now" button in my dev environment.
2) Tried to update using "Update Now" in production to no success. Both Dev and Prod are under the same server.
3) Tried copying the files from Umbraco Forms from dev to Prod. Got errors in PostSave method.
4) Copied dev environment to prod and changed bindings.
Number 4 was my solution, not the best, but what was possible to do.
If you are getting this (very strange) error, I'm pretty sure this will happen with any package that contains binaries, not just Forms. Please confirm.
I've seen the Error unpacking extension error with another package, can't remember which one it was I'm afraid.
Hi all,
The issue is environment specific. It has to do with installed GAC'd + COM assemblies. Here's all of my notes and how to fix this:
How to fix - try these in this order:
Ensure your IIS Application Pool is configured to use .Net Version 4 with Integrated Pipeline and not enabling 32 bit applications
Try to add the to your web.config in the
Check your GAC to see if there are any assemblies registered there that seem unfamiliar - more specifically if there are any assemblies in the GAC that call into COM interop assemblies. Uninstall these assemblies from the GAC if you can and re-test.
Add the COMPLUS_LoaderOptimization environment variable, follow these instructions: http://bit.ly/23YznN1 - alternatively another option is to modify the registry as seen at the bottom of this article: https://msdn.microsoft.com/en-us/library/2bh4z9hs(v=vs.110).aspx - then restart IIS and re-test.
is working on a reply...