microsoft / AzureStorageExplorer

Easily manage the contents of your storage account with Azure Storage Explorer. Upload, download, and manage blobs, files, queues, tables, and Cosmos DB entities. Gain easy access to manage your virtual machine disks. Work with either Azure Resource Manager or classic storage accounts, plus manage and configure cross-origin resource sharing (CORS) rules.
Creative Commons Attribution 4.0 International
370 stars 84 forks source link

Linux: Specified argument was out of the range of valid values, Parameter name: path #4334

Open spcvalente opened 3 years ago

spcvalente commented 3 years ago

Storage Explorer Version: 1.18.1 Build Number: can't check Platform/OS: Ubuntu 20.04 Architecture: x64 Regression From: na

Bug Description

I installed Azure Storage Explorer with snap. When starting it, this message pops up: "To run Microsoft Azure Storage Explorer on Linux, you must have .NET Core 2.1 installed. Please make sure .NET Core 2.1 is properly installed before launching the application again." I installed (and removed) .NET with multiple combinations: runtime, even SDK, multiple versions (2.1, 3.1, 5.0), with apt-get, with snap, following this and this. I also checked 2322 and 2327 and followed the steps you suggested there, removing ServiceHub folders, reinstalling storage-explorer. All with great failure.

$ dotnet --info
Host (useful for support):
  Version: 2.1.27
  Commit:  37d16c2b4d

.NET Core SDKs installed:
  No SDKs were found.

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.27 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.27 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.27 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

I can't attach the ~/.ServiceHub/logs/ folder as it does not exist on my case.

Steps to Reproduce

Start Azure Storage Explorer

Expected Experience

Start Program

Actual Experience

"To run Microsoft Azure Storage Explorer on Linux, you must have .NET Core 2.1 installed. Please make sure .NET Core 2.1 is properly installed before launching the application again."

Additional Context

Related to 2322 and 2327

MRayermannMSFT commented 3 years ago

@spcvalente since you opened this issue, we released Storage Explorer 1.19.0. In that version, we've added some additional logging for this failure scenario. Please download and use that version. You can get it here: https://storageexplorer.com

After you do that, please try to get Storage Explorer logs and servicehub logs (if possible).

spcvalente commented 3 years ago

@MRayermannMSFT I installed it, same error.

The authentication library used by Storage Explorer has failed to start properly. Please ensure you have .NET Core 2.1 installed. If .NET Core 2.1 is already installed then refer to the troubleshooting guide for help. Verbose authentication logging has been enabled. Error:Hub Controller process exited prematurely with exit code 22 (ErrorStartingServer).

Storage Explorer logs.

servicehub logs were not created.

Thanks.

MRayermannMSFT commented 3 years ago

@spcvalente how long is your username (on your computer that is)?

spcvalente commented 3 years ago

@MRayermannMSFT username 18 characters hostname 15 characters

MRayermannMSFT commented 3 years ago

@spcvalente can you see if there's anything in the folder:

~/snap/storage-explorer/22/.ServiceHub/logs or ~/snap/storage-explorer/current/.ServiceHub/logs?

For the question about your username length, that path of investigation seems to be a dead end. :(

MRayermannMSFT commented 3 years ago

And if you can't find those dirs, then do this:

  1. Start Storage Explorer
  2. When the error dialog opens, press F12
  3. Go to the console image
  4. Type in process.env.HOME and hit enter
  5. Tell me how long that path is, and also go to that path and see if you can find the .ServiceHub/logs dir in it
spcvalente commented 3 years ago

hi @MRayermannMSFT process.env.HOME is 64 characters long and points to "22" nevertheless, please find "22" and "current" versions attached, both from ~/snap/storage-explorer/xxxxxx/.ServiceHub/logs logs.zip

MRayermannMSFT commented 3 years ago

Hey @spcvalente, thanks for continuing to work with me here. I've been given a patch of a file to help us nail down what is broken. Here's what I need you to do:

  1. Download https://storageexplorerpublish.blob.core.windows.net/privatebuilds/4334-controller/Microsoft.ServiceHub.Controller.dll
  2. sudo mount -o ro,bind <path to the downloaded file> /snap/storage-explorer/current/resources/app/ServiceHub/Controllers/microsoft-servicehub-controller/Microsoft.ServiceHub.Controller.dll (this command temporarily patches that file in the snap install, the patch contains extra logging)
  3. rm ~/snap/storage-explorer/current/.ServiceHub/logs/*
  4. storage-explorer
  5. Issue should reproduce
  6. Close Storage Explorer
  7. Upload the contents of ~/snap/storage-explorer/current/.ServiceHub/logs/ to here again
  8. sudo umount /snap/storage-explorer/current/resources/app/ServiceHub/Controllers/microsoft-servicehub-controller/Microsoft.ServiceHub.Controller.dll (this command removes the patch)
spcvalente commented 3 years ago

Hey @MRayermannMSFT you're welcome here it goes logs2.zip

MRayermannMSFT commented 3 years ago

@spcvalente thank you. That now confirms what we believed to be the issue.

Long story short, the auth library used by Storage Explorer needs to create a socket. You can see the path for that socket in the log files you uploaded. Unfortunately the path is too long (you can see the exact length of the path in the log files). We're trying to see if there's something we can do to limit the path length, but I don't think such a solution will reach you until our next release in June.

So to unblock yourself, the only options I can see is to:

I'll keep trying to think of other creative workarounds for you. 😓

spcvalente commented 3 years ago

@MRayermannMSFT thanks, I'll use the tar.gz instead for anyone else with the same issue:

jpmeijers commented 2 years ago

Also affected here with snap version 32 and 33. So issue is still not fixed.

image

logs.zip

jpmeijers commented 2 years ago

@spcvalente thanks a lot for the guide to install the tar version. It works much faster than the snap version.

@MRayermannMSFT why don't you rather release a DEB version for Ubuntu. It's clear Snaps are bad.