Completed
Last Updated: 19 Jun 2024 08:47 by ADMIN
Release R3 2022 SP1
Ibrahim
Created on: 20 Oct 2022 08:51
Type: Bug Report
4
"Error creating report instance" when starting viewer in .NET7 RC1 application
1. Start HTML5 or Blazor viewer or designer in a .NET7 RC1 application

Expected: Report Catalog report shown.
Actual: Error creating report instance (Report = 'Report Catalog.trdp'). An error has occurred. A possible object cycle was detected. This can either be due to a cycle or if the object depth is larger than the maximum allowed depth of 64. Consider using ReferenceHandler.Preserve on JsonSerializerOptions to support cycles. Path: $.
12 comments
ADMIN
Dimitar
Posted on: 19 Jun 2024 08:47

Hello Deepak,

This error is caused by breaking changes in the serialization introduced with .NET 7 - Breaking changes in .NET 7 | Microsoft Learn, and to deal with those, the only option is to update the Telerik Reporting references in the project to a version where those changes are handled in our code.

To use .NET 8 with Telerik Reporting, it will be necessary to update to the Progress® Telerik® Reporting R3 2023 SP1 (17.2.23.1114) release at least but I recommend updating to the latest version instead for the best Reporting experience - Telerik Reporting - Progress® Telerik® Reporting 2024 Q2 (18.1.24.514).

You mentioned having to update the Kendo UI for jQuery dependencies to the latest but it is not necessary to update to the latest version. The version of Kendo that our web controls use is Kendo UI R3 2022 SP1 (version 2022.3.1109), as long as you update to this version at least, there should be no issues with our controls.

I hope this will help.

Regards,
Dimitar
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Deepak
Posted on: 17 Jun 2024 18:09

Hello,

I'm having the same issue when upgrading from ASP.NET Core 6.0 to .NET 8.0 using Telerik Reporting 16.0.22.119 and Kendo UI for JQuery 2021.3.1207.  The issue seems to be when the code is trying to cache the objects:

 

   at System.Text.Json.JsonSerializer.Serialize[TValue](Utf8JsonWriter writer, TValue value, JsonSerializerOptions options)
   at Telerik.Reporting.Cache.ObjectJsonConverter.NonPrimitiveRuntimeTypesConverter.WriteContent(Utf8JsonWriter writer, Object value, JsonSerializerOptions options)
   at Telerik.Reporting.Cache.DerivedTypesJsonConverter`1.Write(Utf8JsonWriter writer, TBase value, JsonSerializerOptions options)
   at Telerik.Reporting.Cache.ObjectJsonConverter.Write(Utf8JsonWriter writer, Object value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.Serialize(Utf8JsonWriter writer, T& rootValue, Object rootValueBoxed)
   at System.Text.Json.JsonSerializer.WriteBytes[TValue](TValue& value, JsonTypeInfo`1 jsonTypeInfo)
   at System.Text.Json.JsonSerializer.SerializeToUtf8Bytes[TValue](TValue value, JsonSerializerOptions options)
   at Telerik.Reporting.Cache.SerializationUtils.Serialize(Object value, JsonSerializerOptions options)
   at Telerik.Reporting.Services.Engine.PersistableObject.Serialize(Object value)
   at Telerik.Reporting.Services.Engine.PersistableObject.SetObject(String key, Object value)
   at Telerik.Reporting.Services.Engine.PersistableObject`1.set_Key(K value)
   at Telerik.Reporting.Services.Engine.PersistableObject`1.Initialize(K key, Int32 keyHash)
   at Telerik.Reporting.Services.Engine.ReportInstance.Initialize(ReportInstanceKey key, Int32 keyHash)
   at Telerik.Reporting.Services.Engine.KeyItemPersistableCollection`2.<>c__DisplayClass1_0.<GetOrAdd>b__0(T newInstance)
   at Telerik.Reporting.Services.Engine.PersistableCollection`1.NewItem(String newID, Action`1 initializeObject)
   at Telerik.Reporting.Services.Engine.KeyItemPersistableCollection`2.GetOrAdd(K key, Boolean& newItem)
   at Telerik.Reporting.Services.Engine.ReportEngine.CreateReportInstance(String clientID, String report, Dictionary`2 parameterValues)
   at Telerik.Reporting.Services.AspNetCore.ReportsControllerBase.CreateInstance(String clientID, ClientReportSource reportSource)
   at lambda_method263(Closure, Object, Object[])
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

 

I know that I have to upgrade to the latest version of Telerik Reporting eventually.  However, upgrading the corresponding Kendo UI for JQuery to the latest version involves big coding changes.

So is there a way to simply configure System.Text.Json defaults to match the .NET 6 defaults so that I can at least upgrade to .NET  8 without breaking Telerik Reporting?

Regards,

Deepak Gupta

ADMIN
Dimitar
Posted on: 25 Apr 2023 11:15

Hi Victor,

Since you are experiencing a different problem, please open a new ticket about it or create a forum thread where we may investigate the issue - Questions on Reporting Forum | Telerik Forums.

Regards,
Dimitar
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Víctor
Posted on: 20 Apr 2023 14:43
I've also seen this message with .NET 7, but seems to be gone now. Now the problem is I can no t save as a new report. 

Could not create document. undefined

I can save, and I can open the AssetManager to copy paste a report and edit the new one. But I acn not create a new report
Steve
Posted on: 19 Apr 2023 17:18
I had this same issue even though I was still targeting Net6, I had inadvertently updated 2 Microsoft libraries to 7.0.1 Reverting these back to 6.0.16 corrected the issue and reports now run as expected.
ADMIN
Dimitar
Posted on: 07 Apr 2023 13:16

Hello Ronald,

For .NET 6, it may be possible to "ignore" the problem with the following code:

services.AddControllers().AddNewtonsoftJson(options=>
    options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore);

However, the much safer option, that I would recommend, is to just upgrade the Telerik Reporting references to 16.2.22.1109 or newer.

Regards,
Dimitar
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Ronald
Posted on: 04 Apr 2023 15:07

Hi Dimitar

What about in .NET 6? Do I need to do the same thing, download the latest version?

ADMIN
Dimitar
Posted on: 04 Apr 2023 13:44

Hello Jaydeep,

No, at least version 16.2.22.1109 or newer has to be used for Telerik Reporting to work as expected in .NET 7, there aren't any workarounds besides that I am afraid.

Regards,
Dimitar
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Jaydeep
Posted on: 03 Apr 2023 14:56
Is there other way to solve this issue without downloading the latest version?
ADMIN
Dimitar
Posted on: 09 Nov 2022 14:00

Hello,

The issue has been resolved with the latest release - Telerik Reporting - Progress® Telerik® Reporting R3 2022 SP1 16.2.22.1109.

Thank you for using Telerik Reporting!

Regards,
Dimitar
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Iris
Posted on: 09 Nov 2022 12:31

Please fix this issue.

Thanks

Wayne Hiller
Posted on: 08 Nov 2022 22:58
I am getting this in the .Net 7 release version too.