Open nachoSource opened 2 years ago
Here I attach some screenshots taken from my simulator. I've also read that the second error usually disappears when the first one is solved, but I show it just in case.
Apparently, this import has some kind of issue 🤔 https://user-images.githubusercontent.com/69126302/170710377-4c39ab83-09c5-4e07-b7b1-f93d7b11f2c6.mov
I was getting this until I ran cd ios/ && pod install
after installing the package. Could be a pod issue?
pod install
is required and it's already described in the setup docs.
This issue still persists.... on development is all good. However, when I run yarn test
, I get this error!! Current Version is 5.3.0
Happens when I run appium
(e2e tests). It fails to load the app bundle (when in dev mode, loads release bundles fine) onto iOS emulator. After some debugging, it turned out that that error is thrown whenever some packages are present:
The (hacky) workaround I have is to dynamically/conditionally import()
such packages when NOT running in E2E mode (env var)
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:
pod 'react-native-geolocation-service', path: '../node_modules/react-native-geolocation-service'
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 PositionError
so I created a file __mocks__/react-native-geolocation-service.ts
in which I put this enum:
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? thank you
same issue :(
Adding this fixed it for me.
RN 0.70 same here
In my case I forgot to run pod install
in my app. Other way is to link the library manually in your podfile
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: new NativeEventEmitter()
requires a non-null argument.>
Do you guys have a solution
I also have the same issue. Any solution??
Adding this into jest.setup.js helped:
jest.mock('@react-native-firebase/messaging', () => ({
__esModule: true,
default: jest.fn(() => ({})),
}))
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: