Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Realms.Exceptions.RealmFileAccessErrorException: Unable to open a realm at path #1710

Open
dajbych opened this Issue Mar 31, 2018 · 4 comments

Comments

Projects
None yet
4 participants
@dajbych
Copy link

dajbych commented Mar 31, 2018

Goals

Reliable realm database creation.

Expected Results

Realm instance.

Actual Results

Realms.Exceptions.RealmFileAccessErrorException: 'Unable to open a realm at path 'C:\Users\Václav\AppData\Local\Packages\7539ef42-e9e8-4e55-8c45-547c7a6ee489_v1yjhd5ekz562\LocalCache\realmtest.realm.management': make_dir() failed: No such file or directory.'

Steps to Reproduce

Simple project for bug reproduction: https://1drv.ms/u/s!AlFEHk1e5ZDCoL1NodRClQwLeQdO6A

Code Sample

class RealmEntity : RealmObject {
    [PrimaryKey]
    public long Id { get; set; }
}

readonly static RealmConfiguration config = new RealmConfiguration(Path.Combine(ApplicationData.Current.LocalCacheFolder.Path, "realmtest.realm")) {
    SchemaVersion = 1,
    ObjectClasses = new Type[] { typeof(RealmEntity) },
    ShouldDeleteIfMigrationNeeded = true
};

async void Page_Loaded(object sender, RoutedEventArgs e) {
    using (var realm = await Realm.GetInstanceAsync(config)) {
    }
}

Version of Realm and Tooling

  • Client NuGet package version: 2.2.0
  • Client OS & Version: Windows 10 version 1709 (build 16299.248)

Hint

I think (but I cannot be sure) that instance creation fails because of lack of UTF-8 support. The directory path contains non-ascii characters. I can reproduce this issue only on user accounts with non-ascii characters in the profile directory path.

@dajbych

This comment has been minimized.

Copy link
Author

dajbych commented Apr 19, 2018

Still reproducible in version 3.0.0 of the client NuGet package.

@nirinchev

This comment has been minimized.

Copy link
Member

nirinchev commented Apr 19, 2018

You are correct - non-ascii characters in the path are not supported yet on Windows, sorry about that.

@dajbych

This comment has been minimized.

Copy link
Author

dajbych commented Jun 8, 2018

Will it be fixed in the next version? What is expected release date of the next version?

@nirinchev

This comment has been minimized.

Copy link
Member

nirinchev commented Jun 8, 2018

We don't have a timeframe for when this will be addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.