Skip to content

fix: Downgrade OkHttp to v4#653

Open
mahmoud-elmorabea wants to merge 1 commit intomainfrom
downgrade-okhttp
Open

fix: Downgrade OkHttp to v4#653
mahmoud-elmorabea wants to merge 1 commit intomainfrom
downgrade-okhttp

Conversation

@mahmoud-elmorabea
Copy link
Contributor

@mahmoud-elmorabea mahmoud-elmorabea commented Feb 12, 2026

Summary

This is causing errors for customers due to:

  • Duplicate meta data coming from OkHttp

  • Some RN code is using OkHttp 4 code and is failing when Gradle resolves dependency to v5

  • OkHttp downgrade (5 → 4): Bumped OkHttp from 5.2.1 to 4.12.0 in buildSrc/.../Versions.kt. SSE usage is compatible with OkHttp 4; no code changes required.

  • Packaging / META-INF exclusions removed:

    • Dropped the OkHttp-5-specific exclusion META-INF/versions/9/OSGI-INF/MANIFEST.MF from messaginginapp, samples/java_layout, and samples/kotlin_compose.
    • Removed the remaining metadata exclusions (META-INF/OSGI-INF/MANIFEST.MF and, in the Compose sample, META-INF/{AL2.0,LGPL2.1}) by deleting the packaging { resources { excludes ... } } blocks in:
      • messaginginapp/build.gradle
      • samples/java_layout/build.gradle
      • samples/kotlin_compose/build.gradle.kts

Sample apps and the SDK should be verified to build and run; if duplicate-file errors appear (e.g. for license files), re-add only the needed excludes in the affected module(s).


Note

Medium Risk
Dependency downgrade and packaging changes can affect runtime networking behavior and may reintroduce duplicate-resource build failures in specific module/consumer combinations.

Overview
Downgrades the SDK’s OkHttp dependency from 5.2.1 to 4.12.0 via Versions.OKHTTP.

Removes packaging { resources { excludes ... } } blocks from messaginginapp and the sample apps, dropping the META-INF exclusion rules that were added to work around OkHttp 5/OSGi and license resource conflicts.

Written by Cursor Bugbot for commit 15da7db. This will update automatically on new commits. Configure here.

@mahmoud-elmorabea mahmoud-elmorabea self-assigned this Feb 12, 2026
@github-actions
Copy link

github-actions bot commented Feb 12, 2026

Sample app builds 📱

Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request.


@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.49%. Comparing base (f577014) to head (15da7db).
⚠️ Report is 49 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #653      +/-   ##
============================================
+ Coverage     63.15%   68.49%   +5.33%     
- Complexity      514      760     +246     
============================================
  Files           118      142      +24     
  Lines          3602     4307     +705     
  Branches        445      582     +137     
============================================
+ Hits           2275     2950     +675     
+ Misses         1186     1134      -52     
- Partials        141      223      +82     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link

  • java_layout: downgrade-okhttp (1770902595)

@github-actions
Copy link

Build available to test
Version: downgrade-okhttp-SNAPSHOT
Repository: https://central.sonatype.com/repository/maven-snapshots/

@github-actions
Copy link

  • kotlin_compose: downgrade-okhttp (1770902595)

@github-actions
Copy link

github-actions bot commented Feb 12, 2026

📏 SDK Binary Size Comparison Report

Module Last Recorded Size Current Size Change in Size
core 29.88 KB 29.88 KB ✅ No Change
datapipelines 39.12 KB 39.12 KB ✅ No Change
messagingpush 30.25 KB 30.25 KB ✅ No Change
messaginginapp 106.69 KB 106.75 KB ⬆️ +0.06KB
tracking-migration 22.89 KB 22.89 KB ✅ No Change

@mahmoud-elmorabea mahmoud-elmorabea marked this pull request as ready for review February 13, 2026 10:29
@mahmoud-elmorabea mahmoud-elmorabea requested a review from a team as a code owner February 13, 2026 10:29
@github-actions
Copy link

  • java_layout: downgrade-okhttp (1770978491)

@github-actions
Copy link

  • kotlin_compose: downgrade-okhttp (1770978490)

Copy link
Contributor

@Shahroz16 Shahroz16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just double checking, have we verified it on

  • Firebase version with progurarding
  • In app which uses headers and other features of retofit for caching etc

This it was bumped only for SSE, so probably they would be fine?

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

Successfully merging this pull request may close these issues.

3 participants