Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] InvalidOperationException when using the Copy method #24

Closed
eirielson opened this issue Oct 14, 2020 · 3 comments
Closed

[BUG] InvalidOperationException when using the Copy method #24

eirielson opened this issue Oct 14, 2020 · 3 comments
Assignees

Comments

@eirielson
Copy link

Describe the bug
Hi,
I'm trying to use Api's Copy method. But I am getting an InvalidOperationException. "An invalid request URI was provided. The request URI must either be an absolute URI or BaseAddress must be set."

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Demo Application', run and click on the Authorize button
  2. Click on 'Copy' button
  3. See error
   at System.Net.Http.HttpClient.PrepareRequestMessage(HttpRequestMessage request)
   at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request)
   at KoenZomers.OneDrive.Api.OneDriveApi.<SendMessageReturnHttpResponse>d__142.MoveNext() in D:\workspace\labs\OneDriveAPI\Api\OneDriveApi.cs:line 2015
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at KoenZomers.OneDrive.Api.OneDriveApi.<SendMessageReturnBool>d__141.MoveNext() in D:\workspace\labs\OneDriveAPI\Api\OneDriveApi.cs:line 1973
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at KoenZomers.OneDrive.Api.OneDriveGraphApi.<CopyItemInternal>d__60.MoveNext() in D:\workspace\labs\OneDriveAPI\Api\OneDriveGraphApi.cs:line 794
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at KoenZomers.OneDrive.Api.OneDriveApi.<Copy>d__86.MoveNext() in D:\workspace\labs\OneDriveAPI\Api\OneDriveApi.cs:line 704
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at KoenZomers.OneDrive.Api.OneDriveApi.<Copy>d__85.MoveNext() in D:\workspace\labs\OneDriveAPI\Api\OneDriveApi.cs:line 692
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at KoenZomers.OneDrive.AuthenticatorApp.MainForm.<CopyButton_Click>d__27.MoveNext() in D:\workspace\labs\OneDriveAPI\Demo\MainForm.cs:line 376

ps: Create a file on the drive inside a "test"folder

Expected behavior
The created file should be copied into the folder

Screenshots
image
image
image

Versions (please complete the following information):

  • OS: Windows 10
  • OneDriveApi: master branch
@KoenZomers
Copy link
Owner

Thanks for the extensive information @eirielson . I can reproduce this. Looking into it.

@KoenZomers
Copy link
Owner

Found it and fixed it. Releasing new version now.

@KoenZomers
Copy link
Owner

Released. https://www.nuget.org/packages/KoenZomers.OneDrive.Api/2.3.1.1

Closing this issue. If the problem persists for you using this new version, feel free to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants