cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DotNetMatt
Level: Powered On

SharePoint Copy File - Bad Gateway

Hi there,

 

I have some troubles with the SharePoint Copy File module, as it always results in a Bad Gateway (502) error after 4 retries:

{
  "error": {
    "code": 502,
    "source": "flow-apim-europe-001-francecentral-01.azure-apim.net",
    "clientRequestId": "2f816688-843d-4bd0-9ef2-f8e3ff2b5db8",
    "message": "BadGateway",
    "innerError": {
      "status": 500,
      "message": "The system cannot find the file specified. (Exception from HRESULT: 0x80070002)\r\nclientRequestId: 2f816688-843d-4bd0-9ef2-f8e3ff2b5db8\r\nserviceRequestId: 98d9a19e-008d-7000-99f4-b60c4bf3a01a"
    }
  }
}

The file to copy is an Excel file (.xlsx). Before the Copy File component, I add rows into the Excel file and it works fine, I can see the lines inside the file. So it's kind of weird.

 

Here are some screenshots of my flow:

2018-11-12 22_16_40-Microsoft Edge.pngBeginning of the flow (collapsed)

2018-11-12 22_17_36-Microsoft Edge.pngEnd of the flow (collapsed)

2018-11-12 22_17_55-Microsoft Edge.png

 

2018-11-12 22_18_12-Microsoft Edge.png

 2018-11-12 22_28_04-Microsoft Edge.png

 

 

The other Copy File component throws the same exception (they point to the same SPO site). Does anyone know what's wrong?

 

Thanks for any help!

8 REPLIES 8
Community Support Team
Community Support Team

Re: SharePoint Copy File - Bad Gateway

Hi @DotNetMatt,

 

What’s your current situation? Are you still having the issue?

According to your description, I have made the following flow for testing.

Trigger the flow with a manual button, start an approval. If the response is Approve, insert the response into an Excel table, and finally Copy the file from one library to another.

It works as expected.

1.PNG2.PNG

Besides, error code 500 or 502 means that the failure is temporary or transient. Please try to click or tap resubmit to try the flow again.

If you are still having the issue, please feel free post back.

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
DotNetMatt
Level: Powered On

Re: SharePoint Copy File - Bad Gateway

Hi Mabel,

Thanks for your reply! Your test case is similar to what I'm trying to achieve.

 

I ran the flow exactly as it was when I did the screenshots, and I still received the same 502 error as described in my original post.

 

Then, I tried to remove the component, save the flow, and add a new Copy File component again with the exact same configuration. This time I receive another exception 400:

 

{
  "status": 400,
  "message": "Fatal failure occurred during convert stage. Error is: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)\r\nclientRequestId: 8a155e74-93ed-4967-a386-fa4eebe15fed\r\nserviceRequestId: b175a29e-70a8-7000-99f4-bd30265896d8"
}

 

The message is different but resembles the one I received with exception 502.

 

If you need any other info, please let me know.

 

Community Support Team
Community Support Team

Re: SharePoint Copy File - Bad Gateway

Hi @DotNetMatt,

 

Could you try the Copy file action without adding dynamic contents in the destination folder?

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
DotNetMatt
Level: Powered On

Re: SharePoint Copy File - Bad Gateway

Hi @v-yamao-msft, I removed the "Each" component adding dynamic data into the file, and received an exact same 400 error:

{
  "status": 400,
  "message": "Fatal failure occurred during convert stage. Error is: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)\r\nclientRequestId: 9b503aa4-7233-4ade-ba68-f0ce411f7d35\r\nserviceRequestId: 99a8a29e-50cf-7000-99f4-b5a2144ed35b"
}

I also tried to remove the Copy File component and add a new one, same result:

{
  "status": 400,
  "message": "Fatal failure occurred during convert stage. Error is: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)\r\nclientRequestId: 4a59590b-01bb-4e16-8546-014f8cb47079\r\nserviceRequestId: dea8a29e-f0d0-7000-99f4-bda1508ebad5"
}

 [EDIT] I created a workflow from scratch with just a manual trigger and a Copy File component, same error 400 and message:

{
  "status": 400,
  "message": "Fatal failure occurred during convert stage. Error is: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)\r\nclientRequestId: aebb802d-bbd6-4a06-b699-0714d8b6ae46\r\nserviceRequestId: 57a9a29e-20a7-7000-7dbd-91e28b6dc9ec"
}
NMC_IT
Level: Powered On

Re: SharePoint Copy File - Bad Gateway

I too am having this problem.  My use case is extremely simple: Check to see if 'Copy to site' is in a text field and if it is, copy to another library.  I also get 'Bad Gateway' on the Copy File action.

 

message": "BadGateway",
"innerError": {
"status": 500,
"message": "The system cannot find the file specified. (Exception from HRESULT: 0x80070002)\r\nclientRequestId: 85bdda98-b7f5-4a63-9107-14d745a02877\r\nserviceRequestId: 7090a49e-d061-7000-6689-dfd94fed8809"
 
 
DotNetMatt
Level: Powered On

Re: SharePoint Copy File - Bad Gateway

Hi @v-yamao-msft, do you have any update for us?

 

If not I will go ahead and open a ticket as this is blocking all our flows.

NMC_IT
Level: Powered On

Re: SharePoint Copy File - Bad Gateway

I don't know if this will work for you, but in my flow I changed the 'File to Copy' attribute to 'Idenitifier' and it solved the gateway issue. I previously had it as 'File name with extension'.

 

flow.jpg

Ssnvss
Level: Power Up

Re: SharePoint Copy File - Bad Gateway

Me too facing same issue of below.

I am using same library copy folder to another. Run inputs looks good (after expressions settle on values).

Fatal failure occurred during convert stage. Error is: <nativehr>0x80070002</nativehr><nativestack></nativestack>

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,146)