Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truncated JSON response(?) causes "Invalid JSON response" on login #182

Open
mattock opened this issue Aug 21, 2023 · 4 comments
Open

Truncated JSON response(?) causes "Invalid JSON response" on login #182

mattock opened this issue Aug 21, 2023 · 4 comments

Comments

@mattock
Copy link

mattock commented Aug 21, 2023

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 my-email@example.org%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.

@mattock
Copy link
Author

mattock commented Aug 21, 2023

Disabling "Show members in channels" fixes the immediate issue. Not sure if it causes issues elsewhere.

@peci1
Copy link

peci1 commented Sep 5, 2023

I started getting this today in one of my workspaces. Unfortunately, your workaround doesn't help.

@peci1
Copy link

peci1 commented Sep 11, 2023

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.

@berrange
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants