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

Problem creating the nodes #32

Open
marcusjm opened this issue Mar 25, 2022 · 17 comments
Open

Problem creating the nodes #32

marcusjm opened this issue Mar 25, 2022 · 17 comments

Comments

@marcusjm
Copy link

I get this issue when trying to create a new checkout tree under the root node. Using 2.1.0 of Checkout and 2.1.2 of Vendr.

An error occurred
Value cannot be null. (Parameter 'dataType')

Exception Details
System.ArgumentNullException, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e: Value cannot be null. (Parameter 'dataType')

@mattbrailsford
Copy link
Member

@marcusjm What version of Umbraco are you using?

@marcusjm
Copy link
Author

@marcusjm What version of Umbraco are you using?

This is the latest public release 9.4.1

@mattbrailsford
Copy link
Member

mattbrailsford commented Mar 28, 2022

Hmm, I've just setup 9.4.1 install and installed Vendr + Vendr Checkout and it installed as expected.

Is there anything custom about your setup? Have you removed any of the standard data type deinfitions?

@marcusjm
Copy link
Author

I use the Vendr Usync plus some other like Contemtment etc but nothing dramatic.

@marcusjm
Copy link
Author

marcusjm commented Mar 28, 2022

ok I will try again and see if it works

Complete error msg.

`
Value cannot be null. (Parameter 'dataType')

Exception Details
System.ArgumentNullException, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e: Value cannot be null. (Parameter 'dataType')

at Umbraco.Cms.Core.Models.PropertyType..ctor(IShortStringHelper shortStringHelper, IDataType dataType)
at Vendr.Checkout.Pipeline.Tasks.CreateVendrCheckoutDocumentTypesTask.Execute(PipelineArgs1 args) at Vendr.Common.Pipelines.Tasks.PipelineTaskBase2.Execute(PipelineArgs input)
at Vendr.Common.Pipelines.InProcPipelineInvoker.<Vendr.Common.Pipelines.IPipelineInvoker.Invoke>g__next|2_0(PipelineArgs e, <>c__DisplayClass2_0& )
at Vendr.Common.Pipelines.InProcPipelineInvoker.<Vendr.Common.Pipelines.IPipelineInvoker.Invoke>g__next|2_0(PipelineArgs e, <>c__DisplayClass2_0& )
at Vendr.Common.Pipelines.InProcPipelineInvoker.Vendr.Common.Pipelines.IPipelineInvoker.Invoke(IEnumerable1 pipelineTasks, PipelineArgs args) at Vendr.Common.Pipelines.Pipeline.Invoke[TPipeline,TEntity](TEntity entity, IDictionary2 additionalData)
at Vendr.Common.Pipelines.Pipeline.Invoke[TPipeline,TEntity](TEntity entity)
at Vendr.Checkout.Services.InstallService.Install(Int32 siteRootNodeId, StoreReadOnly store)
at Vendr.Checkout.Web.Controllers.VendrCheckoutApiController.InstallVendrCheckout(GuidUdi siteRootNodeId)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)`

@marcusjm
Copy link
Author

Hmm, I've just setup 9.4.1 install and installed Vendr + Vendr Checkout and it installed as expected.

Is there anything custom about your setup? Have you removed any of the standard data type deinfitions?

It is multi language though if that matters? 4 different.

@mattbrailsford
Copy link
Member

Hmm, I wouldn't really have thought so. Based on the exception, I'd say it's erroring here https://github.com/vendrhub/vendr-checkout/blob/v2/dev/src/Vendr.Checkout/Pipeline/Tasks/CreateVendrCheckoutDocumentTypesTask.cs#L295 but this get's called in a number of places such as these https://github.com/vendrhub/vendr-checkout/blob/v2/dev/src/Vendr.Checkout/Pipeline/Tasks/CreateVendrCheckoutDocumentTypesTask.cs#L157-L212 but these are all passed data types that are resolved here https://github.com/vendrhub/vendr-checkout/blob/v2/dev/src/Vendr.Checkout/Pipeline/Tasks/CreateVendrCheckoutDocumentTypesTask.cs#L50-L56 so it would appear like one of those is null which would suggest either one of the standard data type definitions isn't present for some reason, or the step picker data type failed to complete in a previous pipeline task which is set to run before that one https://github.com/vendrhub/vendr-checkout/blob/v2/dev/src/Vendr.Checkout/Pipeline/Tasks/CreateVendrCheckoutDataTypesTask.cs#L88

@marcusjm
Copy link
Author

marcusjm commented Mar 28, 2022

Aha so some store setting perhaps? I couldn't see any missing but. We use 4 currencies also. GBP, EUR, SEK and NOK. I compared with the Tea Store and they seem to be about the same (except the unique settings of course)

@marcusjm
Copy link
Author

I will try to create a new setup and simply compy the doctypes over.

@marcusjm
Copy link
Author

Hmm, I wouldn't really have thought so. Based on the exception, I'd say it's erroring here https://github.com/vendrhub/vendr-checkout/blob/v2/dev/src/Vendr.Checkout/Pipeline/Tasks/CreateVendrCheckoutDocumentTypesTask.cs#L295 but this get's called in a number of places such as these https://github.com/vendrhub/vendr-checkout/blob/v2/dev/src/Vendr.Checkout/Pipeline/Tasks/CreateVendrCheckoutDocumentTypesTask.cs#L157-L212 but these are all passed data types that are resolved here https://github.com/vendrhub/vendr-checkout/blob/v2/dev/src/Vendr.Checkout/Pipeline/Tasks/CreateVendrCheckoutDocumentTypesTask.cs#L50-L56 so it would appear like one of those is null which would suggest either one of the standard data type definitions isn't present for some reason, or the step picker data type failed to complete in a previous pipeline task which is set to run before that one https://github.com/vendrhub/vendr-checkout/blob/v2/dev/src/Vendr.Checkout/Pipeline/Tasks/CreateVendrCheckoutDataTypesTask.cs#L88

It looks like it works when doing from a clean vendr install. Not sure if something collided with other DocTypes then. Going to try using Usync to match them :).

@wr-dev
Copy link

wr-dev commented Apr 5, 2022

I'm getting the same error, admittedly on a pretty heavily customised base site.

Although I don't think we've removed any standard Umbraco datatypes.

Same versions of Vendr too - Vendr 2.1.2, Vendr.Checkout 2.1.0 on Umbraco 8.17.1

Will carry on looking into it, maybe take the source and debug, see if I can work it out

An error occurred
Value cannot be null. Parameter name: dataType

Exception Details
System.ArgumentNullException: Value cannot be null. Parameter name: dataType
Stacktrace
at Umbraco.Core.Models.PropertyType..ctor(IDataType dataType) in D:\a\1\s\src\Umbraco.Core\Models\PropertyType.cs:line 41
   at Vendr.Checkout.Pipeline.Tasks.CreateVendrCheckoutDocumentTypesTask.CreatePropertyType(IDataType dataType, Action`1 config)
   at Vendr.Checkout.Pipeline.Tasks.CreateVendrCheckoutDocumentTypesTask.Execute(PipelineArgs`1 args)
   at Vendr.Common.Pipelines.Tasks.PipelineTaskBase`2.Execute(PipelineArgs input)
   at Vendr.Common.Pipelines.InProcPipelineInvoker.<Vendr.Common.Pipelines.IPipelineInvoker.Invoke>g__next|2_0(PipelineArgs e, <>c__DisplayClass2_0& )
   at Vendr.Common.Pipelines.InProcPipelineInvoker.<Vendr.Common.Pipelines.IPipelineInvoker.Invoke>g__next|2_0(PipelineArgs e, <>c__DisplayClass2_0& )
   at Vendr.Common.Pipelines.InProcPipelineInvoker.Vendr.Common.Pipelines.IPipelineInvoker.Invoke(IEnumerable`1 pipelineTasks, PipelineArgs args)
   at Vendr.Common.Pipelines.Pipeline.Invoke[TPipeline,TEntity](TEntity entity, IDictionary`2 additionalData)
   at Vendr.Checkout.Services.InstallService.Install(Int32 siteRootNodeId, StoreReadOnly store)
   at Vendr.Checkout.Web.Controllers.VendrCheckoutApiController.InstallVendrCheckout(GuidUdi siteRootNodeId)
   at lambda_method(Closure , Object , Object[] )
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- 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__1.MoveNext()

@wr-dev
Copy link

wr-dev commented Apr 6, 2022

Just for info (or if anyone else has this issue) adding the project src to my solution, and referencing directly from the web project worked a treat. Strange.

@mattbrailsford
Copy link
Member

🤯

@marcusjm
Copy link
Author

marcusjm commented Apr 7, 2022

Cool. I will try that then.

@marcusjm
Copy link
Author

Unfortunatelly that didn't work for me.

@mattbrailsford
Copy link
Member

If this is an upgraded umbraco install, I think it’s probably because the new image picker data type isn’t being created. It only gets created on new installs after the version of umbraco in which it was added.

I think we may need to check for its existence before using it 🤔

@marcusjm
Copy link
Author

I have not upgraded yet but it is at 9.5.

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

3 participants