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

Connecting to Storage Account using SAS string with a trailing blank causes delete entity operations to fail #7680

Closed
3 tasks done
KerbalSpike opened this issue Jan 17, 2024 · 2 comments
Assignees
Milestone

Comments

@KerbalSpike
Copy link

KerbalSpike commented Jan 17, 2024

Preflight Checklist

Storage Explorer Version

1.32.0

Regression From

No response

Architecture

x64

Storage Explorer Build Number

20231114.10

Platform

Windows

OS Version

Windows 11 Version 22H2 (Build 22621.3007)

Bug Description

I have a certain storage account where I'm unable to delete any entities from any table using the Azure Storage Explorer. Attempting to do so always results in a "RestError" with the message "The specified resource name length is not within the permissible limits."

I didn't understand how that could be the case, since the resource was clearly there, I had full CRUD access from my app (including delete) and Azure Storage Explorer itself had no problem fetching as well as updating and inserting data. Only delete operations issued from Azure Storage Explorer ran into this error.

After a lot of searching, digging and testing I figured out that the root cause for this problem was an SAS string, that accidentally included a trailing blank at the end, that gets interpreted as belonging to the table endpoint URL.

This can easily be spotted by selecting table in the account and look at the URL in the properties section. It will look something like
https://{AccountName}.table.core.windows.net/ /tablename

For some reason and very confusingly, this only affects the delete operation. Table data can be viewed, edited and inserted without issues.

Steps to Reproduce

  1. Launch Storage Explorer
  2. Connect to a valid Storage Account using an SAS string that
    • has the TableEndpoint property at the end of the string
    • includes a trailing space
  3. Select a table (create if none exists)
  4. Select at least one entity in the table (create if none exists)
  5. Click Delete and confirm the action in the subsequent dialog.

Actual Experience

Operation fails with error
Failed to delete entities in table 'tablename'
Error Details json includes:

"name": "RestError",
"message": "The specified resource name length is not within the permissible limits. [snip]"

Expected Experience

Selected entity/entities is/are deleted.

Additional Context

No response

@craxal
Copy link
Contributor

craxal commented Jan 17, 2024

@KerbalSpike I assume you are able to work around this issue by removing the trailing space from the connection string? Do you know how the space got there (error in typing, space was in the connection string already, space was inserted when you copied, etc.)? Either way, we should be able to add this situation to our test cases and handle it appropriately.

@KerbalSpike
Copy link
Author

KerbalSpike commented Jan 18, 2024

@craxal
Your assumption is of course correct. Once I knew what was causing the issue, it was really simple to fix: just connect with the proper connection string without a trailing space.

I just wanted to make sure to document this issue here, because it had annoyed me for many weeks and searching for the error message brought me nowhere closer to solving it. Funnily enough I only discovered the real reason (the trailing blank) while trying to gather all details to create an issue for "unable to delete entities from tables for certain storage accounts".

I don't know how the space got there, but the most probable explanation is that it was accidentally included when I copied the SAS string from somewhere else.

I guess one way to fix this issue would be to do something like calling .Trim() on the connection string before using it? 🤷‍♂️

@craxal craxal self-assigned this Jan 18, 2024
@craxal craxal added this to the 1.33.0 milestone Jan 18, 2024
@craxal craxal closed this as completed Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants