{"action":"created","issue":{"url":"https://api.github.com/repos/apollographql/subscriptions-transport-ws/issues/372","repository_url":"https://api.github.com/repos/apollographql/subscriptions-transport-ws","labels_url":"https://api.github.com/repos/apollographql/subscriptions-transport-ws/issues/372/labels{/name}","comments_url":"https://api.github.com/repos/apollographql/subscriptions-transport-ws/issues/372/comments","events_url":"https://api.github.com/repos/apollographql/subscriptions-transport-ws/issues/372/events","html_url":"https://github.com/apollographql/subscriptions-transport-ws/issues/372","id":305800722,"number":372,"title":"Websocket closed after 1.5 mins on Android and iOS with React Native","user":{"login":"schavaLogi","id":20354860,"avatar_url":"https://avatars3.githubusercontent.com/u/20354860?v=4","gravatar_id":"","url":"https://api.github.com/users/schavaLogi","html_url":"https://github.com/schavaLogi","followers_url":"https://api.github.com/users/schavaLogi/followers","following_url":"https://api.github.com/users/schavaLogi/following{/other_user}","gists_url":"https://api.github.com/users/schavaLogi/gists{/gist_id}","starred_url":"https://api.github.com/users/schavaLogi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schavaLogi/subscriptions","organizations_url":"https://api.github.com/users/schavaLogi/orgs","repos_url":"https://api.github.com/users/schavaLogi/repos","events_url":"https://api.github.com/users/schavaLogi/events{/privacy}","received_events_url":"https://api.github.com/users/schavaLogi/received_events","type":"User","site_admin":false},"labels":[{"id":854170679,"url":"https://api.github.com/repos/apollographql/subscriptions-transport-ws/labels/blocking","name":"blocking","color":"b60205","default":false},{"id":854172140,"url":"https://api.github.com/repos/apollographql/subscriptions-transport-ws/labels/has-reproduction","name":"has-reproduction","color":"42f44e","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-16T04:43:12Z","updated_at":"2018-05-02T10:38:11Z","closed_at":null,"author_association":"NONE","body":"\r\n- [x] has-reproduction\r\n- [ ] feature\r\n- [ ] docs\r\n- [x] blocking\r\n- [ ] good first issue\r\n\r\n\r\n\r\nIs this a bug report?\r\nYes\r\n\r\nEnvironment\r\n\"react-native\": \"0.52.0\"\r\n\"subscriptions-transport-ws\": \"^0.9.4\"\r\n\r\nPlatform: \r\nAndroid & iOS \r\n\r\n\r\nSteps to Reproduce:\r\n\r\nConnect to WebSocket using SubscriptionClient and WebSocketLink. Wait for 1 ~ 2 mins and see that the socket got closed. All the pending operations are flushed out after re-connect\r\n\r\nAndroid:  \r\nws.onerror() -> Invoked\r\n\r\niOS:\r\nws.onclose() -> Invoked\r\n\r\nLogs:\r\nclient.js:335 SubscriptionClient flushUnsentMessagesQueue\r\n10:02:28.321 redux-logger.js:1  action WS_CLIENT_CONNECTED @ 10:02:28.322\r\n10:02:28.336 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=true\r\n10:02:28.337 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:02:28.560 redux-logger.js:1  action WS_CLIENT_CONNECTED @ 10:02:28.560\r\n10:02:28.577 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:02:28.577 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:02:36.499 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:02:36.541 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:02:36.993 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:02:36.993 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:02:44.492 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:02:44.493 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:02:44.607 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:02:44.608 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:02:52.894 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:02:52.894 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:02:52.903 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:02:52.904 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:03:00.460 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:03:00.460 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:03:00.578 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:03:00.578 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:03:08.359 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:03:08.360 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:03:08.559 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:03:08.559 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:03:16.976 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:03:16.976 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:03:16.988 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:03:16.989 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:03:24.418 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:03:24.418 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:03:24.582 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:03:24.582 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:03:32.423 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:03:32.424 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:03:32.568 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:03:32.568 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:03:40.542 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:03:40.542 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:03:40.572 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:03:40.572 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:03:48.443 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:03:48.443 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:03:48.572 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:03:48.572 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:03:57.210 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:03:57.211 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:03:57.224 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:03:57.224 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:03:57.385 client.js:382 SubscriptionClient onerror\r\n10:03:57.386 client.js:376 SubscriptionClient onclose _this.closedByUser =false\r\n10:03:57.386 client.js:62 SubscriptionClient close  isForced =false  closedByUser=false\r\n10:03:57.387 client.js:66 SubscriptionClient close final values isForced =false  closedByUser=false\r\n10:03:57.389 client.js:316 SubscriptionClient tryReconnect started\r\n10:03:57.390 client.js:322 SubscriptionClient tryReconnect this.reconnecting=false\r\n10:03:57.403 client.js:382 SubscriptionClient onerror\r\n10:03:57.403 client.js:376 SubscriptionClient onclose _this.closedByUser =false\r\n10:03:57.403 client.js:62 SubscriptionClient close  isForced =false  closedByUser=false\r\n10:03:57.404 client.js:66 SubscriptionClient close final values isForced =false  closedByUser=false\r\n10:03:57.414 client.js:382 SubscriptionClient onerror\r\n10:03:57.414 client.js:376 SubscriptionClient onclose _this.closedByUser =false\r\n10:03:57.414 client.js:62 SubscriptionClient close  isForced =false  closedByUser=false\r\n10:03:57.414 client.js:66 SubscriptionClient close final values isForced =false  closedByUser=false\r\n10:03:57.423 client.js:382 SubscriptionClient onerror\r\n10:03:57.423 client.js:376 SubscriptionClient onclose _this.closedByUser =false\r\n10:03:57.423 client.js:62 SubscriptionClient close  isForced =false  closedByUser=false\r\n10:03:57.424 client.js:66 SubscriptionClient close final values isForced =false  closedByUser=false\r\n10:03:57.433 client.js:382 SubscriptionClient onerror\r\n10:03:57.433 client.js:376 SubscriptionClient onclose _this.closedByUser =false\r\n10:03:57.433 client.js:62 SubscriptionClient close  isForced =false  closedByUser=false\r\n10:03:57.434 client.js:66 SubscriptionClient close final values isForced =false  closedByUser=false\r\n10:03:57.459 client.js:382 SubscriptionClient onerror\r\n10:03:57.460 client.js:376 SubscriptionClient onclose _this.closedByUser =false\r\n10:03:57.460 client.js:62 SubscriptionClient close  isForced =false  closedByUser=false\r\n10:03:57.460 client.js:66 SubscriptionClient close final values isForced =false  closedByUser=false\r\n10:03:57.471 client.js:382 SubscriptionClient onerror\r\n10:03:57.471 client.js:376 SubscriptionClient onclose _this.closedByUser =false\r\n10:03:57.471 client.js:62 SubscriptionClient close  isForced =false  closedByUser=false\r\n10:03:57.472 client.js:66 SubscriptionClient close final values isForced =false  closedByUser=false\r\n10:03:57.981 client.js:358 SubscriptionClient _this.status !== _this.wsImpl.OPEN\r\n10:03:57.981 client.js:62 SubscriptionClient close  isForced =false  closedByUser=true\r\n10:03:57.981 client.js:66 SubscriptionClient close final values isForced =false  closedByUser=true\r\n10:03:58.006 client.js:316 SubscriptionClient tryReconnect started\r\n10:03:58.007 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:58.043 client.js:376 SubscriptionClient onclose _this.closedByUser =true\r\n10:03:58.052 client.js:358 SubscriptionClient _this.status !== _this.wsImpl.OPEN\r\n10:03:58.052 client.js:62 SubscriptionClient close  isForced =false  closedByUser=true\r\n10:03:58.053 client.js:66 SubscriptionClient close final values isForced =false  closedByUser=true\r\n10:03:58.069 client.js:316 SubscriptionClient tryReconnect started\r\n10:03:58.070 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:58.126 client.js:358 SubscriptionClient _this.status !== _this.wsImpl.OPEN\r\n10:03:58.126 client.js:62 SubscriptionClient close  isForced =false  closedByUser=true\r\n10:03:58.126 client.js:66 SubscriptionClient close final values isForced =false  closedByUser=true\r\n10:03:58.142 client.js:316 SubscriptionClient tryReconnect started\r\n10:03:58.143 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:58.169 client.js:358 SubscriptionClient _this.status !== _this.wsImpl.OPEN\r\n10:03:58.169 client.js:62 SubscriptionClient close  isForced =false  closedByUser=true\r\n10:03:58.169 client.js:66 SubscriptionClient close final values isForced =false  closedByUser=true\r\n10:03:58.171 redux-logger.js:1  action WS_CLIENT_RECONNECTING @ 10:03:58.171\r\n10:03:58.177 redux-logger.js:1  action WSS_GET_ENVIRONMENT_INFO @ 10:03:58.177\r\n10:03:58.184 redux-logger.js:1  action GET_ENVIRONMENT_SUCCESS @ 10:03:58.185\r\n10:03:58.188 client.js:316 SubscriptionClient tryReconnect started\r\n10:03:58.188 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:58.869 client.js:358 SubscriptionClient _this.status !== _this.wsImpl.OPEN\r\n10:03:58.869 client.js:62 SubscriptionClient close  isForced =false  closedByUser=true\r\n10:03:58.870 client.js:66 SubscriptionClient close final values isForced =false  closedByUser=true\r\n10:03:58.885 client.js:316 SubscriptionClient tryReconnect started\r\n10:03:58.886 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:59.001 redux-logger.js:1  action WS_CLIENT_RECONNECTING @ 10:03:59.001\r\n10:03:59.006 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:59.006 client.js:335 SubscriptionClient flushUnsentMessagesQueue\r\n10:03:59.006 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:59.007 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:59.007 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:59.007 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:59.007 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:59.008 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:59.008 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:59.008 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:59.009 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:59.009 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:59.009 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:59.339 redux-logger.js:1  action WS_CLIENT_RECONNECTING @ 10:03:59.339\r\n10:03:59.343 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:59.343 client.js:335 SubscriptionClient flushUnsentMessagesQueue\r\n10:03:59.343 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:59.355 redux-logger.js:1  action WS_CLIENT_RECONNECTING @ 10:03:59.356\r\n10:03:59.359 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:03:59.359 client.js:335 SubscriptionClient flushUnsentMessagesQueue\r\n10:03:59.359 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:04:00.221 redux-logger.js:1  action WS_CLIENT_RECONNECTING @ 10:04:00.222\r\n10:04:00.226 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:04:00.226 client.js:335 SubscriptionClient flushUnsentMessagesQueue\r\n10:04:00.227 client.js:302 SubscriptionClient wsImpl.CONNECTING\r\n10:04:00.477 redux-logger.js:1  action WS_CLIENT_RECONNECTING @ 10:04:00.477\r\n10:04:00.480 client.js:335 SubscriptionClient flushUnsentMessagesQueue\r\n10:04:00.754 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:04:00.755 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:04:00.994 client.js:335 SubscriptionClient flushUnsentMessagesQueue\r\n10:04:01.005 client.js:335 SubscriptionClient flushUnsentMessagesQueue\r\n10:04:01.019 client.js:335 SubscriptionClient flushUnsentMessagesQueue\r\n10:04:02.118 redux-logger.js:1  action WS_CLIENT_CONNECTED @ 10:04:02.118\r\n10:04:02.133 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:04:02.133 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:04:02.151 redux-logger.js:1  action WS_CLIENT_CONNECTED @ 10:04:02.152\r\n10:04:02.163 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:04:02.164 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true\r\n10:04:02.520 redux-logger.js:1  action WS_CLIENT_CONNECTED @ 10:04:02.520\r\n10:04:02.536 client.js:437 SubscriptionClient GQL_CONNECTION_KEEP_ALIVE  firstKA=false\r\n10:04:02.536 client.js:343 SubscriptionClient checkConnection this.wasKeepAliveReceived =true"},"comment":{"url":"https://api.github.com/repos/apollographql/subscriptions-transport-ws/issues/comments/385935630","html_url":"https://github.com/apollographql/subscriptions-transport-ws/issues/372#issuecomment-385935630","issue_url":"https://api.github.com/repos/apollographql/subscriptions-transport-ws/issues/372","id":385935630,"user":{"login":"Access2emma","id":5932781,"avatar_url":"https://avatars0.githubusercontent.com/u/5932781?v=4","gravatar_id":"","url":"https://api.github.com/users/Access2emma","html_url":"https://github.com/Access2emma","followers_url":"https://api.github.com/users/Access2emma/followers","following_url":"https://api.github.com/users/Access2emma/following{/other_user}","gists_url":"https://api.github.com/users/Access2emma/gists{/gist_id}","starred_url":"https://api.github.com/users/Access2emma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Access2emma/subscriptions","organizations_url":"https://api.github.com/users/Access2emma/orgs","repos_url":"https://api.github.com/users/Access2emma/repos","events_url":"https://api.github.com/users/Access2emma/events{/privacy}","received_events_url":"https://api.github.com/users/Access2emma/received_events","type":"User","site_admin":false},"created_at":"2018-05-02T10:38:11Z","updated_at":"2018-05-02T10:38:11Z","author_association":"NONE","body":"Has this issue been fixed?"}}
{"actor":{"display_login":"Access2emma"}}