Truncated JSON response(?) causes "Invalid JSON response" on login
Hi,
I tried to add a new Slack workspace to Pidgin on top of my three existing ones. However, I get "Invalid JSON response". In debug logs I can see, however, that user data from the workspace is coming in, but seems truncated:
--- snip ---
{"id":"<user-id>","team_id":"<team-id>","name":"<user-name>","deleted":false,"color":"ea2977","real_name":"Firstname Lastname","tz":"Europe\/Helsinki","tz_label":"Eastern European Summer Time","tz_offset":10800,"profile":{"title":"","phone":"","skype":"","real_name":"<real name>","real_name_normalized":"<real_name_normalized>",
(14:37:43) connection: Connection error on 0x5587aace25d0 (reason: 0 description: Invalid JSON response)
(14:37:43) account: Disconnecting account [email protected]%newworkspace.slack.com (0x5587a97fd460)
(14:37:43) connection: Disconnecting connection 0x5587aace25d0
Notice how the message ends up with "," which obviously makes it invalid JSON. Is this a pagination problem or something? The workspace has lots of users (~5000) which may help explain this.
Any hints on how to fix or work around this would be appreciated.
Disabling "Show members in channels" fixes the immediate issue. Not sure if it causes issues elsewhere.
~~I started getting this today in one of my workspaces. Unfortunately, your workaround doesn't help.~~
My bad, I had my deployment/update script wrong, so it switched me back from #162 to master branch. With #162, I can still login via the xoxc- xoxd- token.
Notice how the message ends up with "," which obviously makes it invalid JSON. Is this a pagination problem or something? The workspace has lots of users (~5000) which may help explain this.
I've seen this with my install periodically.
The HTTP response header will say something like 'content-length: 954201' but we will only end up reading a fraction of that data before it appears that purple_ssl_read returns 0 indicating an EOF. This kinda suggests that the remote server is terminating the connection before it has send all data, but strangely this seems to impact me most when my own (poor bandwidth) internet link is under load.