1
votes

I'm receiving the following error when I try connecting to the emulated storage queue service:

The MAC signature found in the HTTP request '...' is not the same as any computed signature.

Make sure the value of Authorization header is formed correctly including the signature.

This is the approach I'm using to connect to the azure storage:

    var storageAccount = 'devstoreaccount1'
    var accessKey= 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=='
    var azure = require('azure-storage');
    var queueSvc = azure.createQueueService(storageAccount,accessKey);

    queueSvc.createMessage('myqueue', "Hello world!", function(error, results, response){
      if(!error){
        // Message inserted
      }
    });

I also tryed using the following connection strings, without success:

UseDevelopmentStorage=true

and

DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;
AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;
BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;
TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;
QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;

Everything is working properly in production environments, the issue is only related to the emulated service and specifically for the queues (emulated blobs are working as expected).

Any idea?

1
What is the version of SDK you’re using? - Gaurav Mantri
@GauravMantri "azure-storage": "^2.8.1" - ReDEyeS
@ReDEyeS if my solution does some help, you could accept it as an answer for others to refer. Much appreciated. - Jerry Liu

1 Answers

1
votes

I have reproduced your error after testing your code with SDK 2.8.1.

I get detailed log from console by using queueSvc.logger.level = azure.Logger.LogLevels.DEBUG;. The request uri generated by this method is https://devstoreaccount1.queue.core.windows.net:443/myqueue/messages, which is used to access storage account online called devstoreaccount1.

To access storage emulator:

var azure = require('azure-storage');
var devStoreCreds = azure.generateDevelopmentStorageCredentials();
var queueSvc = azure.createQueueService(devStoreCreds);