Error: mixpanel-react-native: MixpanelReactNative is null.
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:172:19 in handleException
at node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError
at node_modules/expo-error-recovery/build/ErrorRecovery.fx.js:12:21 in ErrorUtils.setGlobalHandler$argument_0
I've followed the guide on the Github repository: https://github.com/mixpanel/mixpanel-react-native fix this bug but its still persisting
Related
I am writing jest test case for a particular file, the file has NativeModule import in it.
While running the test case, I am getting the following error:
● Test suite failed to run
Invariant Violation: `new NativeEventEmitter()` requires a non-null argument.
at invariant (node_modules/invariant/invariant.js:40:15)
at new NativeEventEmitter (node_modules/react-native/Libraries/EventEmitter/NativeEventEmitter.js:45:7)
at Object.<anonymous> (node_modules/react-native-quantum-metric-library/index.js:1:322)
After googling the above error, I did few changes by adding the following code inside the test file.
jest.mock('react-native/Libraries/EventEmitter/NativeEventEmitter');
After adding the above line then I got the following error:
Test suite failed to run
TypeError: Cannot set properties of undefined (setting 'eventType')
at Object.<anonymous> (node_modules/react-native-quantum-metric-library/index.js:1:367)
After googling again, I modified the above code with the following code.
jest.mock('react-native/Libraries/EventEmitter/NativeEventEmitter.js', () => {
const {EventEmitter} = require('events');
return EventEmitter;
});
After above modification I am getting the below error.
● Test suite failed to run
TypeError: _reactNative.NativeEventEmitter is not a constructor
at Object.<anonymous> (node_modules/react-native-quantum-metric-library/index.js:1:322)
Can anyone please help me to resolve the above issue.
Recently I started getting this warning in the console after adding the ios app to firebase project. Deleted and recreated all apps still not solving the issue of map loading
[Unhandled promise rejection: Error: Fetching the token failed: Please set your Project ID. A valid Firebase Project ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options.]
at \node_modules\react-native\Libraries\BatchedBridge\NativeModules.js:104:50 in promiseMethodWrapper
at \node_modules\expo-modules-core\build\NativeModulesProxy.native.js:27:27 in moduleName.methodInfo.name
at \node_modules\css-select\lib\compile.js:5:0 in
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:86:13 in tryCatch
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:66:31 in
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:86:13 in tryCatch
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:124:27 in invoke
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:148:16 in PromiseImpl$argument_0
at \node_modules\promise\setimmediate\core.js:45:6 in tryCallTwo
at \node_modules\promise\setimmediate\core.js:200:22 in doResolve
at \node_modules\promise\setimmediate\core.js:66:11 in Promise
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:147:15 in callInvokeWithMethodAndArg
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:152:154 in _invoke
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:238:57 in exports.async
at \node_modules\css-select\node_modules\domutils\lib\helpers.js:128:3 in exports.uniqueSort
at \node_modules\css-select\lib\compile.js:118:47 in compileRules
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:86:13 in tryCatch
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:66:31 in
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:86:13 in tryCatch
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:124:27 in invoke
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:148:16 in PromiseImpl$argument_0
at \node_modules\promise\setimmediate\core.js:45:6 in tryCallTwo
at \node_modules\promise\setimmediate\core.js:200:22 in doResolve
at \node_modules\promise\setimmediate\core.js:66:11 in Promise
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:147:15 in callInvokeWithMethodAndArg
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:152:154 in _invoke
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:238:57 in exports.async
at \node_modules\css-select\lib\compile.js:103:17 in token.map$argument_0
at \node_modules\expo-notifications\build\scheduleNotificationAsync.js:182:12 in components.forEach$argument_0
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:86:13 in tryCatch
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:66:31 in
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:86:13 in tryCatch
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:124:27 in invoke
at \node_modules#babel\runtime\helpers\regeneratorRuntime.js:130:16 in PromiseImpl.resolve.then$argument_0
at \node_modules\promise\setimmediate\core.js:37:13 in tryCallOne
at \node_modules\promise\setimmediate\core.js:123:24 in setImmediate$argument_0
at \node_modules\react-native\Libraries\Core\Timers\JSTimers.js:123:14 in _callTimer
at \node_modules\react-native\Libraries\Core\Timers\JSTimers.js:177:14 in _callImmediatesPass
at \node_modules\react-native\Libraries\Core\Timers\JSTimers.js:437:30 in callImmediates
at \node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:388:6 in __callImmediates
at \node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:132:6 in __guard$argument_0
at \node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:365:10 in __guard
at \node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:131:4 in flushedQueue
If you got the promise handle first use async await or try catch in your code where you call the data. And then use console to track the error.
If you still got error after this, just lemme know i will help you fix the errors.
Thanks
I am using same linting configurations on github and locally. When I create a PR, it gives me following error:
TypeError: Cannot read property 'value' of null
on line:
this.axios.defaults.headers.Authorization = `Token ${process.env.NEXT_PUBLIC_REACT_APP_API_TOKEN}`;
How can I fix it?
I am using React-Relay. I am doing a mutation which returns errors which is totally fine but at the end I am getting following error in console which is related to react-relay library.
Uncaught Error: No data returned for operation `CreateUserMutation`, got error(s):
A unique constraint would be violated on User. Details: Field name = email
See the error `source` property for more information.
at createError (RelayError.js:44)
at Object.create (RelayError.js:29)
at normalizePayload (normalizePayload.js:31)
at Object.next (RelayModernEnvironment.js:245)
at Object.next (RelayObservable.js:223)
at Object.next (RelayObservable.js:561)
at Object.next (RelayObservable.js:561)
at RelayObservable.js:492
at _subscribe (RelayObservable.js:609)
at RelayObservable.subscribe (RelayObservable.js:315)
at Object.next (RelayObservable.js:376)
at Object.next (RelayObservable.js:561)
at RelayObservable.js:484
Any idea how we can catch/avoid it?
I'm trying to see whether a cookie key is set:
if ($cookieStore.get('user')){
$scope.session.user = $cookieStore.get('user');
console.log($scope.session.user);
}
An I get the error on the first line. This looks simple, so what am I doing wrong?
Full error:
SyntaxError: Unexpected token u
at Object.parse (native)
at Object.fromJson (http://localhost:8000/vendor/angular/angular.js:1139:14)
at Object.get (http://localhost:8000/vendor/angular/angular-cookies/angular-cookies.js:172:34)
at new <anonymous> (http://localhost:8000/js/main.js:44:33)
at invoke (http://localhost:8000/vendor/angular/angular.js:3966:17)
at Object.instantiate (http://localhost:8000/vendor/angular/angular.js:3977:23)
at http://localhost:8000/vendor/angular/angular.js:7281:28
at http://localhost:8000/vendor/angular/angular.js:6670:34
at forEach (http://localhost:8000/vendor/angular/angular.js:332:20)
at nodeLinkFn (http://localhost:8000/vendor/angular/angular.js:6657:11)
This was asked a year ago, but I just got the same error today.
All I did to resolve this was basically to clear my browser's cookies, and the error went away.