Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.56k stars 2.9k forks source link

Web doesn't reconnect/update after coming back online after lid closed overnight #101

Closed quinthar closed 4 years ago

quinthar commented 4 years ago

We need to make it 100% rock solid to get back online.

quinthar commented 4 years ago

When I clicked into a different room, it asked me to re-authenticate -- shouldn't we have infinite sessions?

tgolen commented 4 years ago

This is what I am not sure about... @AndrewGable I am still getting timed out every 90 minutes too. I think it's possibly related to using that authToken from Authenticate instead of from CreateLogin

tgolen commented 4 years ago

@cead22 since you are refactoring the sign in stuff, I'll assign this to you

AndrewGable commented 4 years ago
[STORE] key changed activeClientIDs ObjectclientID: "e172215b-e638-8d5b-ac7e-183feadccae0"__proto__: Object
ActionsSession.js:137 Invalid auth token: Token has expired.
ActionsSession.js:51 [SIGNIN] Authenticating with expensify login? no
pusher.js:156 [Pusher] Attempting to subscribe to channel true ObjectchannelName: "private-user-accountID-3064822"eventName: "reportComment"__proto__: Object
ActionsSession.js:62 [SIGNIN] Authentication result. Code: 200
ActionsSession.js:86 [SIGNIN] Successful sign in 1
Ion.js:68 [STORE] key changed session ObjectaccountID: 3064822authToken: "34DB7D3941FB642D159A43D9C5574A0438569DA4DB65DC6E98BFFA6DA8B14D0EA5F1287016D6137127C242B3BF1021FE6B8285F9C18B28A577DB00F44D04F77C8915BC50ED58C9ED7C26171EF9A45FC562B8E63984E3812B9021235A3DAC32E9F9827F9263E6FD165F4C39085892FAE77B4CEAD9EA75BF46266984836D93367100D44EC3C322DC010A4C1FED72D0B3FDAF6DDEF043C0F676F73BA150D4D988D4BD4CB32746994C3839C712564839989223C12144910BB602C0891F456BC2E5B01598716C1E5E213830D75DFA579559D9A6BF6F7466906D336598508F8F0E4ECFE14F554397937D219AC54E38B29829E17B9DB0A698A08E02ECCA56771766DBA57A97FEFA28ABFF7BB1F144DFCAB93886"email: "+19166982582@expensify.sms"httpCode: 200jsonCode: 200requestID: "048a21004c0000ed1352302200000001"__proto__: Object
Ion.js:68 [STORE] key changed app_redirectTo /
Ion.js:68 [STORE] key changed last_authenticated 1597334087991
6Ion.js:68 [STORE] key changed app_redirectTo /signin
ActionsPersonalDetails.js:81 Error fetching personal details TypeError: Cannot read property 'personalDetailsList' of undefined
    at ActionsPersonalDetails.js:46
(anonymous) @ ActionsPersonalDetails.js:81
Ion.js:68 [STORE] key changed app_redirectTo /signin
ActionsPersonalDetails.js:81 Error fetching personal details TypeError: Cannot read property 'personalDetailsList' of undefined
    at ActionsPersonalDetails.js:46
(anonymous) @ ActionsPersonalDetails.js:81
pusher.js:50 [Pusher] state changed Objectcurrent: "connected"previous: "connecting"__proto__: Object
pusher.js:42 [Pusher] connected
/#/signin:1 [DOM] Password field is not contained in a form: (More info: https://goo.gl/9p2vKq) <input autocapitalize=​"sentences" autocomplete=​"on" autocorrect=​"on" dir=​"auto" spellcheck=​"true" type=​"password" data-focusable=​"true" class=​"css-11aywtz" value=​"Hz}​PF33oXx9x9PxGVNCbEWsFr7ohFktL" style=​"background-color:​ rgb(55, 68, 76)​;​ border-color:​ rgb(74, 89, 96)​;​ border-radius:​ 8px;​ border-width:​ 1px;​ color:​ rgb(255, 255, 255)​;​ font-family:​ GTAmericaExp-Regular;​ padding:​ 12px;​" data-com.agilebits.onepassword.initial-value>​
pusher.js:38 [Pusher] error Objectdata: {code: null, message: "Auth info required to subscribe to private-user-accountID-3064822"}type: "PusherError"__proto__: Object
(anonymous) @ pusher.js:38
ActionsSession.js:51 [SIGNIN] Authenticating with expensify login? yes
ActionsSession.js:62 [SIGNIN] Authentication result. Code: 200
ActionsSession.js:78 [SIGNIN] Creating a login
Screen Shot 2020-08-13 at 9 00 38 AM
AndrewGable commented 4 years ago

It's interesting, we seem to do everything right (Authentication succeeds Authentication result. Code: 200), but then we set the key changed last_authenticated 1597334087991, and then redirect back to signIn? key changed app_redirectTo /signin.

AndrewGable commented 4 years ago

Same story this morning, dumping logs in case it's helpful:

[STORE] key changed activeClientIDs ObjectclientID: "243c8859-a184-0cbe-6873-57767f1998f5"__proto__: Object
ActionsSession.js:137 Invalid auth token: Token has expired.
ActionsSession.js:51 [SIGNIN] Authenticating with expensify login? no
pusher.js:156 [Pusher] Attempting to subscribe to channel true ObjectchannelName: "private-user-accountID-3064822"eventName: "reportComment"__proto__: Object
ActionsSession.js:62 [SIGNIN] Authentication result. Code: 200
ActionsSession.js:86 [SIGNIN] Successful sign in 1
Ion.js:68 [STORE] key changed session ObjectaccountID: 3064822authToken: "DBF0A47C45BE6015282B0D793AA9AABD78EE9241E1966E3CE317A46B23EE59D5B39C2E2655BD8F19AC20780B99E402BDDC89D0B09508206ADB2BAC20E59EF8C47E4A553B5931CB6CD4F7A263313A63858C9B75AB7CE5FBC4FF871911B83FA0549690A6480C438349C08EBEA1DC93914B4D4357645A8F8307DCCB76E8876B3ED5566984651B9DB0C2538DD40CC7750A1972C8241F90F51B33FB59EF46E01154797959C9F7C246CABC86E8E7868FFCC41CA1811FB4B725FE435595DE6A31BF987A561079614D9A51C963D0776ECB8B4EAB5FFA46E3478FCF210AEE9608692B6E101E0D64A9B86BB40353AA511E1E0701A3D0EBBEAF6A939A93CD0C8D23B7FA9FFA00E0496AB691A9778FB3F65539FC8B31"email: "+19166982582@expensify.sms"httpCode: 200jsonCode: 200requestID: "048f4be2d9000093588693a200000001"__proto__: Object
Ion.js:68 [STORE] key changed app_redirectTo /
Ion.js:68 [STORE] key changed last_authenticated 1597420784612
6Ion.js:68 [STORE] key changed app_redirectTo /signin
ActionsPersonalDetails.js:81 Error fetching personal details TypeError: Cannot read property 'personalDetailsList' of undefined
    at ActionsPersonalDetails.js:46
(anonymous) @ ActionsPersonalDetails.js:81
Ion.js:68 [STORE] key changed app_redirectTo /signin
ActionsPersonalDetails.js:81 Error fetching personal details TypeError: Cannot read property 'personalDetailsList' of undefined
    at ActionsPersonalDetails.js:46
(anonymous) @ ActionsPersonalDetails.js:81
pusher.js:50 [Pusher] state changed Objectcurrent: "connected"previous: "connecting"__proto__: Object
pusher.js:42 [Pusher] connected
/#/signin:1 [DOM] Password field is not contained in a form: (More info: https://goo.gl/9p2vKq) <input autocapitalize=​"sentences" autocomplete=​"on" autocorrect=​"on" dir=​"auto" spellcheck=​"true" type=​"password" data-focusable=​"true" class=​"css-11aywtz" value style=​"background-color:​ rgb(55, 68, 76)​;​ border-color:​ rgb(74, 89, 96)​;​ border-radius:​ 8px;​ border-width:​ 1px;​ color:​ rgb(255, 255, 255)​;​ font-family:​ GTAmericaExp-Regular;​ padding:​ 12px;​">​
pusher.js:38 [Pusher] error {type: "PusherError", data: {…}}data: {code: null, message: "Auth info required to subscribe to private-user-accountID-3064822"}type: "PusherError"__proto__: Object
(anonymous) @ pusher.js:38
e.emit @ pusher.js:1547
error @ pusher.js:2855
e.emit @ pusher.js:1547
message @ pusher.js:2092
e.emit @ pusher.js:1547
t.onMessage @ pusher.js:1675
socket.onmessage @ pusher.js:1692
ActionsSession.js:51 [SIGNIN] Authenticating with expensify login? yes
ActionsSession.js:62 [SIGNIN] Authentication result. Code: 200
ActionsSession.js:78 [SIGNIN] Creating a login
18Fetch finished loading: POST "<URL>".
Ion.js:68 [STORE] key changed credentials {login: "React-Native-Chat-a0301525-a1c2-599c-59e4-9a75b5571c4a", password: "c626c63a-831a-987c-fb2f-cf1580f1f786"}
ActionsSession.js:81 [SIGNIN] Successful sign in 2
Ion.js:68 [STORE] key changed session {accountID: 3064822, authToken: "14CC437BAA763AA5E88C1AF631AEDD248DCB1D683CC31C6F40…A1C75505C66697E27EF6B9CF5FCE530DBF58D5CF613893051", email: "+19166982582@expensify.sms", httpCode: 200, jsonCode: 200, …}accountID: 3064822authToken: "14CC437BAA763AA5E88C1AF631AEDD248DCB1D683CC31C6F40CFD6F2952873C64C84CE3D4E23767565955073BF455E816B18B7D6E9A4977870694B74032FAF1B1463C72FA4F682DB863672AB7DFC97A154039E21838F36887A55F70EED2E5C7B3127D86F19935B96CC0D9E133593DECF794AF12424F986ADE18AE36651F58934FD91F85D35C455C1D4812BDAF9BEB996B010075F3F1DA7D96E0322D1B075BDB821BFC4FBE38DEF6C9AC6946CA166934E0C9E59AE62FAFC098D3A6F5D1C8600BE03509C7EA598B947EA1C4E148A9C090179E90D893ACC824BB1BE74D15EA201DC8BC06D90344B192A1C75505C66697E27EF6B9CF5FCE530DBF58D5CF613893051"email: "+19166982582@expensify.sms"httpCode: 200jsonCode: 200requestID: "048f4c883c0000935886868200000001"__proto__: Object
Ion.js:68 [STORE] key changed app_redirectTo /
Ion.js:68 [STORE] key changed last_authenticated 1597420827008
pusher.js:156 [Pusher] Attempting to subscribe to channel true {channelName: "private-user-accountID-3064822", eventName: "reportComment"}
Ion.js:68 [STORE] key changed report_63699490 {reportID: 63699490, reportName: "#React-Ion", reportNameValuePairs: {…}, hasUnread: false}
Ion.js:68 [STORE] key changed report_63212778 {reportID: 63212778, reportName: "#deprecate-slack", reportNameValuePairs: {…}, hasUnread: false}
Ion.js:68 [STORE] key changed report_63212795 {reportID: 63212795, reportName: "#deprecate-intercom", reportNameValuePairs: {…}, hasUnread: false}
Ion.js:68 [STORE] key changed report_63212764 {reportID: 63212764, reportName: "#consumer-first", reportNameValuePairs: {…}, hasUnread: false}
Ion.js:68 [STORE] key changed report_63212607 {reportID: 63212607, reportName: "#preaccounting", reportNameValuePairs: {…}, hasUnread: false}
Screen Shot 2020-08-14 at 9 15 36 AM Screen Shot 2020-08-14 at 9 15 41 AM
quinthar commented 4 years ago

This is super important, but it occurs to me that nobody will be able to experience this in the first time live demo -- so demoting this to HIGH.

quinthar commented 4 years ago

Actually, going to cut deeper and go to MED

quinthar commented 4 years ago

demoting to LOW to focus on the first-time user experience

quinthar commented 4 years ago

Actually this does affect the first time user experience, not sure what I was thinking. Leaving MED

quinthar commented 4 years ago

Whoops, sorry for being schizophrenic, that comment was intended for a different issue. Still super important, but not relevant to the first time experience, going back to LOW

cead22 commented 4 years ago

Fixed by https://github.com/AndrewGable/ReactNativeChat/pull/215