Warning: TypeError: Cannot read property 'bubblingEventTypes' of null
Describe the bug Warning: TypeError: Cannot read property 'bubblingEventTypes' of null
Dependency versions
- React Native version: 0.75.4
- React version: 18.3.1
- React Native Fast Image version: ^8.6.3
Note: if these are not the latest versions of each I recommend updating as extra effort will not be taken to be backwards compatible, and updating might resolving your issue.
I also encountered this issue, but reopening my emulators fixed it.Try closing and opening your simulator and android emulator.
I encountered same issue with same version, Solution -
- delete node module and reinstall it
- cd android && ./gradlew clean
- npm run android <-- this is the main step
@mlcpro You've closed the issue. How have you solved the problem ?
@FelipeRaulino yes, i closed the emulators and reopened
I encountered same issue with same version, Solution -
- delete node module and reinstall it
- cd android && ./gradlew clean
- npm run android <-- this is the main step
This fixed the issue. But what could be the RCA ?
Rollback to old React-Native (under 0.75.4) as the new 0.76 use a new architecture which most of libraries are not yet updated and it throws this problem.
I had the same issue with the iOS simulator and pod install fixed it for me.
@1mehdifaraji Thank you for providing a solution. I have one question. When building for iOS using Expo, I get the same error: Warning: TypeError: Cannot read property 'bubblingEventTypes' of null. You mentioned that it was resolved with pod install, but did you do anything else besides that?
@hayata-0 You're welcome, no I only did pod install but I'm not using expo so you may need to rollback react-native or expo or try installing and using an earlier version of the library and try clearing cache and rebuild.
I figured out after several trial and error that this was also a problem from patches of different libraries. In my case i had an error on React-Charts so i did a patch. That patch created the bubblingEventTypes because the return type was incorrect .
Might be worth looking if you have applied patches over node_modules libraries.
I'm receiving the same error with Flashlist in expo 52 ,is there any fix ?
doing a whole eas rebuild fixed this for me
I faced this same issue with react-native-blasted-image, I deleted app from my emulator and re-build the project, its working now
I also encounter this issue using Expo 52. Doing the following steps did not work for me 🙃
- Delete node_modules and ios folders
- npx expo prebuild --platform ios
- Build project in XCode
- npm run dev
If you using Expo npx expo install expo-linear-gradient then import { LinearGradient } from 'expo-linear-gradient';
- Future reference for people that experience this error when directly using react-native-linear-gradient on expo.
I am facing the same issue while trying to use "LinearGradient" from react-native-linear-gradient and also I have tried using "expo-linear-gradient". Both are throwing the same issues. Any solve for that?
If you using Expo
npx expo install expo-linear-gradientthenimport { LinearGradient } from 'expo-linear-gradient';
- Future reference for people that experience this error when directly using react-native-linear-gradient on expo.
Thanks. Works for me.
If you are using LinearGradient
Make sure you are importing LinearGradient from the correct package: import LinearGradient from 'react-native-linear-gradient';
If you’re using Expo, make sure you're importing it from the correct Expo wrapper: import { LinearGradient } from 'expo-linear-gradient';