react-native-cookie icon indicating copy to clipboard operation
react-native-cookie copied to clipboard

[Unhandled promise rejection: TypeError: undefined is not an object (evaluating '_reactNative.NativeModules.RNCookieManager.clearCookie')]

Open rastogitech opened this issue 7 years ago • 4 comments

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

rastogitech avatar Jan 03 '18 06:01 rastogitech

same here

ozio avatar Jan 11 '18 11:01 ozio

same issues anybody help?

alexneo2003 avatar Jan 28 '18 19:01 alexneo2003

...
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
      );
      ...
  };

racmartin avatar Apr 23 '18 07:04 racmartin

i had the same issue

gustavolima00 avatar Sep 20 '18 22:09 gustavolima00