Skip to content
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

Error(500): Azurite-Blob/3.19.0- on-CreateDirectory #1678

Open
sheshisheriaspen opened this issue Sep 13, 2022 · 1 comment
Open

Error(500): Azurite-Blob/3.19.0- on-CreateDirectory #1678

sheshisheriaspen opened this issue Sep 13, 2022 · 1 comment
Assignees
Labels
blob-storage featureparity Tracking issues for catching up feature parity

Comments

@sheshisheriaspen
Copy link

sheshisheriaspen commented Sep 13, 2022

Which service(blob, file, queue, table) does this issue concern?

blob

Which version of the Azurite was used?

Azurite-Blob/3.19.0

Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

DockerHub

What's the Node.js version?

v16.14.2

What problem was encountered?

DataLakeFileSystemClient filesystem = dataLakeServiceClient.GetFileSystemClient("containerName");
filesystem.Create(); -- -create conainer -- works good
filesystem.CreateDirectory("RootDirectory"); -- create directory -- fails with http 500

Steps to reproduce the issue?

  1. Create console application
  2. add PackageReference Azure.Storage.Files.DataLake
  3. copy and paste following in program.cs
    using Azure.Storage;
    using Azure.Storage.Files.DataLake;

Console.WriteLine("Hello, World!");

try
{
var credentials = new StorageSharedKeyCredential(
"devstoreaccount1",
"Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==");
var sa_uri = new Uri("http://127.0.0.1:10000/devstoreaccount1/");

var client = new DataLakeServiceClient(sa_uri, credentials);

DataLakeFileSystemClient filesystem = client.GetFileSystemClient("testcontainer");
filesystem.Create();
filesystem.CreateDirectory("testdirectory");

}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}

If possible, please provide the debug log using the -d parameter, replacing <pathtodebuglog> with an appropriate path for your OS, or review the instructions for docker containers:

-d "<pathtodebuglog>"
2022-09-13T14:24:08.002Z 0cb0c6ae-67f5-4fd6-8d36-fe86eca08cf8 verbose: DeserializerMiddleware: Start deserializing...
2022-09-13T14:24:08.003Z 0cb0c6ae-67f5-4fd6-8d36-fe86eca08cf8 info: HandlerMiddleware: DeserializedParameters={"options":{"requestId":"aeed715f-2a1e-4e29-8b3d-6cdc42f4c40c","directoryHttpHeaders":{},"leaseAccessConditions":{},"modifiedAccessConditions":{}},"resource":"directory","version":"2021-08-06"}
2022-09-13T14:24:08.003Z 0cb0c6ae-67f5-4fd6-8d36-fe86eca08cf8 error: ErrorMiddleware: Received an error, fill error information to HTTP response
2022-09-13T14:24:08.003Z 0cb0c6ae-67f5-4fd6-8d36-fe86eca08cf8 error: ErrorMiddleware: ErrorName=TypeError ErrorMessage=Cannot read properties of undefined (reading 'apply') ErrorStack="TypeError: Cannot read properties of undefined (reading 'apply')\n    at C:\\Users\\username\\AppData\\Roaming\\npm\\node_modules\\azurite\\dist\\src\\blob\\generated\\middleware\\HandlerMiddlewareFactory.js:58:18\n    at C:\\Users\\username\\AppData\\Roaming\\npm\\node_modules\\azurite\\dist\\src\\blob\\generated\\ExpressMiddlewareFactory.js:77:63\n    at Layer.handle [as handle_request] (C:\\Users\\username\\AppData\\Roaming\\npm\\node_modules\\azurite\\node_modules\\express\\lib\\router\\layer.js:95:5)\n    at trim_prefix (C:\\Users\\username\\AppData\\Roaming\\npm\\node_modules\\azurite\\node_modules\\express\\lib\\router\\index.js:328:13)\n    at C:\\Users\\username\\AppData\\Roaming\\npm\\node_modules\\azurite\\node_modules\\express\\lib\\router\\index.js:286:9\n    at Function.process_params (C:\\Users\\username\\AppData\\Roaming\\npm\\node_modules\\azurite\\node_modules\\express\\lib\\router\\index.js:346:12)\n    at next (C:\\Users\\username\\AppData\\Roaming\\npm\\node_modules\\azurite\\node_modules\\express\\lib\\router\\index.js:280:10)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)"
2022-09-13T14:24:08.003Z 0cb0c6ae-67f5-4fd6-8d36-fe86eca08cf8 error: ErrorMiddleware: Set HTTP code: 500

Please be sure to remove any PII or sensitive information before sharing!
The debug log will log raw request headers and bodies, so that we can replay these against Azurite using REST and create tests to validate resolution.

Have you found a mitigation/solution?

Nope.

@blueww blueww self-assigned this Sep 14, 2022
@blueww blueww added blob-storage featureparity Tracking issues for catching up feature parity labels Sep 14, 2022
@blueww
Copy link
Member

blueww commented Sep 14, 2022

@sheshisheriaspen
Currently Azurite only support Blob, Queue, and Table (preview), but not support datalake gen2.
Since CreateDirectory is a datalakegen2 API, Azurite still not support it.

Besides that, for create filesystem, file system is also a blob container, so SDK might call it through blob API, which is supported by Azurite, so it success.

BTW, we already has issue to track datalakegen2 support: #553.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blob-storage featureparity Tracking issues for catching up feature parity
Projects
None yet
Development

No branches or pull requests

2 participants