KevinJump / uSync

Database syncing tool for Umbraco CMS
https://jumoo.co.uk/usync/
Mozilla Public License 2.0
111 stars 63 forks source link

Failing import of content after upgrading u9 to u13 #670

Open ahlvertica opened 1 month ago

ahlvertica commented 1 month ago

We are experiencing a issue with importing content after upgrading the CMS. The user that did the upgrade does not have the issues, and we suspect its due to the fact he had a functional DB before the upgrade.

Im currently trying to setup the dev environment with a clean DB, and I can only import the Settings for the environment. When trying to import content, the media succeds but when it gets to the content part, it instant fails with the msg:

"One or more errors occurred. (Found invalid data while decoding.)"

and the stackTrace in the importHandler:

at Umbraco.Cms.Infrastructure.Scoping.Scope.TryFinally(Action[] actions) at Umbraco.Cms.Infrastructure.Scoping.Scope.RobustExit(Boolean completed, Boolean onException) at Umbraco.Cms.Infrastructure.Scoping.Scope.DisposeLastScope() at Umbraco.Cms.Infrastructure.Scoping.Scope.Dispose() at uSync.BackOffice.uSyncService.ImportHandler(String handlerAlias, uSyncImportOptions options) at uSync.BackOffice.Services.SyncActionService.ImportHandler(SyncActionOptions options, uSyncCallbacks callbacks) at uSync.BackOffice.Assets.Controllers.uSyncDashboardApiController.ImportHandler(SyncActionOptions options) at lambda_method1575(Closure, Object, Object[]) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.gLogged|12_1(ControllerActionInvoker invoker) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) 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.gAwaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

We dont really have anything to go from here, so is there a suggestion on how to troubleshoot our issue and not just transfer the whole DB from the guy that has the working one?

I can see we are using the uSync 9.2.0, but I did try to bump that up to a 13.x version to see if that was the reason for the error, but no change was seen.

About your Site (please complete the following information):

KevinJump commented 1 month ago

Hi,

We've done some investigating and we think the situations will be improved (but maybe not completely solved) in the v14.2 release of uSync (just released!).

What we have learnt

Hopefully if we can identify failures caused by changes in data we can put the code in uSync, we have places where we morph incoming property data, (in the mappers) and if there are specific cases we need to capture we can, hopefullt the new release makes that eaiser to at least spot and less castritrophic when it happens (although to be clear, thats v14 throwing the toys out the pram!).

ahlvertica commented 1 month ago

Hey again.

Is there another way if we dont have a upgrade to v14 on the drawingboard for now? Seems like the usync v14.2 require a similar version of Umbraco for it to work?

Install failed (project: Web. CMS, package: uSync v14.2.0) Package restore failed. Rolling back package changes for 'Web. CMS'. Version conflict detected for Umbraco. Cms. Web. Common. Install/ reference Umbraco. Cms. Web. Common 14.2.0 directly to project Vertica. Company. Web. CMS to resolve this issue. Vertica. Company. Web. CMS -> uSync 14.2.0 -> uSync. BackOffice 14.2.0 -> uSync. Core 14.2.0 -> Umbraco. Cms. Api. Management 14.2.0 -> Umbraco. Cms. Api. Common 14.2.0 -> Umbraco. Cms. Web. Common (>= 14.2.0 && < 15.0.0) Vertica. Company. Web. CMS -> Umbraco. StorageProviders. AzureBlob 13.0.1 -> Umbraco. Cms. Web. Common (>= 13.0.0 && < 14.0.0).

KevinJump commented 1 month ago

Hi,

Sorry, i think i got confused here, that comment related to a different issue! (too many tabs!).

In theory there should be no issue going from v9 to v13 - but i would make sure you had the latest version of uSync for the version of umbraco at each end (so v9 for 9 and v13.* for Umbraco v13).

If i was debugging i would start with .

If this doesn't help and you feel able, you could send over the uSync folder to me (kevin@jumoo.co.uk) and i will take a quick run through it locally to see if i can spot anything (this also helps us iorn out issues as we can feedback anything into the code).