question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Newtonsoft.Json: Self referencing loop detected for property 'Parent' with type 'Microsoft.Azure.Cosmos.Tracing.Trace'.

See original GitHub issue

We are continuously addressing and improving the SDK, if possible, make sure the problem persist in the latest SDK version.

Describe the bug Using continuationToken does not work

To Reproduce

  1. Create an Azure Function HTTP Trigger
  2. Inside the Azure Function, query for a paginated collection
  3. Invoke the Azure Function without passing the continuationToken
  4. Return the paginated result together with the FeedResponse<T>.ContinuationToken
  5. Invoke the Azure Function again and pass the continuationToken

Expected behavior This should get the next page

Actual behavior Getting the following error

System.Private.CoreLib: Exception while executing function: Some_Paginated_Function. Newtonsoft.Json: Self referencing loop detected for property ‘Parent’ with type ‘Microsoft.Azure.Cosmos.Tracing.Trace’. Path ‘Item3.Diagnostics.Value.Children[0]’.

Environment summary SDK Version: Microsoft.Azure.Cosmos v3.22.1 OS Version: MacOSX 12.0.1

Additional context Nothing else is thrown in the terminal

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ealsurcommented, Nov 5, 2021

Can we close this Issue then?

1reaction
kuromukiracommented, Nov 5, 2021

@ealsur

What I did is return it as a deserialized object from the endpoint and let the client (mobile app) handle it and encode/serialize it back to a json string. And by the time it is needed to be used in the query parameter of the HTTP request, I make sure that it is URL Encoded.

I implemented this after you replied with the reference link.

This approach worked on my end and I got the same format back.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSON.Net Self referencing loop detected
The code results in the following error: Newtonsoft.Json.JsonSerializationException: Self referencing loop detected for property 'CyberUser' ...
Read more >
Azure Functions – Json: Self referencing loop detected for ...
Newtonsoft.Json: Self referencing loop detected for property 'task' with type 'System.Runtime.CompilerServices.
Read more >
Fixing JSON Self Referencing Loop Exceptions
Json (Or JSON.NET as it's sometimes called, default for .NET Core 2.2 and lower) : JsonSerializationException: Self referencing loop detected with type.
Read more >
Self referencing loop detected - Microsoft Q&A
Newtonsoft.Json.JsonSerializationException: Self referencing loop detected for property 'suiviBE' with type 'FollowUpDash.Shared.Models.
Read more >
Self referencing loop detected for property | ASP.NET CORE ...
Fix: JsonSerializationException : Self referencing loop detected for property | ASP.NET CORE | Json. 2.5K views · 8 months ago ...more ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found