1
votes

I want to go through the queue data in Azure queue storage in a HTTP trigger function App. I add the "äzure-storage" Node.js package and using following code: var azure = require('azure-storage'); But either the code var queueSvc = azure.createQueueService(); or var queueSvc = azure.createQueueService(<storage connection string>); is failure when execute the function. I got below exception

"reason": "PassThrough", "exception": { "ClassName": "System.Threading.Tasks.TaskCanceledException", "Message": "A task was canceled.", "Data": null, "InnerException": null, "HelpURL": null, "StackTraceString": " at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at AzureFunctions.Code.PassThroughRequestManager.d__2.MoveNext()", "RemoteStackTraceString": null, "RemoteStackIndex": 0, "ExceptionMethod": "8\nThrowForNonSuccess\nmscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Runtime.CompilerServices.TaskAwaiter\nVoid ThrowForNonSuccess(System.Threading.Tasks.Task)", "HResult": -2146233029, "Source": "mscorlib", "WatsonBuckets": null } }

1

1 Answers

0
votes

I can't reproduce this issue in a simple HTTP trigger function with Javascript:

  • Install azure-storage via Kudu debug console (https://<functionname>.scm.azurewebsites.net/DebugConsole):

    enter image description here

  • In the index.js file I have this:

    enter image description here