Automattic / Automattic/pocket-casts-android
Logging in and syncing on watch takes a long time
- Dominant language
- Kotlin
- Stars
- 2.8k
- Forks
- 308
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 143
Description
### Description
There are three issues I'm seeing:
1. When logging in using a Google account on debug builds, the watch app takes a very long time to get the token from Google (I've seen this take 4 minutes on a debug build). **I originally thought this was a general issue, but it now looks like it is just an issue on debug builds, which makes it not such a big deal.**
2. Performing all of our API calls to download the account data after we get the Google account can easily take 1-2 minutes (not surprisingly, it seems to take longer with larger accounts).
3. Once the login and refresh is complete and the logging in screen is dismissed, I am still seeing it take ~20 seconds for the Now Playing chip to appear on both debug and release builds. In other words, the main watch list screen is shown, and the account has an episode that is currently being played, but the now playing chip doesn't show until about 20 seconds later.
Some things I've noticed:
- This is only really an issue on physical devices, emulators are much, much faster, to the point where it is not a noticeable issue on emulators
- If you log out and log back into the same account, the second log in goes _much_ more quickly, to the point where it is not a noticeable issue.
- Release builds are faster debug builds (seem to take roughly half as long to log in), but I still see release builds taking at least a minute to log in
### Step-by-step reproduction instructions
1. Do a fresh install of the app on a physical wear os device
2. Log in using a google account
4. Observe that that it takes multiple minutes to get to the main watch list screen.
### Screenshots or screen recording
_No response_
### Did you search for existing bug reports?
- [X] I have searched for existing bug reports.
### Device, Operating system, and Pocket Casts app version
Pixel watch running Wear OS 3, 7.40 pre-release PC build
Contributor guide
Research direction
Reproduce a fresh install and login on a physical Pixel Watch running Wear OS 3, then compare the Google token step, account API download, and Now Playing chip appearance with a repeat login and an emulator. Done means the three delays are measured and their causes are identified and addressed without regressing login or sync behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- authentication, mobile, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100