Reading initial data from Realm database file in React Native application

I want to read some initial data from Realm database file when starting the application (Android), but I do not understand why database file is not copied over. I followed Bundle a Realm File tutorial - created and put bundle.realm file in android/app/src/main/assets/, added path attribute with value bundle.realm and call Realm.copyBundledRealmFiles() before creating Realm context. Anyway, from realm.path I found out that it looks for database file in /data/data/com.<app name>/files/bundle.realm, where it does not exist. I can upload it manually though Device File Explorer, but I expected that Realm.copyBundledRealmFiles() would copy the file where it’s supposed to be.

What do I need to change to read from existing Realm file automatically?

Here is a relevant code segment:

import { TimeSeriesData } from './models';
import { Realm, createRealmContext } from '@realm/react';


const { RealmProvider, useRealm, useObject, useQuery } = createRealmContext({
  schema: [TimeSeriesData],
  path: 'bundle.realm',

export { RealmProvider, useRealm, useObject, useQuery };

@Eoic One thing to be aware of, is that if you happened to render the RealmProvider before calling copyBundledRealmFiles, then the bundle.realm would not be overwritten. Can you remove the existing app from your testing environment and rebuild? I want to make sure that there wasn’t a bundle.realm already existing when copyBundledRealmFiles was called.