Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

CloudeQueue.AddMessageAsync throws TaskCanceledException under dnx/colreclr 1.0.0-rc1-final #220

Closed
peterblazejewicz opened this issue Dec 26, 2015 · 5 comments

Comments

@peterblazejewicz
Copy link

That is related to preview version.

I've a simple problem when using CloudeQueue.AddMessageAsync on Mac OS X. It just times out with exception:

fail: AzureQueueApp.Program[0]
      Error: One or more errors occurred.
info: AzureQueueApp.Program[0]
         at System.Threading.Tasks.Task.ThrowIfExceptional (Boolean includeTaskCanceledExceptions) in <filename unknown>:line 0
         at System.Threading.Tasks.Task.Wait (Int32 millisecondsTimeout, CancellationToken cancellationToken) in <filename unknown>:line 0
         at System.Threading.Tasks.Task.Wait () in <filename unknown>:line 0
         at AzureQueueApp.Program.Main (System.String[] args) in <filename unknown>:line 0

(really sorry for scarce debug information, but that is under OS X/Mono and I cannot configure it successfully yet with VSCode when custom libs are used in projects).

I can use the same method synchronous version without a problem:

await Task.Factory.StartNew(() => queue.AddMessage(message));

I can replicate timeout exception by using custom Token with small cancellation interval.

Microsoft .NET Development Utility Mono-x64-1.0.0-rc1-16202

Listing dependencies for AzureQueueApp (/Users/piotrblazejewicz/git/azure-aspnet5-examples/src/AzureQueueApp/project.json)

[Target framework DNX,Version=v4.5.1 (dnx451)]

Framework references:
  fx/Microsoft.CSharp 4.0.0
  fx/mscorlib 4.0.0
  fx/System 4.0.0
  fx/System.Collections.Concurrent 4.0.0
  fx/System.Core 4.0.0
  fx/System.Data 4.0.0
  fx/System.Xml 4.0.0
  fx/System.Xml.Linq 4.0.0

Package references:
* FluentCommandLineParser 1.4.3
* GenFu 1.0.4
  Microsoft.Azure.KeyVault.Core 1.0.0
  Microsoft.Data.Edm 5.6.4
  Microsoft.Data.OData 5.6.4
  Microsoft.Data.Services.Client 5.6.4
* Microsoft.Extensions.Configuration 1.0.0-rc1-final
  Microsoft.Extensions.Configuration.Abstractions 1.0.0-rc1-final
* Microsoft.Extensions.Configuration.EnvironmentVariables 1.0.0-rc1-final
  Microsoft.Extensions.Configuration.FileExtensions 1.0.0-rc1-final
* Microsoft.Extensions.Configuration.Json 1.0.0-rc1-final
* Microsoft.Extensions.Configuration.UserSecrets 1.0.0-rc1-final
  Microsoft.Extensions.DependencyInjection.Abstractions 1.0.0-rc1-final
* Microsoft.Extensions.Logging 1.0.0-rc1-final
  Microsoft.Extensions.Logging.Abstractions 1.0.0-rc1-final
* Microsoft.Extensions.Logging.Console 1.0.0-rc1-final
  Microsoft.Extensions.PlatformAbstractions 1.0.0-rc1-final
  Microsoft.Extensions.Primitives 1.0.0-rc1-final
* Microsoft.Extensions.SecretManager 1.0.0-rc1-final
* Newtonsoft.Json 8.0.1-beta3
  System.Linq 4.0.1-beta-23409
  System.Spatial 5.6.4
* WindowsAzure.Storage 6.2.2-preview

Thanks!

@pemari-msft
Copy link
Member

Thanks for reporting this. We're investigating.

@pemari-msft
Copy link
Member

Hi @peterblazejewicz, just a quick question -- it seems you're using our net40 dll on Mac OSX from this line: [Target framework DNX,Version=v4.5.1 (dnx451)] and not our CoreCLR library (TFM dotnet5.4).

Is this the case? Can we see your project.json file? If it is set up with dnx451 then I would imagine this is not a supported scenario (we haven't tested our desktop code on Mono). But if it's dotnet5.4 or dnxcore50 this sounds like maybe it is a bug with the CoreCLR.

@peterblazejewicz
Copy link
Author

@pemari-msft
Peter, sure:
https://github.com/peterblazejewicz/azure-aspnet5-examples/tree/master/src/AzureQueueApp
Yes, it's DNX on mono (as other SDKs are not yet ported to CoreCLR).
Let me know your thoughts, Thanks!

@pemari-msft
Copy link
Member

Yes, that seems like it’s the reason. The supported scenario here is to use CoreCLR to run cross platform. That’s one of the main selling points of that target. It’s unfortunate that your other dependencies are not supporting this, but for us this (regular .NET 4.0 code on OSX) is an unsupported scenario. It sounds as if (by using the sync code) you’ve found yourself a workaround. Please do let us know if you find any other issues.

Best, Peter

@peterblazejewicz
Copy link
Author

Thanks! I think I'll migrate cmd line app to use .NET core implementation for now. If ready, I'll just post a link for others here.

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

No branches or pull requests

2 participants