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
365 stars 85 forks source link

Fail to preview one 3D file with an error "Error creating WebGL context." #7884

Closed v-xianya closed 2 months ago

v-xianya commented 2 months ago

Storage Explorer Version: 1.34.0-dev (98) Build Number: 20240419.1 Branch: main Platform/OS: Windows 11 Architecture: arm64 How Found: From running test cases Regression From: Not a regression

Steps to Reproduce

  1. Expand one storage account -> Blob Containers.
  2. Create a blob container -> Upload a .stl file whose size is less than 10 MiB.
  3. Preview the file.
  4. Check whether the file is previewed successfully.

    Expected Experience

    The file is previewed successfully.

Actual Experience

Fail to preview the file with an error "message": "Error creating WebGL context". image

Additional Context

  1. This issue doesn't reproduce for Windows x64 (Windows 10).
  2. Display the same error "message": "Error creating WebGL context" when previewing .glb/.gltf/.obj/.stl files.
MRayermannMSFT commented 2 months ago

@v-xianya can you share a file used to repro this? I am not able to reproduce. In my case I used: Menger_sponge_sample.zip

craxal commented 2 months ago

I can reproduce on a Windows VM. This shouldn't be entirely surprising, because VMs don't come with hardware-accelerated graphics. This is easily proven by attempting to view THREE.js sample models.

@MRayermannMSFT @richardMSFT The error is being thrown when attempting to create the THREE.WebGLRenderer. Considering how often users install Storage Explorer on VMs, it may be prudent to add a try/catch block. But the error is fairly clear, so maybe we don't.

MRayermannMSFT commented 2 months ago

@v-xianya nevermind on needing a sample file. We'll instead focus on handling the error in a more graceful way.

MRayermannMSFT commented 2 months ago

Ok @v-xianya, first, it should be considered expected that 3d file preview doesn't work on the Auzre VM. However, I have updated the file preview exxperience to be more tolderant of this situation. In this situation, there should be an activity saying Storage Explorer was unable to preview, and no error dialogs should pop up unless you click on something to explicitly bring one up (ex: a "Details..." action).

v-xianya commented 2 months ago

Hi, @MRayermannMSFT thank you for the updates! On the new build 20240421.1, the current behaviors keep the same with the build 20240419.1. Are these the expected behaviors?

  1. Display an activity log saying Storage Explorer was unable to preview. image
  2. Popping up the error details after clicking 'Details...'. image
MRayermannMSFT commented 2 months ago

That is all expected! Thank you for verifying.