Nozbe / WatermelonDB

🍉 Reactive & asynchronous database for powerful React and React Native apps ⚡️
https://watermelondb.dev
MIT License
10.49k stars 589 forks source link

Diagnostic error: NativeModules.DatabaseBridge is not defined (after upgrading to react-native: 0.71.1) #1508

Closed marvanov closed 1 year ago

marvanov commented 1 year ago

First of all, thank you for the quality product!😉

Versions: "react-native": "0.70.4", "@nozbe/watermelondb": "^0.24.0", worked, but after upgrading to versions: "react-native": "0.71.1", "@nozbe/watermelondb": "^0.25.3", emulation on an android device gives an error:

Diagnostic error: NativeModules.DatabaseBridge is not defined! This means that you haven't properly linked WatermelonDB native module. Refer to docs for more details

What can I do about it? Thanks!

pmtu95 commented 1 year ago

I have the same issue, seems like version > 0.25.0 missing auto-link, you can link manually or downgrade to version 0.24.0

radex commented 1 year ago

Please follow the manual linking guide, I'll fix auto linking in 0.25.5 later today/tomorrow

radex commented 1 year ago

@pmtu95 @marvanov @bennygenel @yuri-lomashko-itechart Please confirm that 0.25.5 fixes this issue

bennygenel commented 1 year ago

@radex I can confirm that 0.25.5 fixes this issue for me.

marvanov commented 1 year ago

@radex Everything is great now, thank you so much!

mcnaveen commented 7 months ago

I'm on @nozbe/watermelondb": "^0.27.1" and facing a similar issue. Is this fixed already?

Haven't done manual linking yet! Also, mine is bare react native app.

Mubashir-rehma commented 7 months ago

I'm also on "@nozbe/watermelondb": "^0.27.1" and facing similler issue. am using expo

mcnaveen commented 7 months ago

This is how I resolved the issue.

After installing the dependencies, I removed the installed app via adb shell and ran the start command again.

It seems to be working just fine. Also, I got this in Terminal.

image

It's always a good idea to reinstall the development application when you setup dependencies which has a native bridge.

farhadjaman commented 6 months ago

This is how I resolved the issue.

After installing the dependencies, I removed the installed app via adb shell and ran the start command again.

It seems to be working just fine. Also, I got this in Terminal.

image

It's always a good idea to reinstall the development application when you setup dependencies which has a native bridge.

Hi, I wanted to run it on development mode, rather than installing it everytime i need to debug it. Have you found any solution for that?