Thank you for reporting an issue, suggesting an enhancement, or asking a question. We appreciate your feedback - to help the team understand your
needs please complete the below template to ensure we have the details to help. Thanks!
Please check out the Docs to see if your question is already addressed there. This will help us ensure our documentation covers the most frequent questions.
Please specify what version of the library you are using: [ 1.2.7 ]
Please specify what version(s) of SharePoint you are targeting: [ SPO ]
If you are not using the latest release, please update and see if the issue is resolved before submitting an issue.
When Logger is configured with LogLevel.Verbose and using batching functionality + paging (e.g. getPaged) expectation is to get back paged items after calling batch.execute().
Receive Error: Message: Converting circular structure to JSON Data: {} that is thrown from line 55 in listeners.ts where JSON.stringify(entry.data) is executed.
Changing any one of 3 variables resolves the issue which are my work around for now.
Set up logger and use ConsoleListener
`
Logger.subscribe(new ConsoleListener());
Logger.activeLogLevel = LogLevel.Verbose;
Make a batched, paged request for list items
let batch = sp.web.createBatch();
sp.web.lists.getByTitle("SomeList").items
.inBatch(batch)
.getPaged()
.then(r => {
pagedItems.mainPagedItemCollection = r;
debugger;
});
await batch.execute()
.catch(e => {
debugger;
});
`
Wow, not a common set of circumstances, nice find. Will have a look, thanks.
Agree. I always seem to be the guy in the one off scenarios. Thanks for taking a look and putting a try/catch around that so it will at least continue on successfully.
Yep - logging should never crash an application and we broke that rule. Thanks again for letting us know :)