The type initializer for 'Umbraco.Forms.Data.Helper' threw an exception
Using Umbraco Forms 4.3-beta, everything was working fine. I saw this package and it looks like it has some nice features. After installing, I get the following exception when going the Forms section:
An error occured
The type initializer for 'Umbraco.Forms.Data.Helper' threw an exception.
EXCEPTION DETAILS
System.TypeInitializationException: The type initializer for 'Umbraco.Forms.Data.Helper' threw an exception. STACKTRACE
at Umbraco.Forms.Data.Helper.get_SqlHelper() at PerplexUmbraco.Forms.Code.PerplexFolder.GetStartFoldersForUser(IUser user) at PerplexUmbraco.Forms.Code.PerplexFolder.GetStartFoldersForCurrentUser() at PerplexUmbraco.Forms.Controllers.PerplexFormTreeController.CreateRootNode(FormDataCollection queryStrings) at Umbraco.Web.Trees.TreeControllerBase.GetRootNode(FormDataCollection queryStrings) at Umbraco.Web.Trees.ApplicationTreeExtensions.<TryGetRootNodeFromControllerTree>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Umbraco.Web.Trees.ApplicationTreeController.<GetRootForMultipleAppTree>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Umbraco.Web.Trees.ApplicationTreeController.<GetApplicationTrees>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext() INNER EXCEPTION
System.NullReferenceException: Object reference not set to an instance of an object. at Umbraco.Forms.Data.Helper..cctor()
The problem is coming from Umbraco Forms itself, but something might have changed in Umbraco Forms which is causing an issue with this project (and this project may need to account for that change?). If you think Umbraco Forms is to blame, I can open something there.
I have just published a new version (1.31) of the package which should fix this exception.
I have removed our dependency on Umbraco.Forms.Data.Helper.SqlHelper from this package. It is not clear what exactly causes the exception and since Umbraco Forms is not open source I cannot debug this properly. It seems the SqlHelper initializer depends on something that is null. Regardless, we now use functionality from Umbraco.Core to do queries, which we have used before in other packages so that should be more reliable.
I have tested the new version with Umbraco 7.4.3 and Umbraco Forms 4.3 beta and the exception is gone. I hope the same is true for you.
The type initializer for 'Umbraco.Forms.Data.Helper' threw an exception
Using Umbraco Forms 4.3-beta, everything was working fine. I saw this package and it looks like it has some nice features. After installing, I get the following exception when going the Forms section:
The problem is coming from Umbraco Forms itself, but something might have changed in Umbraco Forms which is causing an issue with this project (and this project may need to account for that change?). If you think Umbraco Forms is to blame, I can open something there.
Hi TheSharpieOne :),
we also found this out yesterday. We will try to fix this issue this week or at the beginning of next week. Thanks for reporting.
We will let you know if it works again,
Jeffrey
Hi TheSharpieOne,
Thank you for your feedback.
I have just published a new version (1.31) of the package which should fix this exception.
I have removed our dependency on Umbraco.Forms.Data.Helper.SqlHelper from this package. It is not clear what exactly causes the exception and since Umbraco Forms is not open source I cannot debug this properly. It seems the SqlHelper initializer depends on something that is null. Regardless, we now use functionality from Umbraco.Core to do queries, which we have used before in other packages so that should be more reliable.
I have tested the new version with Umbraco 7.4.3 and Umbraco Forms 4.3 beta and the exception is gone. I hope the same is true for you.
Kind regards,
Daniël Knippers
1.31 works like a charm. Thanks for the quick turnaround!
is working on a reply...