I used https://developer.spotify.com/documentation/widgets/generate/follow-button/ to create code to use as a template for embedding "Follow artist on Spotify" buttons on a website. The domain on which the buttons are served from hosts thousands of artists, if that matters.
This functionality used to work, but it has been broken for us for over two weeks.
The problem we're seeing is that the behavior of the button is erratic and differs between browsers. In Chrome, the button doesn't seem to work at all. In Firefox, the button will sometimes work but doesn't properly update the state (e.g. "Following") of the button, which leads to multiple clicks that toggle follow/unfollow to the impatient or confused user.
I get these results in our sites' framework, but also from the developer.spotify.com documentation page.
In Chrome, after clicking "follow", there is no effect on the Spotify account (no follow) and this error is displayed in console:
follow.4bd5448e.js:1 Uncaught Error: Max attempts reached
at Object.executePending (follow.4bd5448e.js:1)
at follow.4bd5448e.js:1
at n._processResponse (follow.4bd5448e.js:1)
at n._receiveMessage (follow.4bd5448e.js:1)
at r (follow.4bd5448e.js:1)
In Firefox, after clicking "follow", the button updates to "following" state, but the artist is not followed on Spotify, and this error is displayed in console:
Uncaught TypeError: i is not a function
follow https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
onload https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
r https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
G https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
_wrapXHR https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
_wrapXHR https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
xt https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
e https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
r https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
setTimeout handler*6719/Ue</t.prototype._wrapTimeFunction/< https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
e https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
follow https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
b https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
execute https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
executePending https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
init https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
r https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
_wrapEventTarget https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
xt https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
addEventListener https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
addEventListener https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
init https://open.scdn.co/cdn/build/follow/follow.e48044ad.js:1
<anonymous> https://open.spotify.com/follow/1?uri=spotify:artist:6sFIWsNpZYqfjUpaCgueju&size=detail&theme=light&...
follow.e48044ad.js:1:5146
In Safari on iPhone, after clicking the "follow" button it updates to show "following" state, but the artist is not followed on Spotify.