Open mlxyz opened 1 year ago
Thank you for your feedback. This has been routed to the support team for assistance.
@mlxyz Apologies for the late reply. Thanks for reaching out to us and reporting this issue. We are looking into this issue and we will provide an update.
@mlxyz I tried to use the Azure.Storage.Blobs
version 12.14.1.0 library and the below code within my sample application and it worked fine. I am unable to reproduce this error.
string localFilePath = @"C:\fileName.txt";
string fileName = Path.GetFileName(localFilePath);
await container.GetBlobClient(fileName).UploadAsync(localFilePath, true);
Could you please confirm if the issue occurs only within Xamarin.Forms 5 targeting .NET Standard 2.1 application ? Awaiting your reply.
Thanks for looking into this @navba-MSFT. I've just tried running your code in a unit test project (targeting .NET Core 3.1) and it worked as expected. Maybe the issue also has something to do with the iOS platform? I will try out more next week!
@mlxyz Thanks for getting back. I was testing this on Windows platform. If you see the same issue on iOS platform using my above sample code, please do let me know.
PS: Update the local path of the file in the sample before testing the sample.
Hi @mlxyz. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve
” to remove the “issue-addressed” label and continue the conversation.
Hi @navba-MSFT, I can now confirm that this issue is happening on iOS, but not on Windows /unresolve I've created an MRE project here: https://github.com/mlxyz/32474-blob-storage-ios-repro I've tested this exact project on an iPad Pro (6th Generation) simulator with ipadOS 16.1 and it consistently fails with the exception I described above:
@mlxyz Thanks for getting back. We will check this and get back to you. In the meantime, Could you please let us know if you have tried to isolate the issue by changing the file size and file location etc ? Awaiting your reply.
@navba-MSFT Yes, I've tried image files and text files of various sizes (including very small ones, couple of bytes) in different locations (Path.GetTempFileName
or under Environment.SpecialFolder.LocalApplicationData
) - all leads to the same exception.
@mlxyz Apologies for the late reply. Thanks for getting back. I am discussing this issue internally. I will update this thread once I have more details.
@mlxyz It seems .NET has failed to load a type into the runtime. ReadOnlyMemory
Hi @navba-MSFT,
thanks for getting back. I just checked and the packages System.Memory
(4.5.5) and System.Memory.Data
(7.0.0) were already installed (also in the repro project I linked above) but the problem still persists. So this doesn't seem to be the problem.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.
Author: | mlxyz |
---|---|
Assignees: | - |
Labels: | `Storage`, `Service Attention`, `Client`, `customer-reported`, `bug`, `needs-team-attention` |
Milestone: | - |
@mlxyz Thanks for getting back. I am adding the Service Team to look into this.
@xgithubtriage Could you please look into this once you get a chance ? Thanks in advance.
I'm getting the same issue as this for a device , debug build on ios using visual studio on windows machine
Hello - We are seeing the same issue uploading files from iOS. Is there any update on resolving this?
@burrowj @AlanHoiland Apologies for the late reply. Unfortunately, I don't have any update on this. This issue has been reported to the Product Owners and we are waiting to hear back.
CC: @amnguye @seanmcc-msft
@burrowj @AlanHoiland what version of the Azure.Storage (The common storage package that the Azure.Storage.Blobs package takes a dependency on) are you using?
Azure.Storage.Blobs is 12.14.1 Azure.Storage.Common is 12.13.0
Both appear to be the latest, stable versions.
Thanks! Alan
PackageReference Include="Azure.Storage.Blobs" Version="12.14.1"
Also, I have found that when i build this Visual Studio for Mac it works fine When i build with Visual Studio for windows i get this error
Thanks John
Is there any news on this getting fixed? I have gone back to "Azure.Storage.Blobs" Version="12.13.0" and it works again I have a Xamarin Forms App I build on windows using Visual Studio and a Mac Host build machine for Ios
I have the same exact issue. It ONLY happens on iOS devices for Xamarin. I've created a new Xamarin App to remove all other factors. It works on Android fine. Also, this isn't the only method that seems to go missing on iOS devices. I'm upgrading from WindowsAzure.Storage to Azure.Storage.Blobs and ran into the following...
byte[] blobBytes = null;
StorageSharedKeyCredential cred = new StorageSharedKeyCredential("<username>", "<password>");
BlobServiceClient blobServiceClient = new BlobServiceClient(new Uri($"https://<StorageAccountName>.blob.core.windows.net"), cred, null);
BlobContainerClient containerClient = blobServiceClient.GetBlobContainerClient("<ContainerName>");
BlobClient blob = containerClient.GetBlobClient("<PathToBlob>");
using (MemoryStream ms = new MemoryStream())
{
Response response = blob.DownloadTo(ms); //<-- Failing Here
blobBytes = ms.ToArray();
}
only to get the runtime error
Method not found: void Azure.Core.RequestUriBuilder.AppendPath(System.ReadOnlySpan`1
Again this code works everywhere(Android, windows) except on Xamarin.Forms app on iOS.
I sure hope this gets resolved soon as my whole app depends on the Azure Storage platform.
I have rolled back Azure.Storage.Blobs to 12.13.1 and it works on iOS. I just tried the latest stable version, 12.16.0, and it is still broken on iOS.
Yeah thanks a bunch AlanHoiland, I saw your post above and that worked for me too. Hopefully they can fix this problem soon for the newer versions.
Hi, I've also been using this package and have also come across this bug for iOS. I'm hoping this bug can be fixed soon, as we have currently reverted to version 12.13.1 as that still works.
I'm using this package for a Xamarin.Forms app, and downgrading to 12.13.1 from 12.19.1 solved the issue on iOS. So I can confirm it persists until the latest stable version, making anything beyond 12.13.1 unusable on iOS. It would be great if this could be fixed for newer package versions.
Library name and version
Azure.Storage.Blobs 12.14.1
Describe the bug
When trying to upload a simple file using
await container.GetBlobClient(file).UploadAsync(Path.Combine(Constants.FileStoragePath, file))
under Xamarin.Forms 5 targeting .NET Standard 2.1 aMissingMethodException
is thrown with this stack trace:Downloading files from the container is working fine. I think the upload worked with with version 12.10.0
Expected behavior
The file is uploaded without any exceptions.
Actual behavior
The above mentioned exception is thrown and the file is not uploaded.
Reproduction Steps
Try to upload a file using
in the environment described below.
Environment
Microsoft Visual Studio Professional 2022 Version 17.3.5 VisualStudio.17.Release/17.3.5+32922.545 Microsoft .NET Framework Version 4.8.09032
Xamarin.Forms 5.0.0.2515 targeting .NET Standard 2.1 (C# lang version 8.0) Tested on iPad Mini Simulator & iPad Pro physical device