-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invariant Violation: new NativeEventEmitter()
requires a non-null argument.
#346
Comments
Apparently, this import has some kind of issue 🤔 |
I was getting this until I ran |
|
This issue still persists.... on development is all good. However, when I run |
Happens when I run
The (hacky) workaround I have is to dynamically/conditionally export let requestUserPermission = ( _user: User) => ({});
if (!Env.IS_E2E_MODE) {
(async function loadFirebaseMessaging() {
const { default: messaging } = await import(
'@react-native-firebase/messaging'
);
requestUserPermission = async (user: User) => {
const authStatus = await messaging().requestPermission();
// ....etc
}
})();
} |
same issue |
I am facing the same issue. Has someone found the solution to this ? |
I face the same issue. Any solutions? |
I faced the same issue on IOS and solved it by adding this line to my podfile: According to the setup docs it should not be necessary for RN 0.60 or higher but it solved the issue for me with RN 0.65.3. However I still had the issue when running tests, I solved it by mocking the package, I only needed export default {};
export enum PositionError {
PERMISSION_DENIED = 1,
POSITION_UNAVAILABLE = 2,
TIMEOUT = 3,
PLAY_SERVICE_NOT_AVAILABLE = 4,
SETTINGS_NOT_SATISFIED = 5,
INTERNAL_ERROR = -1,
} You can probably mock everything else you need from this package |
Same issue there |
any updates? have you guys solved this issue? |
same issue :( |
Adding this fixed it for me. |
RN 0.70 same here |
In my case I forgot to run |
I also encountered the same problem, but it was prompted that the module I couldn't find is the NativeKeyboardObserver. I am using version 0.68. <null Invariant Violation: Do you guys have a solution |
I also have the same issue. Any solution?? |
Environment
System:
OS: macOS 12.4
CPU: (8) x64 Apple M1
Memory: 24.48 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.13.1 - /usr/local/bin/node
Yarn: Not Found
npm: 8.1.2 - /usr/local/bin/npm
Watchman: 2022.03.21.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK: Not Found
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7935034
Xcode: 13.4/13F17a - /usr/bin/xcodebuild
Languages:
Java: 18.0.1.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.2 => 0.68.2
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Platforms
This is only happening in iOS (I am working with the xCode simulator). In Android devices it works fine.
Versions
Please add the used versions/branches
master
&ios-rewrite
Description
Please provide a clear and concise description of what the bug is. Include screenshots if needed.
Reproducible Demo
Provide a detailed list of steps that reproduce the issue.
new NativeEventEmitter()
requires a non-null argument.) and the instructions required in this library's readme files.Expected Results
The app runs properly as it does in Android devices
Here is the complete error log:
The text was updated successfully, but these errors were encountered: