You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a simple conversion use case. But it seems that CreateJobAsync hangs. During troubleshooting, I implemented creating a job via RestSharp and it completes just fine. I am seeing the same behavior with UploadAsync, and WaitJobAsync. Any idea what I'm doing wrong here?
var job = await _cloudConvert.CreateJobAsync(new JobCreateRequest
{
Tasks = new
{
import_it = new ImportUploadCreateRequest(),
convert = new ConvertCreateRequest
{
Input = "import_it",
Input_Format = inputFormat,
Output_Format = outputFormat
},
export_it = new ExportUrlCreateRequest
{
Input = "convert"
}
}
});
var uploadTask = job.Data.Tasks.FirstOrDefault(t => t.Name == "import");
var bytes = File.StoredFileAsByteArray(storedFile);
await _cloudConvert.UploadAsync(
uploadTask?.Result.Form.Url.ToString(),
bytes,
storedFile.Name,
uploadTask?.Result.Form.Parameters);
job = await _cloudConvert.WaitJobAsync(job.Data.Id); // Wait for job completion
var exportTask = job.Data.Tasks.FirstOrDefault(t => t.Name == "export_it");
var fileExport = exportTask.Result.Files.FirstOrDefault();
return fileExport.Url.ToString();
The text was updated successfully, but these errors were encountered:
I've been trying that to no avail. When I attach and set a breakpoint on the CreateJobAsync method then step into or over, nothing happens. There is no response, no exception is thrown, nothing happens.
So it seems that I'm getting a deadlock on var response = await base.SendAsync(request, cancellationToken); in the WebApiHandler. Since I don't have a pdb of the SDK to debug, I implemented it in my project to step through. When I change it to var response = base.SendAsync(request, cancellationToken).Result;, then I avoid the deadlock and can see a response.
I have a simple conversion use case. But it seems that CreateJobAsync hangs. During troubleshooting, I implemented creating a job via RestSharp and it completes just fine. I am seeing the same behavior with UploadAsync, and WaitJobAsync. Any idea what I'm doing wrong here?
The text was updated successfully, but these errors were encountered: