-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[Android] Update OkHttp to 3.4.1 and Okio to 1.9.0 #8672
Conversation
cc @mkonicek & @bestander Upgrading to 3.4.0 fixes the issue we had with 3.3.1 |
Following issues should be resolved by this PR: |
This is really awesome and great to see the tests are passing. @bestander can you help land this in case the shipit bot isn't enough? |
@facebook-github-bot shipit |
Something went wrong when importing this pull request. Please cc someone from the team at fb to help with importing this. |
Great work, Andrew. |
@facebook-github-bot import |
Thanks for importing. If you are an FB employee go to Phabricator to review. |
https://github.com/square/okhttp/blob/master/CHANGELOG.md#version-341 Will need to update OkHttp to 3.4.1 due to a major bug in 3.4.0 |
@AndrewJack, what is the point of importing 3.4.0 if we can do 3.4.1? |
I mean it is easier to do in one go then multiple times. |
@bestander lets just do #8680, I thought you had already imported this one. |
@bestander We already have a few issues with the version we are currently using (3.2.0). I think it is worth updating now, but I'll let you decide. |
I just wrote import command, some manual work to update internal app will be required, so feel free to bump this PR to the needed version please :) |
@bestander that's done and I've closed #8680 |
@facebook-github-bot import |
Thanks for importing. If you are an FB employee go to Phabricator to review. |
It'll take a couple of days to allow people to review things and see if anything gets raised in okhttp repo |
Hey @AndrewJack, I stumbled upon internal tests failing because of square/okhttp#2533. |
I wonder what we should do about it. |
Any ideas? This problem of difference between monorepo of dependencies at FB VS package managers in OSS projects is raised quite often. Maybe OSS community could provide a layer of abstraction that allows native dependencies to be overridden? |
In this case an app could actually force the upgrade with Gradle, by excluding okhttp and okio from react native dependency and adding on okhttp 3.4.1 and okio 1.9.0 as a project dependency. For example: dependencies {
compile('com.facebook.react:react-native:+') {
exclude group: 'com.squareup.okhttp3'
exclude group: 'com.squareup.okio'
}
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.squareup.okhttp3:okhttp-urlconnection:3.4.1'
compile 'com.squareup.okhttp3:okhttp-ws:3.4.1'
compile 'com.squareup.okio:okio:1.9.0'
} This does seem to be a recurring issue. |
@bestander square/okhttp#2533 (comment) might fix your issue, if this what you want to do. Robolectric 3.1 fixed the issue with OkHttp, but also broke compatibility with power mock. |
I would not want to add some custom mocks until the issue is resolved by okhttp people. |
@bestander ok well in the meantime people can add the latest okhttp dependency to their app dependencies as a workaround. |
Thanks, Andrew. I'll keep an eye on the issue. On Tuesday, 19 July 2016, Andrew Jack notifications@github.com wrote:
|
actually my team mates decided to do the robolectrick hack to unblock this, so we will be landing this soon, @AndrewJack |
c47f745
Summary: - 3.3.1 wasn't compatible with Robolectric 3.0, however 3.4.0 [fixes](square/okhttp#2533 (comment)) this issue. - Few other fixes to OkHttp mentioned in the [CHANGELOG.md](https://github.com/square/okhttp/blob/master/CHANGELOG.md) > Fixes: facebook#7743 > - Android apps can recover from a `REFUSED_STREAM` in HTTP/2. - A few other fixes mentioned in the [CHANGELOG.md](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - CircleCi - Test with `/Examples` ✅ Closes facebook#8672 Reviewed By: alsutton Differential Revision: D3541293 Pulled By: bestander fbshipit-source-id: 76429861b4f4df15cb9c18ab0f177daee3e1459d
Summary: - 3.3.1 wasn't compatible with Robolectric 3.0, however 3.4.0 [fixes](square/okhttp#2533 (comment)) this issue. - Few other fixes to OkHttp mentioned in the [CHANGELOG.md](https://github.com/square/okhttp/blob/master/CHANGELOG.md) > Fixes: facebook#7743 > - Android apps can recover from a `REFUSED_STREAM` in HTTP/2. - A few other fixes mentioned in the [CHANGELOG.md](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - CircleCi - Test with `/Examples` ✅ Closes facebook#8672 Reviewed By: alsutton Differential Revision: D3541293 Pulled By: bestander fbshipit-source-id: 76429861b4f4df15cb9c18ab0f177daee3e1459d
Summary: - 3.3.1 wasn't compatible with Robolectric 3.0, however 3.4.0 [fixes](square/okhttp#2533 (comment)) this issue. - Few other fixes to OkHttp mentioned in the [CHANGELOG.md](https://github.com/square/okhttp/blob/master/CHANGELOG.md) > Fixes: facebook#7743 > - Android apps can recover from a `REFUSED_STREAM` in HTTP/2. - A few other fixes mentioned in the [CHANGELOG.md](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - CircleCi - Test with `/Examples` ✅ Closes facebook#8672 Reviewed By: alsutton Differential Revision: D3541293 Pulled By: bestander fbshipit-source-id: 76429861b4f4df15cb9c18ab0f177daee3e1459d
Summary: - 3.3.1 wasn't compatible with Robolectric 3.0, however 3.4.0 [fixes](square/okhttp#2533 (comment)) this issue. - Few other fixes to OkHttp mentioned in the [CHANGELOG.md](https://github.com/square/okhttp/blob/master/CHANGELOG.md) > Fixes: #7743 > - Android apps can recover from a `REFUSED_STREAM` in HTTP/2. - A few other fixes mentioned in the [CHANGELOG.md](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - CircleCi - Test with `/Examples` ✅ Closes facebook/react-native#8672 Reviewed By: alsutton Differential Revision: D3541293 Pulled By: bestander fbshipit-source-id: 76429861b4f4df15cb9c18ab0f177daee3e1459d
Motivation
Motivation from #7746
Test plan
/Examples
✅