Closed ertjlane closed 2 years ago
We are checking this, shall update our findings/questions soon
Hope you are getting issue when using other than the production domain (api.lamp.digital).
Could you give us the domain name and test username/password to test?
It is not our BIDMC/Boston one, but instead: mindlamp-api-dev.pronet.med.yale.edu My test account that had a logout in the issue is:
Email: @.*** Password: 45yQVEEu!wsp
Could you send the email (username) to @michaelmenon 's email
Yes, just did!
We have kept the phone with the user logged in status to see if the logout issue can be reproduced, so far we have not experienced any issues, we are watching it over the weekend, shall update here as soon as we find anything
Thanks - it seemed to happen with notifications for activities once. But I understand it may be hard to catch.
it seemed to happen with notifications for activities once
Just to confirm that.. Are you using the above given researcher account and experience the logout issue with the same account? Or getting logout issue with any participant account under this researcher ? [because researcher has no notifications]
Tested on iOS, When login with given credentials (researcher account) on mindlamp-api-dev.pronet.med.yale.edu, it doesn't return authorization token and identity object from web page to native.
As the basic auth details are not available in the app, it will navigate to login page on next launch. This is happening now.
We can investigate this with @Linoy339. @avaidyam
But When we login using a participant (e@.com), on same domain mindlamp-api-dev.pronet.med.yale.edu, it does return authorisation token and identity object correctly. So no issues with this participant login.
@avaidyam @jtorous
The logout issue we are experiencing is with researcher account, not with participant account. We tried with different accounts and same issue experiencing in both Android and iOS apps. After debugging the issue, we are not sure about the actual cause of the issue. The only issue we can see is the dispatch event is not getting triggered for researcher account, but working with participant account. But there is no condition for researcher/participant login there. There is no exception, and when we console the objects, we are getting correct values.
This is line where the login dispatch event is fired : https://github.com/BIDMCDigitalPsychiatry/LAMP-js/blob/master/src/index.ts#L185
And the dispatch event is triggered for logout event. https://github.com/BIDMCDigitalPsychiatry/LAMP-js/blob/master/src/index.ts#L191
@avaidyam do you have any suggestion for this issue as this was actually not implemented by us.
//cc @ZCOEngineer @michaelmenon
@sarithapillai8 We suspect the issue is linked to push notification delivery (as mentioned before) and seems to only happen on iOS. @jijopulikkottil This sounds like the WKWebView issue we discussed previously. Can you double check on that?
@avaidyam It doesn't seems to be any connection with Push notification. On native side, we are facing the issue that, app doesn't receive login message (login message with authentication details) when a researcher logged in. As the authentication token is not received, app will prompt login again when relaunch app
I think you may be misunderstanding the issue we are trying to solve. When a patient is logged in, at some arbitrary point thereafter they reopen the app to find they are now "logged out", and then a few hours later they open the app again to find that they are "logged back in". It's not related at all to researcher login.
@avaidyam Thanks to the clarification of issue
@jijopulikkottil The fix for the suspected issue was already merged into master. Can you please pull from master and test the iOS build with the staging dashboard?
Hi @avaidyam can you please let us know what was the issue and the fix made, so that we test the correct scenario.
Hi @avaidyam hope these were the fixes you were talking about.
This seems to be fixing the researcher logout issue which we thought initially the main issue was :
Also there seems to be one update on the iOS side : https://github.com/BIDMCDigitalPsychiatry/LAMP-core-ios/pull/47
Not sure if this has resolved the suspected issue of participant logout as that is not always reproducible. Team was testing today and we can share our updates Monday in our call.
With the new iOS build too we are not getting this issue.
Two users reported being logged out repeatedly.
User U5209744141 on iPhone 7 or 8 is getting logged out continuously and has to log-in every time. [June 30, 2022] User U1456972679 on iPhone XR gets logged out occasionally (especially when they click on the notifications instead of the app icon) [since May 25, 2022]
Hi @Devayani0102 Could you confirm the app version using. AppStore app or Test flight app ? The above fix is not yet available on appstore app.
When you see the login screen when reopening the app, could you force quit the app and relaunch and check wether it is loading home page or login page ?
@Devayani0102 were you able to check this?
@jijopulikkottil I had @ertjlane check this, and it seems like the TestFlight build didn't get pushed to production yet. I'll take care of that right now. Do you know if we can make this process automatic in the CI/CD (i.e. submit to app store for production) for when we create a GitHub Release?
Yes @avaidyam . We have done this. If we push/merge to master, then it will make a staging pointed build. And if we create a release, it will be production pointed.
@jijopulikkottil Yes, but does it automatically create a release and submit the build for app store review?
No. You mean create new version, add 'Whats New' etc.. and submit for review. right ? So are we supposed to integrate fastlane deliver ?
@jijopulikkottil Is there a way to do that without using fastlane? I believe firebase has an equivalent feature but I'd prefer using the first-party Apple app store connect CLI tools or API.
Here is the official doc. [Those are API calls] It seems to be they deprecated 'App store version submission apis'. And not mentioned what are the api to use instead.
This seems to be fixed in staging!
I'm making a quick note here. Another user has reported this issue, specifically with a
@ertjlane lets first try to reproduce this here in the same os version.
@ertjlane Thanks for posting the issue here rather than create new one. Hope the issue is same https://github.com/BIDMCDigitalPsychiatry/LAMP-platform/issues/639#issuecomment-1139897285
Also could the user confirm the below scenario ? When you see the login screen when reopening the app, could you force quit the app and relaunch and check wether it is loading home page or login page ?
@jijopulikkottil Thanks. It is actually distinct from the comment you linked, in that the user stays logged out, and must login again manually. Like the original issue, however, it is disconnected from the researcher login. I will reach out and inquire if the user would implement the strategy you mentioned.
Describe the bug App logs out intermittently, usually after several hours. The app would then log back in on its own. Was replicated across multiple phones. Backend examination of lamp activity for one of the phones gave timestamps of logout instances (screenshots below).
To Reproduce Steps to reproduce the behavior:
Expected behavior Click on app from home screen, app opens to logged in user on the 'assess' page.
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context *Appeared on 2 phones of same model and OS.