{"action":"created","issue":{"url":"https://api.github.com/repos/e-mission/e-mission-phone/issues/56","repository_url":"https://api.github.com/repos/e-mission/e-mission-phone","labels_url":"https://api.github.com/repos/e-mission/e-mission-phone/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/e-mission/e-mission-phone/issues/56/comments","events_url":"https://api.github.com/repos/e-mission/e-mission-phone/issues/56/events","html_url":"https://github.com/e-mission/e-mission-phone/issues/56","id":162850787,"number":56,"title":"Extraneous, unnecessary prompt for re-authentication","user":{"login":"shankari","id":2423263,"avatar_url":"https://avatars.githubusercontent.com/u/2423263?v=3","gravatar_id":"","url":"https://api.github.com/users/shankari","html_url":"https://github.com/shankari","followers_url":"https://api.github.com/users/shankari/followers","following_url":"https://api.github.com/users/shankari/following{/other_user}","gists_url":"https://api.github.com/users/shankari/gists{/gist_id}","starred_url":"https://api.github.com/users/shankari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shankari/subscriptions","organizations_url":"https://api.github.com/users/shankari/orgs","repos_url":"https://api.github.com/users/shankari/repos","events_url":"https://api.github.com/users/shankari/events{/privacy}","received_events_url":"https://api.github.com/users/shankari/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-06-29T06:33:44Z","updated_at":"2016-06-29T18:54:55Z","closed_at":null,"body":"This was reported by @juemura along with logs, but I don't see anything in the logs that would prompt it.\r\nI do see that she logged in and generated a `profile/create` message:\r\n\r\n```\r\n32200,1467156561.73,2016-06-28 17:22:21.730430-07:00,postToHost called with url = /profile/create -- https://e-mission.eecs.berkeley.edu\r\n```\r\n\r\nBut the token seemed to be fine the last time it was used\r\n\r\n```\r\n31810,1467090022.86,2016-06-27 22:53:22.857720-07:00,postToHost called with url = /usercache/get -- https://e-mission.eecs.berkeley.edu\r\n31811,1467090022.9,2016-06-27 22:53:22.896510-07:00,CommunicationHelper.execute called!\r\n31812,1467090022.92,2016-06-27 22:53:22.915050-07:00,\"currAuth != null, nothing to do\"\r\n31813,1467090022.93,2016-06-27 22:53:22.930400-07:00,\"currAuth = GTMOAuth2Authentication 0x146f5f90: {accessToken=\"\"ya29.CjAPAy-rqsp4qTTytPxoXAH2sd_OFKntit37woTKHqBkeMThoPo99zlqrazH8CmZiHY\"\", refreshToken=\"\"1/JbQZ2jKDD_mwROrVAPGERb7I3VVeSAujo9eIGgt6OH4\"\", expirationDate=\"\"2016-06-28 06:00:11 +0000\"\"}, canAuthorize = YES, expiresIn = 3600, expirationDate = 2016-06-28 06:00:11 +0000, expired = NO\"\r\n31814,1467090022.95,2016-06-27 22:53:22.950860-07:00,\"token is valid, returning it\"\r\n```\r\n\r\nOne thing that I do note is that the app was terminated between the two invocations.\r\n\r\n```\r\n31831,1467090035.9,2016-06-27 22:53:35.899520-07:00,\"Data pushed, fetch result = new data\"\r\n31832,1467090676.71,2016-06-27 23:04:16.705440-07:00,Application will enter the foreground\r\n31833,1467090681.38,2016-06-27 23:04:21.383380-07:00,Application went to the background\r\n31834,1467090681.4,2016-06-27 23:04:21.399920-07:00,Application is about to terminate\r\n31835,1467090681.41,2016-06-27 23:04:21.408620-07:00,onAppTerminate called\r\n31836,1467126481.49,2016-06-28 09:01:01.493920-07:00,finished init of iOS native code\r\n31837,1467126481.5,2016-06-28 09:01:01.503020-07:00,truncating obsolete entries before 1464534481.502174\r\n31838,1467126481.84,2016-06-28 09:01:01.840020-07:00,initializing TripDiaryStateMachine with state = STATE_WAITING_FOR_TRIP_START\r\n```\r\n\r\nI will also note that the app does not appear to have received remote push notifications for this entire time, so there was no need/opportunity to get a token for at least 24 hours. Maybe the token got so expired that it couldn't be refreshed?"},"comment":{"url":"https://api.github.com/repos/e-mission/e-mission-phone/issues/comments/229453411","html_url":"https://github.com/e-mission/e-mission-phone/issues/56#issuecomment-229453411","issue_url":"https://api.github.com/repos/e-mission/e-mission-phone/issues/56","id":229453411,"user":{"login":"shankari","id":2423263,"avatar_url":"https://avatars.githubusercontent.com/u/2423263?v=3","gravatar_id":"","url":"https://api.github.com/users/shankari","html_url":"https://github.com/shankari","followers_url":"https://api.github.com/users/shankari/followers","following_url":"https://api.github.com/users/shankari/following{/other_user}","gists_url":"https://api.github.com/users/shankari/gists{/gist_id}","starred_url":"https://api.github.com/users/shankari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shankari/subscriptions","organizations_url":"https://api.github.com/users/shankari/orgs","repos_url":"https://api.github.com/users/shankari/repos","events_url":"https://api.github.com/users/shankari/events{/privacy}","received_events_url":"https://api.github.com/users/shankari/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T18:54:54Z","updated_at":"2016-06-29T18:54:54Z","body":"> I do however close all of the apps every once in a while, so that's probably what happened.\r\n\r\nThat alone shouldn't be the cause. As I said 4 hours ago, the app was terminated before (multiple times) and and restarted automatically and everything was fine. The only difference between those times and this was that in previous times it looks like you accessed the UI fairly soon after the app launched and this time you didn't.\r\n\r\nBut if the token was in the keychain then the refresh should have succeeded - it has done so before. So basically, I think that the options are:\r\n- token was not in the keychain, i.e. safari wiped cookies, maybe due to uninstall\r\n- this has nothing to do with tokens but the detection of whether init is complete. If this is the case then you would have seen the entire onboarding flow, not just the google login "}}
{"actor":{"display_login":"shankari"}}