cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
misc
Resolver II
Resolver II

An error occurred on the server. Server Response: Incidents failed: Bad Gateway (502)

My app is throwing the above error when I go to re-submit a form which has been edited. 

 

A New Form submit works fine, but when I go back to the gallery, select any previous record, and try to edit it does not submit.

 

error occurred.png

I've tried good ol' google with no luck, some people seem to suggest the error should go after a few tries, but no luck there either. I've tried refreshing the data source etc. and I've also remade the app from scratch and it throws the same error again.

 

The main error message appears to be:

"message": "Error reading string. Unexpected token: StartObject. Path 'Value', line 2, position 13.\r\nclientRequestId: 5e78521b-d14b-433f-a888-5edb7abfba9c\r\nserviceRequestId: 5e78521b-d14b-433f-a888-5edb7abfba9c"

 

Is this referring to a specific data card? Can I identify where 'line 2, position 13' is?

 

I did the full monitoring troubleshoot and it came up with the attached details. 

 

Any help is greatly appreciated, this is the last hurdle on a project which has taken me quite some time!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
misc
Resolver II
Resolver II

UPDATE: I found a fix and thought it would be prudent to provide it here for others who come across a similar error:

 

1) I duplicated the screen and deleted each data card one by one until I found the one which was creating the error (turns out it was a dropdown which is linked to a Choices sharepoint list)

2) I found out that the error did not occur if I 'edited' this data card before re-submitting (even if I just deleted and selected the same option)

3) Logic showed this was probably due to my DefaultSelectedItems property which was:

If(
   ReportForm.Mode = FormMode.New && DataCardValue2.Selected.Value = "Fire Report", ["Fire incident"],
     ReportForm.Mode = FormMode.New && DataCardValue2.Selected.Value = "Building Report", ["Damage to property"],
      ReportForm.Mode = FormMode.New && DataCardValue2.Selected.Value = "Incident Report", ["Miscellaneous"],
      ReportForm.Mode = FormMode.Edit, [Parent.Default])

 

To fix, all I had to do was change [Parent.Default] to ThisItem.'Incident Category'.

 

 

View solution in original post

2 REPLIES 2
misc
Resolver II
Resolver II

UPDATE: I found a fix and thought it would be prudent to provide it here for others who come across a similar error:

 

1) I duplicated the screen and deleted each data card one by one until I found the one which was creating the error (turns out it was a dropdown which is linked to a Choices sharepoint list)

2) I found out that the error did not occur if I 'edited' this data card before re-submitting (even if I just deleted and selected the same option)

3) Logic showed this was probably due to my DefaultSelectedItems property which was:

If(
   ReportForm.Mode = FormMode.New && DataCardValue2.Selected.Value = "Fire Report", ["Fire incident"],
     ReportForm.Mode = FormMode.New && DataCardValue2.Selected.Value = "Building Report", ["Damage to property"],
      ReportForm.Mode = FormMode.New && DataCardValue2.Selected.Value = "Incident Report", ["Miscellaneous"],
      ReportForm.Mode = FormMode.Edit, [Parent.Default])

 

To fix, all I had to do was change [Parent.Default] to ThisItem.'Incident Category'.

 

 

View solution in original post

GuillaumeP
Frequent Visitor

Thank you !! 4 days i battled with this error. Same case, a dropdown which is linked to a Choices sharepoint list with DefaultSelectedItems property.

I just deleted it, added it again, modified properties as before and it works...

 

Guillaume

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (18,394)