fix(image-server): fix issue where images didn't get a localhost url when server was paused#7518
Open
jrainville wants to merge 1 commit into
Open
fix(image-server): fix issue where images didn't get a localhost url when server was paused#7518jrainville wants to merge 1 commit into
jrainville wants to merge 1 commit into
Conversation
|
There was a problem hiding this comment.
Pull request overview
Fixes media server URL generation so that image/media URLs remain absolute even when the server listener is temporarily stopped (e.g., during background/pause), avoiding relative /messages/... paths that QML can misinterpret.
Changes:
- Updated
GetAddrPort()to resolve host from either the active listener address or configured bind address when the listener is stopped. - Updated
GetPort()to fall back tocachedPort(and then configured port) when the listener address is unavailable. - Updated
MakeBaseURL()to use the resolvedhost:port(instead of depending directly ons.address).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
Jenkins Builds
|
…when server was paused
44c8d4b to
a3a61b8
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/10.34.x #7518 +/- ##
==================================================
Coverage ? 61.27%
==================================================
Files ? 851
Lines ? 119282
Branches ? 0
==================================================
Hits ? 73095
Misses ? 38694
Partials ? 7493
Flags with carried forward coverage won't be shown. Click here to find out more.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background Image URL Fix Summary
status-app PR: status-im/status-app#21127
Problem
When the app returned from background, message image URLs could be generated as relative paths like qrc:/messages/images?messageId=..., which QML treated as a resource path instead of a local media-server URL.
This prevented images from settling after fallback/retry.
Root Cause
When the media server listener was stopped during background transition, server address state became nil.
URL generation depended on that active address, so base URL resolution could collapse to empty, producing relative /messages/... paths.
Fix Applied
Updated server URL resolution logic so image URLs remain absolute even when the listener is temporarily stopped.
Behavior after fix:
Tests
Regression tests were added/kept to verify stopped-server URL generation remains absolute:
Focused suite run:
Result
Message image URLs now retain the expected format after background/foreground flow, for example:
https://localhost:PORT/messages/images?messageId=...
instead of qrc:/messages/images?messageId=...