Closed wiencheck closed 6 months ago
I have identified the root cause of this bug and will deploy a fix soon. It's caused by Spotify returning a value of 0
in the JSON payload for the PagingObject.limit
property, which specifies the maximum number of items in the current page (and the step for the page offset interval). You cannot iterate over an interval with a step of 0.
Please Try 4297eb6f4161fc0f813bf76ce9d4cf8d5cc13f7c. Should now be fixed in 3.0.1. Please close if this fixes your issue.
It seems that those changes broke the extendPages functionality because now it only downloads first page and returns. I rolled back to 3.0.0 and then was able to download all pages from PagingObject so 3.0.1 definitely broke some logic
Oh noo. Will take a look.
I think this is the issue: https://github.com/Peter-Schorn/SpotifyAPI/blob/9cc938b41d50eeb5ef8d25431d1d084100f40cc8/Sources/SpotifyWebAPI/Other/MiscellaneousUtilities.swift#L256-L258
This was supposed to be:
if minOffset >= maxOffset {
return []
}
This will prevent crashes.
After testing it seems that the issue is now resolved, thank you!
This crash is affecting a lot of my users however I've not been able to reproduce it on my side. The crash cause is
Swift runtime failure: Stride size must not be zero