Followed the IDE setup guide and using the current version of the required libraries.
Problem:
Compilation error from line 268 in esp8266-spotify-remote.ino and line 454 in SpotifyClient.cpp.
Full error message:
C:\Users\dly28\AppData\Local\Temp\7zO8FF71B23\esp8266-spotify-remote\esp8266-spotify-remote.ino: In function 'void drawSongInfo()':
C:\Users\dly28\AppData\Local\Temp\7zO8FF71B23\esp8266-spotify-remote\esp8266-spotify-remote.ino:268:70: error: no matching function for call to 'min(long unsigned int, uint32_t&)'
268 | drawProgress(min(data.progressMs + timeSinceUpdate, data.durationMs), data.durationMs, data.title, data.artistName, data.isPlaying, data.isPlayerActive);
| ^
In file included from c:\users\dly28\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\algorithm:62,
from C:\Users\dly28\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266/Arduino.h:229,
from C:\Users\dly28\AppData\Local\Temp\arduino\sketches\F43F5AE7C5F57203D99729C59B86BBAF\sketch\esp8266-spotify-remote.ino.cpp:1:
c:\users\dly28\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\bits\stl_algo.h:3479:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)'
3479 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
c:\users\dly28\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\bits\stl_algo.h:3479:5: note: template argument deduction/substitution failed:
C:\Users\dly28\AppData\Local\Temp\7zO8FF71B23\esp8266-spotify-remote\esp8266-spotify-remote.ino:268:70: note: mismatched types 'std::initializer_list<_Tp>' and 'long unsigned int'
268 | drawProgress(min(data.progressMs + timeSinceUpdate, data.durationMs), data.durationMs, data.title, data.artistName, data.isPlaying, data.isPlayerActive);
| ^
In file included from c:\users\dly28\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\algorithm:62,
from C:\Users\dly28\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266/Arduino.h:229,
from C:\Users\dly28\AppData\Local\Temp\arduino\sketches\F43F5AE7C5F57203D99729C59B86BBAF\sketch\esp8266-spotify-remote.ino.cpp:1:
c:\users\dly28\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\bits\stl_algo.h:3473:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)'
3473 | min(initializer_list<_Tp> __l)
| ^~~
c:\users\dly28\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\bits\stl_algo.h:3473:5: note: template argument deduction/substitution failed:
C:\Users\dly28\AppData\Local\Temp\7zO8FF71B23\esp8266-spotify-remote\esp8266-spotify-remote.ino:268:70: note: mismatched types 'std::initializer_list<_Tp>' and 'long unsigned int'
268 | drawProgress(min(data.progressMs + timeSinceUpdate, data.durationMs), data.durationMs, data.title, data.artistName, data.isPlaying, data.isPlayerActive);
| ^
In file included from c:\users\dly28\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\bits\specfun.h:45,
from c:\users\dly28\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\cmath:1927,
from c:\users\dly28\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\math.h:36,
from C:\Users\dly28\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266/Arduino.h:34,
from C:\Users\dly28\AppData\Local\Temp\arduino\sketches\F43F5AE7C5F57203D99729C59B86BBAF\sketch\esp8266-spotify-remote.ino.cpp:1:
c:\users\dly28\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\bits\stl_algobase.h:278:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
c:\users\dly28\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\bits\stl_algobase.h:278:5: note: template argument deduction/substitution failed:
C:\Users\dly28\AppData\Local\Temp\7zO8FF71B23\esp8266-spotify-remote\esp8266-spotify-remote.ino:268:70: note: deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'uint32_t' {aka 'unsigned int'})
268 | drawProgress(min(data.progressMs + timeSinceUpdate, data.durationMs), data.durationMs, data.title, data.artistName, data.isPlaying, data.isPlayerActive);
| ^
In file included from c:\users\dly28\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\bits\specfun.h:45,
from c:\users\dly28\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\cmath:1927,
from c:\users\dly28\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\math.h:36,
from C:\Users\dly28\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266/Arduino.h:34,
from C:\Users\dly28\AppData\Local\Temp\arduino\sketches\F43F5AE7C5F57203D99729C59B86BBAF\sketch\esp8266-spotify-remote.ino.cpp:1:
c:\users\dly28\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\bits\stl_algobase.h:230:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
230 | min(const _Tp& __a, const _Tp& __b)
| ^~~
c:\users\dly28\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.1.0-gcc10.3-e5f9fec\xtensa-lx106-elf\include\c++\10.3.0\bits\stl_algobase.h:230:5: note: template argument deduction/substitution failed:
C:\Users\dly28\AppData\Local\Temp\7zO8FF71B23\esp8266-spotify-remote\esp8266-spotify-remote.ino:268:70: note: deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'uint32_t' {aka 'unsigned int'})
268 | drawProgress(min(data.progressMs + timeSinceUpdate, data.durationMs), data.durationMs, data.title, data.artistName, data.isPlaying, data.isPlayerActive);
| ^
C:\Users\dly28\AppData\Local\Temp\7zO8FF71B23\esp8266-spotify-remote\SpotifyClient.cpp: In member function 'void SpotifyClient::downloadFile(String, String)':
C:\Users\dly28\AppData\Local\Temp\7zO8FF71B23\esp8266-spotify-remote\SpotifyClient.cpp:454:15: error: call to 'HTTPClient::begin' declared with attribute error: obsolete API, use ::begin(WiFiClient, url)
454 | http.begin(url);
| ~~~~~~~~~~^~~~~
exit status 1
Compilation error: no matching function for call to 'min(long unsigned int, uint32_t&)'
Attempted solutions:
To fix the SpotifyClient.cpp issue, I included WiFiClientSecure.h, created a WiFiClientSecure named wifiClient in the SpotifyClient::downloadFile function and changed http.begin(url); to http.begin(wifiClient, url);.
To fix the esp8266-spotify-remote.ino issue, I used the min definition from SpotifyClient.cpp and added it here.
These changes resulted in a successful compilation and upload but the display is asking for authentication and the link won't load no matter the browser or device. Not sure if it's something with the code changes I made. I am very inexperienced with coding and all of these solutions were quick Google lookups.