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

SharePoint Copy File error

I have a fairly straight forward archive workflow to move older SharePoint library entries from a work library to an archive library.  The basic flow is as follows: Get Files (properties only) ->checks conditions -> if met then Copy File -> Update File Properties -> Delete File.  The conditions check for specific file types and last modified greater than 6 months. 

 

Right now I have it running daily, and every day I get multiple files failing with an error code of 400 an a msg saying "Source object has changed during copy process. please rerun copy operation to get the latest copy."  The next day when the archive job runs, the files that errored out, get archived.  

 

I would like to improve the efficiency of my flow.  For example, in the 3 runs this week, I had 22 files fail archiving with the error, only 3 archived on the first attempt, and 20 of the failed files archived on the following day.  The remaining 2 are failures today and I expect will archive tomorrow.

 

Is anyone else seeing this, or does anyone have any ideas on how to resolve the problem beyond just having them get picked up in the next cycle?  

 

Thanks,

Tom 

18 REPLIES 18
SCTdan
Level 8

Re: SharePoint Copy File error

What if you compare the results of Get Properties when a file fails vs when it succeeds, perhaps a clue in there?

tsyrell
Level: Powered On

Re: SharePoint Copy File error

I will give that a shot.  I would assume, maybe incorrectly, that if anything changed, it would result in the 'last modified date' to be updated, but that's not happening.

SCTdan
Level 8

Re: SharePoint Copy File error

I'm not sure what the resulting behavior would/should be, but is it possible that someone has the file open for viewing?  

tsyrell
Level: Powered On

Re: SharePoint Copy File error

I think that's extremely unlikely for these types of files as they are essentially old production batch files that are only kept for auditing purposes.  I could maybe see an occasional fail, but this is consistently failing more times than it initially succeeds in any run, and then next run always resolves the previous runs failures. 

 

I'll let you know if anything turns up with the properties.

SaschaTorkel
Level: Powered On

Re: SharePoint Copy File error

@tsyrell Did you figure out what the problem was? I am hitting the same issue and I'm definitely not touching the documents while the flow runs.

Super User
Super User

Re: SharePoint Copy File error

Hi @SaschaTorkel can you please share a screenshot of your Flow? Also if possible, share the output of a failed file and a successful file. In the meantime I will try to build a similar Flow to see if I can recreate the issue.





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

SaschaTorkel
Level: Powered On

Re: SharePoint Copy File error

Sure:
flow.PNG

 

@MattWeston365  I'm not sure what you exactly mean by "output of a failed and succesful file". Here a screenshot of one failed copy action:

flow1.PNG

 

The full error message:

{
"status": 400,
"message": "Source object has changed during copy process. please rerun copy operation to get the latest copy. Source file length 73655, target file length 75778, source file eTag \"{7635DB32-218D-4A35-A7DE-3D11EBEFB7A6},9\", target file eTag \"{7635DB32-218D-4A35-A7DE-3D11EBEFB7A6},8\" CallStack -- \r\nclientRequestId: 63ee2bf3-fa0d-4107-ad62-7ca70d69f0e1\r\nserviceRequestId: 63ee2bf3-fa0d-4107-ad62-7ca70d69f0e1"
}
 
As a workaround I put in the same copy action again set to "run after failed". For now all files get copied at least with the second try, but this is not a solution I like to put in production.
tsyrell
Level: Powered On

Re: SharePoint Copy File error

Hi Sasha and Matt

 

I never determined the isues, so I essentially ended up doing nothing.  When tracking the failed files, it appeard that when the flow ran the next time (it's scheduled to run daily), it usually picked them up.  Sometimes it took a secnd run, but they were always processed successfully.

Super User
Super User

Re: SharePoint Copy File error

Hi @tsyrell and @SaschaTorkel 

 

I've been trying to replicate the issue. Never have I wanted my Flow to fail so badly so that I can try to help, but every test so far has been successful. Here is what my Flow looks like:

 

Copy.PNG

It's simple, but it seems to work every time (even trying with an old .XLT file format). In your Flows, what actions are taking place before you start the copy process?





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

SaschaTorkel
Level: Powered On

Re: SharePoint Copy File error

@MattWeston365 thank you for trying to reproduce this error. If you search for the exact error message, you get one hit on google: this thread. So this problem seems to be not that common.

 

Anyway, the flow is based on "new item created" trigger on a SharePoint list, where a user selects the documents to be copied via a PowerApps form.

Here are the immediate actions before the "copy document loop": https://1drv.ms/u/s!AtXsM1f8HFVSuAaSdm7VtqF3aRbB (Somehow i cannot embed images anymore here)

 

I prepare the loan ID, which serves als target folder name, which is set up by the create file action. Also I put the IDs of the documents, that should be copied, in to an array and use it in the apply to each loop.

Super User
Super User

Re: SharePoint Copy File error

Thanks for that @SaschaTorkel , I'll refactor my Flow. I might also suggest an alternative method for copying/moving the file which might be worth trying.

 

On an aside, I found the same that this thread was the only one in search engines when searching for the error. On the bright side, you're top of Google Smiley Happy





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

giovani_martini
Level: Power Up

Re: SharePoint Copy File error

Same problem here Smiley Sad

Im my case, flow is trigered by http call and allways fails in the first run .. same error.

Super User
Super User

Re: SharePoint Copy File error

Hi @giovani_martini did you say that you were using the Send HTTP Request to SharePoint action and you're getting the same error?





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

giovani_martini
Level: Power Up

Re: SharePoint Copy File error

Hi @MattWeston365 

No, I meant to say that my flow trigger is "When an HTTP request is received". But that has nothing to do with the error on the action that copies the file to another library.

 

The error i am facing is the same as @tsyrell , "Source object has changed during copy process. Please rerun copy operation to get the latest copy."

 

I have this flow that is triggered manually by a http request, it should copy a document from one library to another using this action, simple as that!

 

Sometimes works, sometimes don't, and i don't know why, this error message is not helping.

vince_jennings
Level: Powered On

Re: SharePoint Copy File error

I'm having the same problem.

 

The flow is triggered by flaging an email.

The flow copies 2 Excel files from one folder in a SharePoint library to another folder in the same SharePoint library.

The first file always copies and the second file sometimes fails.

Neither of the source files are being edited by anyone.

 

This is the error details reported by MS Flow:

Source object has changed during copy process. please rerun copy operation to get the latest copy. Source file length 241542, target file length 246391, source file eTag "{47C123A7-BC4C-432F-A23B-D77EF1AB98C7},99", target file eTag "{47C123A7-BC4C-432F-A23B-D77EF1AB98C7},98" CallStack --
clientRequestId: b0901234-567a-1b2c-d3e4-0a2b3c45d033
serviceRequestId: b0901234-567a-1b2c-d3e4-0a2b3c45d033

 

giovani_martini
Level: Power Up

Re: SharePoint Copy File error

Hi!

Looks like the error stopped, at least for me.

My flow did run 25 times without any error, and i didnt change nothing.

Highlighted
AlexDorfmayr
Level: Powered On

Re: SharePoint Copy File error

Hi everyone,

on our side this errors did just start like 1 week ago - same as above mentioned:

Source object has changed during copy process. please rerun copy operation to get the latest copy. 
Source file length 69829, target file length 72478, source file eTag "{3CA4FAE5-6B62-4D12-9C87-2DF7CA899EF9},5",
target file eTag "{3CA4FAE5-6B62-4D12-9C87-2DF7CA899EF9},4" CallStack -- clientRequestId: 2e6ff3da-03ce-4f00-84d5-e6d1b5dd5c54 serviceRequestId: 2e6ff3da-03ce-4f00-84d5-e6d1b5dd5c54

I didn't do that much as just this actions happen bevor the crash:
2019-07-17 21_04_08-Microsoft Edge.png

Any help or evenguesses where to start fixing this could be helpful.

As the pre-comments already mentioned: without any changes the flow runs just smooth when you simply rerun it - so the same file, the same source, the same everything - just when you run it a second time everything is fine. At the first try it isn't..... and even that: sometimes the flow runs even at the first attempt.?!? 

giovani_martini
Level: Power Up

Re: SharePoint Copy File error

Hi @AlexDorfmayr 

 

I did some attempts trying to figure out why this was breaking. When the error was occurring to me, I have notice that the error happen mostly when the file was recently created or modified, or when file was opened while de flow runs.

But like I mentioned, this error stop for me. Hope you find a solution for you.

Best!

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Users Online
Currently online: 460 members 4,586 guests
Please welcome our newest community members: