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

Current master bombs on cookie without expiration date

Open mschipperheyn opened this issue 6 years ago • 2 comments

I tried installing the current master bc of some problems I was having with 3.3.0 and I get this error with a cookie such as this:

set-cookie:"MSA_SESSIONID=f62080eb-c236-4a97-a2134-95ff8a8a42a2; Path=/"

ExceptionsManager.js:84 Exception '*** -[__NSDictionaryM setObject:forKey:]: object cannot be nil (key: expiresDate)' was thrown while invoking get on target RNCookieManagerIOS with params (
    "http://www.dev.project.com.br",
    0,
    2682,
    2683
)
callstack: (
	0   CoreFoundation                      0x000000010c9481bb __exceptionPreprocess + 331
	1   libobjc.A.dylib                     0x000000010ab83735 objc_exception_throw + 48
	2   CoreFoundation                      0x000000010c8944ec _CFThrowFormattedException + 194
	3   CoreFoundation                      0x000000010c9ba396 -[__NSDictionaryM setObject:forKey:] + 1046
	4   Ology                               0x00000001087c76d0 -[RNCookieManagerIOS get:useWebKit:resolver:rejecter:] + 1584
	5   CoreFoundation                      0x000000010c94f03c __invoking___ + 140
	6   CoreFoundation                      0x000000010c94c4d5 -[NSInvocation invoke] + 325
	7   CoreFoundation                      0x000000010c94c926 -[NSInvocation invokeWithTarget:] + 54
	8   Ology                               0x00000001085ec27a -[RCTModuleMethod invokeWithBridge:module:arguments:] + 2810
	9   Ology                               0x00000001086a8076 _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 790
	10  Ology                               0x00000001086a7b8f _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 127
	11  Ology                               0x00000001086a7b09 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 25
	12  libdispatch.dylib                   0x0000000110774595 _dispatch_call_block_and_release + 12
	13  libdispatch.dylib                   0x0000000110775602 _dispatch_client_callout + 8
	14  libdispatch.dylib                   0x000000011077cb0b _dispatch_lane_serial_drain + 791
	15  libdispatch.dylib                   0x000000011077d784 _dispatch_lane_invoke + 428
	16  libdispatch.dylib                   0x000000011078789a _dispatch_workloop_worker_thread + 733
	17  libsystem_pthread.dylib             0x0000000110b5e60b _pthread_wqthread + 409
	18  libsystem_pthread.dylib             0x0000000110b5e405 start_wqthread + 13

mschipperheyn avatar Feb 07 '19 14:02 mschipperheyn

fix is in #121 but not merged yet

michalakjan avatar Feb 08 '19 09:02 michalakjan

I have forked the repo here: https://github.com/safaiyeh/react-native-cookie-store We can create issues and PRs there to continue the development of the project.

safaiyeh avatar Jan 02 '20 19:01 safaiyeh