Closed gvt closed 3 months ago
I'm still missing some data. It looks you might be using the new arch, which might be causing some issues. You need to create a minimal reproducible example for me to take a look at.
Edit: tried a brand new project with the new arch enabled. Everything is working. There is something wrong with your project. Try clearing the caches, re-installing pods, etc.
I got this working in my environment, and this may help others in my situation.
The version of React Native I am using, 0.72.7
is a "new arch" version but support in the native build processes is not enabled by default, there are additional steps.
As described on a separate page in the the React Native docs, to enable the the New Architecture on iOS:
RCT_NEW_ARCH_ENABLED=1 npx pod-install
npm run ios
(If first time running pod install then you will want to do this first:)
RCT_NEW_ARCH_ENABLED=1 npx expo prebuild
And for Android as described in the React Native docs, edit android/gradle.properties
:
newArchEnabled=true
And then run the app to build:
npm run android
And then I am able to use op-sqlite
without errors.
Perhaps this should be added to the documentation so that other people dont have the same problem.
Enabling the new arch is a general procedure for RN and does not affect op-sqlite. The module correctly links if you have enabled it and ran pod install correctly, so nothing to do here.
Description When I attempt to use the
op-sqlite
to perform any operation, such as opening a connection to a db, it fails with this error:This problem may be something that I am doing wrong, or a quirk of my dev env. It seems to be saying that something went wrong in the native binary.
Versions:
14.3.1
on a MacBook Pro M1 Max (ARM)17.0
2.0.18
0.72.7
Reproducible example When I import this code sample into my
app.tsx
file it causes the error.