web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Random error 'JSON.str...
Power Apps
Unanswered

Random error 'JSON.stringify cannot serialize cyclic structures'

(0) ShareShare
ReportReport
Posted on by 35

Hi everyone!👋

 

About the app: Canvas Power App using a Custom connector for executing the post API method.

 

Problem:

I'm getting a random error on different days using mobile data (in desktop and wifi works fine now also the error was detected on desktop with wifi).

Aleatory error 'JSON.stringify cannot serialize cyclic structures'.

 

JsonError.png

 

The error was on trying to call the API (Executing the API post method) it failures random on different days only with mobile data.
I'm not using any JSON Functions or stringify explicit on the code. Maybe, Powerapps convert or use JSON.stringify internally for sending the information to the custom connector, but not syre.

 

Some details: pseudo-code

 

 

UpdateContext(
{
locResponse: CustomConn.PostMethod(
"application/json",
gblApiKey,
{
user: User().Email,
account: First(colInformation).account,
guid: GUID(),
submissionGUID: gblSubmissionGUID,
accountkey: First(colInformation).accountKey,
flag: If (CountRows(colInformationSelected)=0,false,true),
listString1: If (CountRows(colInformationSelected)=0,"",Concat(colInformationSelected,Text(key),Char(59))),
lastname: First(colInformation).lastname,
listString2: If (CountRows(colAdditionalInformationSelected)=0,"",Concat(colAdditionalInformationSelected,Text(key),Char(59))),
address: First(colInformation).address
}
)
}
);

 

 

- The collections with CONCAT where very simple (Key/Text) with 0 or 5 records. 

 

Do you have some similar errors? Or any thoughts?🤔

Or if someone has an idea about what is happening, it would be really great.

 

Thanks in advance

 

Best Regards,

Facu

I have the same question (0)
  • facupola Profile Picture
    35 on at

    More related information. I added IfError, here are the details:

     

    FirstError.Kind: 23
    FirstError.Observed: SampleButton_131.OnSelect
    FirstError.Message: CustomConn.PostMethod failed: JSON.stringify cannot serialize cyclic structures.
  • Verified answer
    facupola Profile Picture
    35 on at

    Finally, I got the root cause of the error, it was a coding error. The App was trying to send on one parameter the whole control " [object Object] " instead of the Text.

     

    At future, It will be better to show a user-friendly error instead of the JSON.Stringify ones. Because Stringify is a component inside of PowerApps.

     

    Hope it would helps other people.

    Thanks

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard