cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

502 Bad Gateway Error

This flow has been running fine for months, and now every time we try to submit on Sharepoint or the Flow tries to update the Sharepoint, we get the following error. I am not sure which field is causing this.

 

{
"error": {
"code": 502,
"source": "japan-001.azure-apim.net",
"clientRequestId": "5f24909f-19e3-470c-aa7b-a75fe6238ec7",
"message": "BadGateway",
"innerError": {
"status": 500,
"message": "Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Microsoft.SharePoint.Connector.SPListExpandedReference' because the type requires a JSON object (e.g. {\"name\":\"value\"}) to deserialize correctly.\r\nTo fix this error either change the JSON to a JSON object (e.g. {\"name\":\"value\"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.\r\nPath '', line 1, position 1.\r\nclientRequestId: 5f24909f-19e3-470c-aa7b-a75fe6238ec7\r\nserviceRequestId: 5f24909f-19e3-470c-aa7b-a75fe6238ec7"
}
}
1 ACCEPTED SOLUTION

Accepted Solutions

@Anonymous 

 

I can see it here: hshs.PNG

Did you change the settings of this column that it cannot accept multiple values? Please check your SP column and update to allow mulitple selections. (please check and confirm this)

View solution in original post

18 REPLIES 18
yashag2255
Dual Super User II
Dual Super User II

Hi @Anonymous 

 

From the error I am guessing there is some issue in passing a value to the Update/ Create Item in Sharepoint action in your flow. Can you please share a screenshot of the flow so that we can identify the issue properly and better assist you?

Anonymous
Not applicable

Here is the beginning of the Flow

Term 1.JPG

 

Term 2.JPG

 

Term 3.JPG

 

@Anonymous 

 

Can you also post a screenshot of the error (At which action are you seeing that error)?

 

Looks like there is some datatype mismatch issue here but it will be easier to find that if you can post the error screenshot along with the action that the flow is breaking at. 

Anonymous
Not applicable

The Flow is actually breaking upon even trying to submit an item to Sharepoint.

Hi @Anonymous 

 

Yes. Can you post a screenshot of one of those? Can you also share what is the datatype of the columns: 

Division Date and Division Comments on your SP list? 

 

 

Anonymous
Not applicable

Here is what happens when trying to click Save. It is the same error message as my original post.

 

Division Date = Date & time

Division Comments = Single line of text

 

Neither of these columns or any others have changed since we built this.

 

Term 4.JPG

Hi @Anonymous 

 

This looks like an error on your sharepoint form. Are you getting any error on the flow? We need to check which column is generating the error so can you please empty all teh columns and add values and save one by one to check what the issue is and where the error is popping up?

 

Did your flow run succesfully? Can you check that?

Anonymous
Not applicable

I think we are getting somewhere - it finally let me submit after testing every field. However, it looks like the values for Person in Charge (Person or Group Field) and Dealer Divisions (Choice Field) are not being stored. And, this error was produced on the Flow run.Term 6.JPG

 

Term 5.JPG

 

Term 7.JPG

Hi @Anonymous 

 

Perfect! So when you update the Persons field on sharepoint, do you see any error? By not updating, do you mean that it is not saving when you are making this change manually? In SP when you modify a single column, it will show saved action note on the column itself. Can you confirm this for the Choice type field too? 

 

Please note that in your flow, you will have to pass these values appropriately (In the choice column you hae to pass the choice value field)

 

Hope this Helps!

Anonymous
Not applicable

I don't see any error for Person or Divisions, but the data is not retained. I tried building a new Flow, and I have the same issue with these fields. It's weird because there are other fields of the same type on the same Sharepoint, but those don't have any issues, just those two.

@Anonymous 

 

Here is how it works: 

For a person type column when there is only one value allowed, you need to point to the claims value and when it is multiple values allowed you can pass the array of the persons in the appropriate schema. 

 

For a choice column, you need pass the integer value of the choice. 

 

Can you update the following:

 

In the flow, on the update actions, in person incharge, remove everything and click on the icon as highlighted in the image below and select the person incharge column from the dynamic selector:update.PNG

Please make this change and run the flow. 

 

Hope this Helps!

Anonymous
Not applicable

I don't have the icon on this field or any field. I used to have it sometimes, but not anymore. I am still getting the error message about valid array from above.

Term 8.JPG

@Anonymous 

 

I can see it here: hshs.PNG

Did you change the settings of this column that it cannot accept multiple values? Please check your SP column and update to allow mulitple selections. (please check and confirm this)

View solution in original post

Anonymous
Not applicable

The column settings ended up being the issue. Thank you!

Keithy65
New Member

I now too have this error. On a flow that has had no changes in several weeks and had been working fine. Suddenly fails, yep error 502 Bad Gateway. Posting this on August 30 2019 as I have searched this error and seen posts from as far back as 2015. Only been using SharePoint online for a couple of months, initially impressed but now not so much.  NO I will not post my Flow, as is the usual request. This is obviously a bug that has still yet to be fixed properly. Can only assume it rears it's ugly head after a botched Microsoft patch.

 

Same error here. Basic flow.
New Planner Task
Apply to each
Get user profile v2
Create item (sharepoint)
====
"message": "Unexpected character encountered while parsing value: b. Path '', line 0, position 0.\r\nclientRequestId:
yashag2255
Dual Super User II
Dual Super User II

Hi @Robd328 

 

Can you post a screenshot of the error that you are seeing so that we can better understand the issue and help you with it? 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,198)