Open sjpatelsundt opened 1 year ago
Hi,
I've just released a small update with various debug messages.
Can you please add / set the system.debug
variable in your pipeline to true
and re-run the task?
For each file, the log should now contain the exact request url which might give a us a clue on what's going wrong here..
Thank you!
Thank you, this debug helped. I am taking over this issue from sjpatelsundt. We found that the file is saying that the file already exists in SharePoint, but when we go to SharePoint the file isn't there. Is it possible that the file is being uploaded but not checked in, so it's not visible? Does your task support checking in the file to SharePoint?
2023-06-06T18:36:08.3453318Z { Error: The specified item name already exists. 2023-06-06T18:36:08.3454443Z at new GraphError (C:\agents_work_tasks\az-pipelines-2-sharepoint_1ed28650-ea93-45a3-8f29-d0400ad51ce9\0.3.4\node_modules\@microsoft\microsoft-graph-client\lib\src\GraphError.js:34:28) 2023-06-06T18:36:08.3455805Z ##[debug]task result: Failed 2023-06-06T18:36:08.3459307Z at Function.GraphErrorHandler.constructErrorFromResponse (C:\agents_work_tasks\az-pipelines-2-sharepoint_1ed28650-ea93-45a3-8f29-d0400ad51ce9\0.3.4\node_modules\@microsoft\microsoft-graph-client\lib\src\GraphErrorHandler.js:62:22) 2023-06-06T18:36:08.3497494Z ##[error]The specified item name already exists.
Hi,
no, currently there is no checkin option. Afaik, the file should be automatically checked in after upload (?)
Thanks for your reply, that's what we are trying to figure out. We can't see the file after it says it was successfully uploaded. The only thing I could think of was that it wasn't being checked in. When we run the process again, it says the file is already there (from DevOps) but in SharePoint we don't see the file.
The pipeline job successfully runs, as seen below: Starting: Upload files to SharePoint: /SQLDoc
Task : Upload files to SharePoint Online Description : Upload files to SharePoint Online Version : 0.3.3 Author : halliba (github.com/halliba) Help : github.com/halliba/az-pipelines-2-sharepoint
Found 4 files in 'C:\SQLDoc'. Validating drive id / url: 'https://xyz.sharepoint.com/sites/Infotech/Shared%20Documents'. Found drive 'IT Documents'. Copying files to ' [1/4] Copying 'doc1.pdf' -> 'doc1.pdf' [2/4] Copying 'doc2.pdf' -> 'doc2.pdf' [3/4] Copying 'doc3.pdf' -> 'doc3.pdf' [4/4] Copying 'doc4.pdf' -> 'doc4.pdf' Finishing: Upload files to SharePoint: /SQLDoc
However, in the SharePoint UI, these files are not found. We have tried uploading to a specific folder within SharePoint as well, and the same issue occurs.