-
Notifications
You must be signed in to change notification settings - Fork 6k
[web] Catch image load failures in --release builds #25602
Conversation
| const MethodCodec codec = JSONMethodCodec(); | ||
| final String message = 'Error while trying to load an asset $url'; | ||
| if (!assertionsEnabled) { | ||
| /// For web/release mode log the load failure on console. |
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.
Why is this necessary? Shouldn't the _replyToPlatformMessage(...) call below be enough to log the failure?
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.
Why is this necessary? Shouldn't the
_replyToPlatformMessage(...)call below be enough to log the failure?
Otherwise for release builds user gets no indication of failure at all. The error reported by replyToPlatformMessage is silent in release mode.
harryterkelsen
left a comment
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.
LGTM with nit
…25602)" (flutter#26073) This reverts commit 304ee81.
When server returns html doc for asset request, instead of failing asset load, the engine was detecting failure much later during decoding.
This PR:
flutter/flutter#74935
Pre-launch Checklist
writing and running engine tests.
///).