react-native-cookie
react-native-cookie copied to clipboard
[Unhandled promise rejection: TypeError: undefined is not an object (evaluating '_reactNative.NativeModules.RNCookieManager.clearCookie')]
I get an error while using
Cookie.clear().then(() => {
console.log('Cookie cleared');
});
Npm: 4.2 Node: 7.10.1 React-native-cli: 2.0.1 React-native: 0.50.3
Logs are as follows:
[Unhandled promise rejection: TypeError: undefined is not an object (evaluating '_reactNative.NativeModules.RNCookieManager.clearCookie')]
- node_modules\react-native-cookie\cookie.android.js:22:44 in clear$
- node_modules\regenerator-runtime\runtime.js:63:44 in tryCatch
- node_modules\regenerator-runtime\runtime.js:337:30 in invoke
- node_modules\regenerator-runtime\runtime.js:96:28 in <unknown>
- node_modules\regenerator-runtime\runtime.js:63:44 in tryCatch
- node_modules\regenerator-runtime\runtime.js:139:28 in invoke
- node_modules\regenerator-runtime\runtime.js:184:17 in <unknown>
- node_modules\promise\setimmediate\core.js:45:7 in tryCallTwo
- node_modules\promise\setimmediate\core.js:200:23 in doResolve
- node_modules\promise\setimmediate\core.js:66:12 in Promise
- node_modules\regenerator-runtime\runtime.js:183:27 in callInvokeWithMethodAndArg
- node_modules\regenerator-runtime\runtime.js:206:12 in enqueue
- node_modules\regenerator-runtime\runtime.js:96:28 in <unknown>
- node_modules\regenerator-runtime\runtime.js:226:8 in async
- node_modules\react-native-cookie\cookie.android.js:6:15 in clear
* app\src\js\authentication\LoginScreen.js:108:8 in doLogIn
- node_modules\react-proxy\modules\createPrototypeProxy.js:44:35 in proxiedMethod
* app\src\js\authentication\LoginScreen.js:79:35 in onPress
- node_modules\react-native\Libraries\Components\Touchable\TouchableNativeFeedback.android.js:170:45 in touchableHandlePress
- node_modules\react-native\Libraries\Components\Touchable\Touchable.js:746:34 in _performSideEffectsForTransition
- ... 24 more stack frames from framework internals
same here
same issues anybody help?
...
import im.shimo.react.cookie.CookieManagerPackage; // IMPORT
...
public class MainApplication extends Application implements ReactApplication {
...
@Override
protected List<ReactPackage> getPackages() {
return Arrays.asList(
new MainReactPackage(),
new CookieManagerPackage() // ADD
);
...
};
i had the same issue