realm / realm-tasks

To Do app built with Realm, inspired by Clear for iOS
Other
368 stars 73 forks source link

Token expiration is not handled #377

Closed radu-tutueanu closed 7 years ago

radu-tutueanu commented 7 years ago

Should this be handled in the binding? @jpsim @stel

Ran with Cocoa 2.2.0, ROS 5.1, iOS version

Connection[1]: Connection closed due to error reported by server: Access token expired (202)
sync/client.cpp:716: [realm-core-2.3.0] Assertion failed: !m_is_initiated
0   Realm                               0x000000010b791e68 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 40
1   Realm                               0x000000010b79216a _ZN5realm4util9terminateEPKcS2_lOSt16initializer_listINS0_9PrintableEE + 506
2   Realm                               0x000000010b76d9b5 _ZN5realm4sync7Session4bindENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES8_S8_tNS0_8ProtocolE + 1605
3   Realm                               0x000000010b76d130 _ZN5realm4sync7Session4bindENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES8_ + 1184
4   Realm                               0x000000010b689ca8 _ZNK5realm5_impl19sync_session_states21WaitingForAccessToken20refresh_access_tokenERNSt3__111unique_lockINS3_5mutexEEERNS_11SyncSessionERKNS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEERKNS_4util8OptionalISF_EE + 108
5   Realm                               0x000000010b689ade _ZN5realm11SyncSession20refresh_access_tokenENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_4util8OptionalIS7_EE + 84
6   Realm                               0x000000010b704bc7 __75-[RLMSyncUser _bindSessionWithPath:config:session:completion:isStandalone:]_block_invoke + 718
7   Realm                               0x000000010b674922 __73+[RLMNetworkClient postRequestToEndpoint:server:JSON:timeout:completion:]_block_invoke + 303
8   CFNetwork                           0x0000000110218ccc __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 19
9   CFNetwork                           0x0000000110218578 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 308
10  Foundation                          0x000000010bd6b9ad __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
11  Foundation                          0x000000010bd6b68f -[NSBlockOperation main] + 101
12  Foundation                          0x000000010bd69d8c -[__NSOperationInternal _start:] + 672
13  Foundation                          0x000000010bd65ccf __NSOQSchedule_f + 201
14  libdispatch.dylib                   0x0000000110d5e0cd _dispatch_client_callout + 8
15  libdispatch.dylib                   0x0000000110d3be17 _dispatch_queue_serial_drain + 236
16  libdispatch.dylib                   0x0000000110d3cb4b _dispatch_queue_invoke + 1073
17  libdispatch.dylib                   0x0000000110d3f385 _dispatch_root_queue_drain + 720
18  libdispatch.dylib                   0x0000000110d3f059 _dispatch_worker_thread3 + 123
19  libsystem_pthread.dylib             0x000000011110d712 _pthread_wqthread + 1299
20  libsystem_pthread.dylib             0x000000011110d1ed start_wqthread + 13
IMPORTANT: if you see this error, please send this log to help@realm.io.(lldb) 
stel commented 7 years ago

cc @austinzheng

radu-tutueanu commented 7 years ago

closed in favour of https://github.com/realm/realm-object-store/issues/337

TimOliver commented 7 years ago

How is this triggered in Realm Tasks exactly? Is there anything we can do on the app level to mitigate this for now?

radu-tutueanu commented 7 years ago

Fixed in https://github.com/realm/realm-object-store/issues/338

radu-tutueanu commented 7 years ago

There is nothing that can be done at the app level, session management is done by OS. Forgot to close the issue.