MapSerializer Error on js business logic calls

I am using backendless 5.0 and receiving this error when making any custom JS business logic calls. The response I receive is below. My app id is 7E70A04E-297D-62DA-FF85-191102E75400

500 - Backendless encountered an error while handling the request. An internal trouble ticket with ID E0247558-03A9-6A13-FFEB-0672F48E4600 has been created and we will be investigating the issue. null java.lang.StackOverflowError at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:630) at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:33) at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFields(MapSerializer.java:722) at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:643) at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:33) at com.fasterxml.jackson.databind.ser.std.ObjectArraySerializer.serializeContents(ObjectArraySerializer.java:252) at com.fasterxml.jackson.databind.ser.std.ObjectArraySerializer.serialize(ObjectArraySerializer.java:213) at com.fasterxml.jackson.databind.ser.std.ObjectArraySerializer.serialize(ObjectArraySerializer.java:22) at

I didn’t change any code and this just started happening a few hours ago. Any idea what could be causing it? Did anything change with Backendless recently?

Hi, @Phil1

I have checked the JS Business Logic calls in your application using Console and Rest API. And I could not reproduce the issues described above.
Are you having issues now? If so, please provide us with steps by which we can reproduce your problem.

Regards,
Marina

Hi @Marina.Kan,

I am still receiving the error on the getDiscussionComments api call under the EpilepsyWebService. Please enter 353261DC-9611-E22B-FF9C-160EF2AFBD00 as curUserId and 0 for pageoffset. Let me know if that helps reproduce the issue.

I got it, I changed Id for one from the EpilepsyDiscussionComment table after that I was able to reproduce your issue. We are looking into it.

Regards,
Marina

Yes but the method is getDiscussionComments. (With an s at the end)

Ok great. Thank you.

I have several more questions to you. Did this logic work before? Do you have an opportunity to redeploy it?

Regards,
Marina

Yes, it was working before. I walked through the code and everything works until the data is returned from the call. Sounds like it is a serialization issue or something. Yes, I can redeploy in a few hours.

@Phil1, I have created an internal ticket BKNDLSS-24144 for your issue, our engineers are looking into it. We will contact you as got some results about that.

Regards,
Marina

hello @Phil1,
As @Marina.Kan said we will investigate the issue, but first look point that you have circular dependency when you have object A1 with relation to B1, and B1 has relation to A1, in this case, you will receive such exception. json do not support circular dependencies, we have our own solution to handle it, and we will apply it for services, meanwhile, if you are able to avoid circular dependencies avoid it.

Are you able to help identify the circular dependency? This was working before so I’m not sure what changed.

We will contact you as soon as we have any information regarding to the issue.

Regards,
Marina

I think I figured it out. I had the setRelationDepth property set too high so it was including related objects that caused a circular dependency. Setting the relationDepth to 1 solved the issue. Not sure why I just started seeing the error now though.