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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 181 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 112 Super User 2026 Season 2

Last 30 days Overall leaderboard