parse-community / Parse-SDK-dotNET

Parse SDK for .NET, Xamarin, Unity.
http://parseplatform.org
Apache License 2.0
323 stars 260 forks source link

UWP local file access issue #304

Closed stephenhauck closed 4 years ago

stephenhauck commented 5 years ago

So I cannot get version 1.7 to work with a .NET standard library and VS 2017 15.9.3 so I followed the directions and built from source... added the using in my .NET Standard App.xaml.cs and then the Parse client initialize just before the main form is constructed.

I have a Xamarin.Forms app and when I try to run the UWP version I get the following error: _Access to the path 'C:\Users\Stephen\source\repos\WatchMeWork\WatchMeWork.UWP\bin\x86\Debug\AppX\C' is denied.

at System.IO.Win32FileSystem.CreateDirectory(String fullPath) at System.IO.Directory.CreateDirectory(String path) at Parse.Internal.Utilities.StorageManager.GetWrapperForRelativePersistentStorageFilePath(String path) at Parse.ParseClient.Configuration.IdentifierBasedStorageConfiguration.getRelativeStorageFilePath() at Parse.Internal.Utilities.StorageManager..cctor()

I am not sure why Parse wants to write to the local path anyway but ....

I haven't tried beyond UWP at this point ...

TheFanatr commented 5 years ago

Parse writes to a local path for installation caching purposes and some metadata stuff, but that is definitely not the kind of path it should be generating. Could you please post the initialization code you used (key and appId redacted)?

kentrh commented 5 years ago

I think maybe I'm facing the same or a similar issue.(https://stackoverflow.com/questions/55085681/parse-initialize-throws-ioexception-with-parse-net-sdk-on-net-core-2-2-hosted). @stephenhauck Did you find a solution?

TobiasPott commented 5 years ago

@kentrh could you check if the fixes inside my feature branch might fix this issue on your side?https://github.com/TobiasPott/Parse-SDK-dotNET/tree/feature/fix-currentinstallation-caching

I've had several issues within Unity regarding the path and caching location and also the trailing "\C" in the path (which comes from, as I assume, erroneous usage of the "VolumeSeparatorCharacter" when the storage file path is assembled).

Unfortunately I've got distracted on this and did not that much testing on it aside from what I need in my own application. If you could give it a try and tell me how it works for you, I'll try to pick up working on it and preparing a PR for the main repository.

TobiasPott commented 4 years ago

As this issue received no update for a while I close it. The SDK should work fine on the UWP platform (including some configurations using mutators). If this problem persist feel free to reopen this issue and provide additional information.