Closed michaeldomanek closed 1 year ago
Does this occur for the same ids every time?
no every time other ids and sometimes it doesn't happen and sometimes e.g 5 request fail (avg. 2-6 requests fail)
I have not reproduced this bug.
Apologies, that was a typo. I have not been able to reproduce this bug on kotlin 1.6.20, version 3.8.6 @michaeldomanek after several thousands of requests. My code:
suspend fun main() = runBlocking {
val api = spotifyAppApi("", "").build()
api.spotifyApiOptions.enableDebugMode = true
api.spotifyApiOptions.useCache = false
val albumIds = File("${System.getProperty("user.home")}/Downloads/albumIds.txt").readText()
.replace("[\\[\\]]".toRegex(), "")
.split(", ")
while (true) {
val tracks = albumIds.map { albumId ->
async {
api.albums.getAlbumTracks(albumId).getAllItemsNotNull()
}
}.awaitAll()
println(tracks)
}
}
Can you give me more information around this behavior? Is there a particular exception or stacktrace you can share
Hello @adamint thanks for looking into it. This is my Stacktrace: Stacktrace.txt I edited my comment because yesterday I thought it was a Java 17 problem and changing sdk solved the problem, but today it happened with other Java versions too.
I created a new sample project to test it: kotlin-gradle-example The Stacktrace is from here if you want to look at it.
Hi @michaeldomanek, I'm still unable to reproduce this with the given sample, on various JDKs (8, 11, 17). You reproduced it in this sample project? Do you have the debug console logs listing the request (from enableDebugMode)
No additional info was provided, closing
Describe the bug when I call
api.albums.getAlbumTracks()
for a lot of albums (e.g. 40 or 80), I getReceived Status Code 400. Error cause: malformed request sent
for some requestsTo Reproduce
create albumIds list from this file: albumIds.txt
Desktop: