witnessmenow / spotify-api-arduino

Arduino library for integrating with the Spotify Web-API (Does not play music)
MIT License
178 stars 33 forks source link

NoMemory crash for searchForSong() #53

Closed mariusebastian closed 1 year ago

mariusebastian commented 1 year ago

Is the searchForSong() function tested OK for the esp8266? When using the Arduino IDE on a NodeMCU clone the getSearchResults example fails with serial output

Free Heap: 39104
Making Search Request:
/v1/search
stack size -1073740928
Status: HTTP/1.0 200 OK
HTTP Version: HTTP/1.0
Status Code: 200
Status Code: 200
deserializeJson() failed with code NoMemory
Closing client

So is it the negative stack size or the free heap size that's causing the problems?

witnessmenow commented 1 year ago

I have never actually used this feature at all!

From a quick look it looks like the SearchDetailsBufferSize might be too small for your result, might be worth trying bumping that up

spotify.searchDetailsBufferSize = 3000; is what it currently is, so you could try increase that.

witnessmenow commented 1 year ago

Added some additional info to the example