Skip to content

WordPress.com News images don't show in the reader #21713

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

Merged
merged 7 commits into from
Mar 3, 2025

Conversation

nbradbury
Copy link
Contributor

@nbradbury nbradbury commented Feb 26, 2025

Fixes #21709

In the issue it was noted that featured images from WordPress.com News failed to appear in the reader detail. In researching the problem, it turned out these images don't appear in the reader list or photo viewer either.

Logcat showed this whenever loading a featured image:

llegalStateException: cannot make a new request because the previous response is still open: please call response.close()

It seems that WordPress.com News images do a 301 (permanent) redirect, and our CustomRedirectInterceptor failed to close the previous response here before proceeding with the redirect. Correcting this fixed the problem with WordPress.com News images.

It should be noted that CustomRedirectInterceptor is used in more places than just the reader so there is a possibility of unintended consequences, but I left this PR in draft for several days and noticed no issues while testing. My assumption is this likely also fixes similar issues elsewhere in the app. Note that I P2'd about this at paqN3M-1oQ-p2 but received no feedback.

To test:

  • View WordPress.com News in the Android reader
  • Verify images show in the reader list
  • Tap a post in the list
  • Verify images show in the reader detail
  • Tap an image
  • Verify images show in the reader photo viewer

Note: Right now featured images aren't shown edge-to-edge. This will be handled separately.

@dangermattic
Copy link
Collaborator

dangermattic commented Feb 26, 2025

1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 26, 2025

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr21713-059da6b
Commit059da6b
Direct Downloadwordpress-prototype-build-pr21713-059da6b.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 26, 2025

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr21713-059da6b
Commit059da6b
Direct Downloadjetpack-prototype-build-pr21713-059da6b.apk
Note: Google Login is not supported on these builds.

Copy link

codecov bot commented Feb 26, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 39.41%. Comparing base (e344e16) to head (059da6b).
Report is 1 commits behind head on trunk.

Files with missing lines Patch % Lines
...android/fluxc/network/CustomRedirectInterceptor.kt 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #21713   +/-   ##
=======================================
  Coverage   39.41%   39.41%           
=======================================
  Files        2122     2122           
  Lines       99570    99570           
  Branches    15324    15324           
=======================================
  Hits        39247    39247           
  Misses      56844    56844           
  Partials     3479     3479           

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

Copy link

sonarqubecloud bot commented Mar 3, 2025

@nbradbury nbradbury marked this pull request as ready for review March 3, 2025 13:26
@nbradbury nbradbury requested a review from dcalhoun March 3, 2025 13:27
Copy link
Member

@dcalhoun dcalhoun left a comment

Choose a reason for hiding this comment

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

Testing plan succeeded for me. Changes look sound.

@nbradbury nbradbury merged commit cc82fd1 into trunk Mar 3, 2025
29 checks passed
@nbradbury nbradbury deleted the issue/21709-wpnews-reader-featured-image branch March 3, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Featured images missing in Reader
4 participants