-
Notifications
You must be signed in to change notification settings - Fork 143
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
Fix websocket issue with pre android sdk 24 devices #284
Conversation
Codecov Report
@@ Coverage Diff @@
## master #284 +/- ##
============================================
- Coverage 76.25% 76.08% -0.17%
Complexity 284 284
============================================
Files 31 31
Lines 1798 1802 +4
Branches 137 137
============================================
Hits 1371 1371
- Misses 371 375 +4
Partials 56 56
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my Android knowledge is limited but this looks sensible to me
The workaround instructions imply that if you no longer call |
Hm, I had thought about that - but I'm not sure what exactly we'd need to do or where it would need to go. Considering this won't be affecting many (less than 15% of android devices are running pre-24) - and I presume this won't impact people who run channels from pusher (at least when I tested on an android device it worked fine) - is it worth the extra effort to delay the release, and if so, can we set some time up to talk about it? |
Ah I see - I had assumed that the old version of the websocket library was doing hostname validation some other way - but it doesn't look like it did. Since that's the case I think it's fine to not do it for old clients (since it wasn't previously done at all!). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Description of the pull request
Issue #283 when we updated the websocket library.
I could reproduce this crash myself with an emulator running 5.1 and the current version of the library.
I followed the instructions on the websocket library to fix this issue. There was a discussion around the issue for those interested here. And the public interface has been documented.
I have also surrounded the call super method with a try so android 24+ devices can get the benefit.
I have tested on my emulator that this version does not crash and connects as expected.
Additional
Turned out there was an issue with using
map.replace
for the encrypted channels on old versions of android - I fixed this too by usingmap.put
instead.