-
Notifications
You must be signed in to change notification settings - Fork 275
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
Blob Storage conditional header(s) is not met #314
Comments
I'm seeing the same issue. Code looks something like this: import { BotFrameworkAdapter, MemoryStorage, ConversationState } from 'botbuilder';
import * as restify from 'restify';
import { BlobStorage } from 'botbuilder-azure';
const adapter = new BotFrameworkAdapter({
appId: process.env.MICROSOFT_APP_ID,
appPassword: process.env.MICROSOFT_APP_PASSWORD
});
var container_name = process.env.BLOB_CONTAINER; // container name
var storageAccountName = process.env.STORAGE_ACCOUNT_NAME; // single string, eg, 'test'
var storageAccountKey = process.env.STORAGE_ACCOUNT_KEY; //base64 encoded key
storage = new BlobStorage({ storageAccountOrConnectionString: storageAccountName, containerName: container_name, storageAccessKey: storageAccountKey });
const conversationState = new ConversationState<EchoState>(storage);
adapter.use(conversationState); The error message looks like this
Authentication is correct - the container was created. No blobs are created. Package info: -- botbuilder@4.0.0-preview1.2 |
Same here. After running into issue #277, I decided to switch to blob storage, and am now running into this. |
@stevengum will update storage packages |
Currently investigating... |
@luspac, @szul, @xtellurian, can you check your blob containers and see if there are any blobs being created? I think I found the actual issue (or another issue). |
@stevengum In my case, no blobs were actually created in the blob containers. Something to note: With both this and table storage, something like @xtellurian's code is what throws the error for me; however, if I take that same blob storage or table storage object that has been initialized, and try to read/write to it, I can do so successfully. The error seems to be exclusively with state management. |
@szul, what you said confirms what I suspected; the blob isn't created and a 404 is actually thrown at some point(s). (Also, on rereading @xtellurian's comment confirms the same) This is because we're trying to get a blob that doesn't exist (the code currently creates a container if the container is not found, but there aren't any I believe the 412 (The condition specified using HTTP conditional header(s) is not met) is thrown when the bot tries to write changes. I'm working today to get this bug fixed and if all goes well it should be out in our nightly builds tonight, which can be found here. |
fix merged into master. |
I am having an issue with Blob Storage.
I am able to read and write information to Blob Storage but receive a warning:
Unhandled promise rejection (rejection id: 1): StorageError: The condition specified using HTTP conditional header(s) is not met.
To access the Blob Storage I pass in my settings.
The definition of BlobStorage requires a storageAccessKey but I immediately get thrown an error if I add that parameter to the Blob Storage connection.
The way in which I am accessing the storage is handled in this function below. Any insight into this would be much appreciated.
The text was updated successfully, but these errors were encountered: