mrousavy / react-native-blurhash

🖼️ A library to show colorful blurry placeholders while your content loads.
https://blurha.sh
MIT License
1.98k stars 70 forks source link

[BUG] Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'BlurhashModule' could not be found #186

Closed robertherber closed 9 months ago

robertherber commented 9 months ago

Bug

Describe the bug I'm getting this error when upgrading to version 2.x on Expo 50: ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'BlurhashModule' could not be found. Verify that a module by this name is registered in the native binary.Bridgeless mode: false. TurboModule interop: false. Modules loaded: {"NativeModules":["PlatformConstants","LogBox","SourceCode","Timing","AppState","BlobModule","WebSocketModule","SettingsManager","DevSettings","Networking","RedBox","Appearance","DevLoadingView","DeviceInfo","UIManager","RNCSafeAreaContext","KeyboardObserver","RNCAsyncStorage","NativeAnimatedModule","ImageLoader","I18nManager","LinkingManager"],"TurboModules":[],"NotFound":["NativePerformanceCxx","NativePerformanceObserverCxx","BugReporting","HeadlessJsTaskSupport","SoundManager","PlatformLocalStorage","RNC_AsyncSQLiteDBStorage","FrameRateLogger","IntentAndroid","BlurhashModule"]}, js engine: hermes

Since I guess I don't have any use for the new arch yet while staying managed in Expo I'll stay on v1.x, but I guess it would be nice if things don't break when upgrading.. :)

"react": "18.2.0",
"react-native": "0.73.3",
"react-native-blurhash": "2",
"expo": "~50.0.5",
Jonatthu commented 9 months ago

It's happening to me as well with same versions

ThoaiBuiMCV commented 9 months ago

The same with new version, I am using RN 0.73.4

mrousavy commented 9 months ago

cc @janicduplessis is react-native 0.73 supposed to be supported?

janicduplessis commented 9 months ago

Yes, it should work, it is the version I tested on. Does that happen on ios or android (or both)?

Just to make sure did you try a clean build?

Jonatthu commented 9 months ago

@janicduplessis I did a clean build with "react-native": "0.73.4", "expo": "^50.0.6", "react-native-blurhash": "2.0.0",

ThoaiBuiMCV commented 9 months ago

@janicduplessis, I did try reinstall node_module and remove iOS build and pod, the result still exist, I am using RN CLI "react-native": "0.73.4", "react-native-blurhash": "2.0.0",

iwater commented 9 months ago

+1

Martin2037 commented 9 months ago

+1

janicduplessis commented 9 months ago

Just to confirm this is using managed expo right? So it used to work in v1 when the native code is not available?

nicolofranceschi commented 9 months ago

+1

iM-GeeKy commented 9 months ago

I think this may need to be reopened. I tried updating to the latest version 2.0.1 and received the following when building on Expo servers via eas build using "react-native": "0.73.4", and "expo": "~50.0.8",.

› Compiling react-native-blurhash Pods/react-native-blurhash » react_native_blurhash_vers.c

› Compiling react-native-blurhash Pods/react-native-blurhash » react-native-blurhash-dummy.m

› Compiling react-native-blurhash Pods/react-native-blurhash » BlurhashViewManager.m

› Compiling react-native-blurhash Pods/react-native-blurhash » BlurhashViewComponentView.mm

› Compiling react-native-blurhash Pods/react-native-blurhash » BlurhashModule.mm

❌  (node_modules/react-native-blurhash/ios/BlurhashModule.mm:9:9)

   7 | #endif
   8 | 
>  9 | #import "react_native_blurhash-Swift.h"
     |         ^ 'react_native_blurhash-Swift.h' file not found
  10 | 
  11 | #ifdef RCT_NEW_ARCH_ENABLED
  12 | using namespace facebook::react;

› Compiling react-native-blurhash Pods/react-native-blurhash » react_native_blurhash_vers.c

› Compiling react-native-blurhash Pods/react-native-blurhash » react-native-blurhash-dummy.m

› Compiling react-native-blurhash Pods/react-native-blurhash » BlurhashViewManager.m

› Compiling react-native-blurhash Pods/react-native-blurhash » BlurhashViewComponentView.mm

› Compiling react-native-blurhash Pods/react-native-blurhash » BlurhashModule.mm

▸ ** BUILD FAILED **

Reverting back to "react-native-blurhash": "~1.1.11", seems to resolve the issue for now.

janicduplessis commented 9 months ago

@iM-GeeKy Is there more logs? I don’t see the actual error.

iM-GeeKy commented 9 months ago

@iM-GeeKy Is there more logs? I don’t see the actual error.

I added more of the build logs to the post above. Sorry, I was in a hurry and didn't paste enough...

sektr63a commented 9 months ago

Faced with this error while run a build @janicduplessis

image

baselshlewett commented 9 months ago

I got the same issue on iOS

versions react-native: 0.73.5 react-native-blurhash: ^2.0.1