MobileBlazorBindings icon indicating copy to clipboard operation
MobileBlazorBindings copied to clipboard

Hybrid throws error Access to the path '' is denied.'

Open AmirImam opened this issue 4 years ago • 6 comments

Hi I tried to use BlazorInputFile library to pick file from device, it didn't work. After some searches I decided to use Xamarin.Essentials.FilePicker instead of input file and I had uninstalled BlazorInputFile library and deleted all it's files, but I couldn't run the project because it throws an error System.UnauthorizedAccessException: 'Access to the path '/data/user/0/************/files/AssetFileProvider/wwwroot/_content/BlazorInputFile/' is denied.' There is no any BlazorInputFile related js files in the project I am working on android project, and it has WriteExternalStorage and ReadExternalStorage permissions.

AmirImam avatar Nov 13 '20 20:11 AmirImam

Yeah sorry, this is a known issue that unfortunately did not make it into the preview. Best is to wipe the app data ur uninstall and reinstall the app.

jspuij avatar Nov 14 '20 06:11 jspuij

Yeah sorry, this is a known issue that unfortunately did not make it into the preview. Best is to wipe the app data ur uninstall and reinstall the app.

I tried every thing. I cleared the storage and the cache, I renamed the package name and the application name, and finally uninstalled the app from the device, but the error still appears

AmirImam avatar Nov 14 '20 18:11 AmirImam

You might also want to delete the empty folder _content/BlazorInputFile that sits in the bin\wwwroot that was left behind by the package. This empty folder is zipped and extracted onto the device. So first make sure that the empty folder is gone, then rebuild, then uninstall. Finally you should be able to build and install again.

jspuij avatar Nov 14 '20 19:11 jspuij

You might also want to delete the empty folder _content/BlazorInputFile that sits in the bin\wwwroot that was left behind by the package. This empty folder is zipped and extracted onto the device. So first make sure that the empty folder is gone, then rebuild, then uninstall. Finally you should be able to build and install again.

Thank you it worked. I realized that is my mistake to use hybrid mobile blazor bindings for a full project now, but I'm really in a hurry to use it, so I switched to xamarin forms right now

AmirImam avatar Nov 22 '20 17:11 AmirImam

Re-opening so that we can see if there's something we can fix here.

@AmirImam - this is an experimental project right now so Use At Your Own Risk. There are a lot of missing features and scenarios that we will need to consider before any release. You are certainly allowed to use Mobile Blazor Bindings anywhere you like, but it's in an early stage and many things will likely change in the future.

Eilon avatar Nov 23 '20 19:11 Eilon

Hello Why https://blog.stevensanderson.com/2019/09/13/blazor-inputfile/ still didn't , it work only on webassembly client and I test it in android after choose file it stop respneding?

SuperRealTeam avatar Sep 05 '21 20:09 SuperRealTeam