Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Web-Ext][Bug] Initial sync unable to load more than 3000 activities #1205

Open
bartvanandel opened this issue Oct 28, 2024 · 1 comment
Open

Comments

@bartvanandel
Copy link

Describe the bug
My Strava profile has more than 3000 activities. During the initial sync, briefly it shows the (correct) total number of activities. However, during sync, this immediately changes to 3000 activities.

I am pretty sure this is caused by using the non-API URL used (e.g., https://www.strava.com/athlete/training_activities?new_activity_only=false&per_page=20&page=114), which also on the Strava website limits the amount of history that can be shown. That endpoint will return total: 3000 in the response as the max value, and consequetly won't go beyond page 150. Page 151 will just return an empty result set.

This is likely resolved by using the appropriate API equivalent, getLoggedInAthleteActivities, which also allows loading more than 20 activities per page (default is 30, the documentation doesn't mention the upper limit).

I think using this endpoint can also be used to speed up the initial load (or forced full sync) a lot by keeping track of the progress of the import process, so continuing the import doesn't need to load all previous "list activities" queries again. For context, my initial import took about 2 weeks currently, which is very suboptimal, to put it mildly.

To Reproduce
Steps to reproduce the behavior:

  1. Have more than 3000 activities on Strava
  2. Open https://www.strava.com/dashboard?elevateSync=true&fastSync=false&forceSync=false
  3. Keep an eye out for the "Total activities found". It will display the correct value briefly, then jump down to 3000.

Expected behavior
All activities are loaded, not just the most recent 3000.

Environment

  • OS: any
  • Browser name and version: any
  • Web extension version: 7.2.0 / Build 20240811.dd77acf4
@MisterTickle
Copy link

MisterTickle commented Oct 31, 2024

I think it's a very good suggestion. For my first load it took me many days, because it kept telling me to wait 4-6 hours between attempts to get the next "chunk" of my Strava data. Each subsequent time, the first 10 minutes is taken up by fetching activity groups to painfully arrive at the first "new" one that should be imported. Next, a few precious minutes of importing new data, before Strava quickly slams the door shut again because I've made too many requests.

But 2/3rd of those requests each time are the "finding out where to resume from" part.

By the way, there are some helpful messages logged in the browser Console if anything flies past too quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants