We Fixed the Reconnect Loop That Logged Some Accounts Out
A number of voice actors reported that their SoundCloud connection kept dropping, sometimes within a day or two of setting it up. It has been fixed. This one is worth explaining because the cause was more interesting than the symptom.
The symptom
You connected your account. Tracks appeared on your voice actor website. Some days later they stopped, the integration reported itself as disconnected, and reconnecting worked for another day or two. It looked exactly like rate limiting, which is what everybody assumed it was, including us for longer than we would like.
The cause
When you authorize a connection, the other service hands back a long string of characters that stands in for your permission. We stored that string in a database column with a maximum length of 255 characters. The strings being issued were considerably longer than that.
The database did what it was told and stored the first 255 characters. It did not complain. A truncated token looks exactly like a valid token right up to the moment you try to use it, at which point the far end refuses it and the connection appears to have expired.
The reason it worked at all for a day or two is that the initial connection used the token we had just received in memory, before it had made the round trip through storage.
The fix
The column now holds text of any reasonable length, the stored value is checked against what we received before we call the connection successful, and a failure to store now produces a real error rather than a silent shrug. Existing broken connections were cleared so they prompt for a clean reconnect rather than failing quietly forever.
What you need to do
If your audio disappeared, reconnect once in your integrations settings. It will hold this time. If it is currently working, do nothing.
Why we are writing this up
Because "it is probably rate limiting" cost us weeks. Silent truncation is a whole category of bug that produces symptoms pointing at somebody else's system, and the only defense is checking that what you stored is what you meant to store. We have since audited the other places we keep credentials from connected services for the same fault.
Related reading: SoundCloud, properly connected explains the integration itself, and audio playlists covers what to do with the tracks once they arrive.
New here? Create a free actor website and connect your audio.
