Recently, there's a bunch of networking issues, failing us some WPTs
For example, http://wpt.live/svg/linking/reftests/href-image-element.html fails with
Error: An unexpected network error occurred (status: 200 OK)
While attempting to load PNG. I have added a verification
diff --git a/Libraries/LibWeb/SVG/SVGImageElement.cpp b/Libraries/LibWeb/SVG/SVGImageElement.cpp
index a3f2d6d674..78d3f769d3 100644
--- a/Libraries/LibWeb/SVG/SVGImageElement.cpp
+++ b/Libraries/LibWeb/SVG/SVGImageElement.cpp
@@ -156,6 +156,7 @@ void SVGImageElement::fetch_the_document(URL::URL const& url)
[this] {
m_load_event_delayer.clear();
auto image_data = m_resource_request->image_data();
+ VERIFY(image_data);
if (image_data->is_animated() && image_data->frame_count() > 1) {
m_current_frame_index = 0;
m_animation_timer->set_interval(image_data->frame_duration(0));
that fails as
VERIFICATION FAILED: image_data at /Users/pavel/Develop/ladybird/Libraries/LibWeb/SVG/SVGImageElement.cpp:159
0 liblagom-ak.0.0.0.dylib 0x0000000100feb280 ak_trap + 56
1 liblagom-ak.0.0.0.dylib 0x0000000100feb594 ak_assertion_failed + 0
2 liblagom-web.0.0.0.dylib 0x0000000102e06d08 AK::Function<void ()>::CallableWrapper<Web::SVG::SVGImageElement::fetch_the_document(URL::URL const&)::$_0>::call() + 312
3 liblagom-web.0.0.0.dylib 0x00000001028b8d64 AK::Function<void (AK::Span<unsigned char>)>::operator()(AK::Span<unsigned char>) const + 76
4 liblagom-web.0.0.0.dylib 0x0000000102c9d328 AK::Function<AK::ErrorOr<void, AK::Error> (Web::Platform::DecodedImage&)>::CallableWrapper<Web::HTML::SharedResourceRequest::handle_successful_fetch(URL::URL const&, AK::StringView, AK::Detail::ByteBuffer<32ul>)::$_0>::call(Web::Platform::DecodedImage&) + 544
5 liblagom-webview.0.0.0.dylib 0x0000000100abc610 AK::Function<AK::ErrorOr<void, AK::Error> (Web::Platform::DecodedImage&)>::operator()(Web::Platform::DecodedImage&) const + 76
6 liblagom-webview.0.0.0.dylib 0x0000000100ac3950 Core::Promise<Web::Platform::DecodedImage, AK::Error>::resolve(Web::Platform::DecodedImage&&) + 544
7 liblagom-webview.0.0.0.dylib 0x0000000100ac342c AK::Function<AK::ErrorOr<void, AK::Error> (ImageDecoderClient::DecodedImage&)>::CallableWrapper<WebView::ImageCodecPlugin::decode_image(AK::Span<unsigned char const>, AK::Function<AK::ErrorOr<void, AK::Error> (Web::Platform::DecodedImage&)>, AK::Function<void (AK::Error&)>)::$_0>::call(ImageDecoderClient::DecodedImage&) + 204
8 liblagom-imagedecoderclient.0.0.0.d 0x0000000100957fe4 AK::Function<AK::ErrorOr<void, AK::Error> (ImageDecoderClient::DecodedImage&)>::operator()(ImageDecoderClient::DecodedImage&) const + 76
9 liblagom-imagedecoderclient.0.0.0.d 0x0000000100955694 Core::Promise<ImageDecoderClient::DecodedImage, AK::Error>::resolve(ImageDecoderClient::DecodedImage&&) + 544
10 liblagom-imagedecoderclient.0.0.0.d 0x00000001009550c0 ImageDecoderClient::Client::did_decode_image(long long, bool, unsigned int, Gfx::BitmapSequence const&, AK::Vector<unsigned int, 0ul> const&, Gfx::Point<float>, Gfx::ColorSpace const&) + 336
11 liblagom-imagedecoderclient.0.0.0.d 0x0000000100955ae0 ImageDecoderClientStub::handle(IPC::Message const&) + 104
12 liblagom-ipc.0.0.0.dylib 0x0000000100a23e7c IPC::ConnectionBase::handle_messages() + 224
13 liblagom-ipc.0.0.0.dylib 0x0000000100a253c8 AK::Function<void ()>::CallableWrapper<IPC::ConnectionBase::ConnectionBase(IPC::Stub&, IPC::TransportSocket, unsigned int)::$_1>::call() + 92
14 liblagom-core.0.0.0.dylib 0x0000000100cd8024 AK::Function<void (AK::Error&)>::operator()(AK::Error&) const + 76
15 liblagom-core.0.0.0.dylib 0x0000000100cd8024 AK::Function<void (AK::Error&)>::operator()(AK::Error&) const + 76
16 liblagom-core.0.0.0.dylib 0x0000000100cd7564 Core::EventReceiver::dispatch_event(Core::Event&, Core::EventReceiver*) + 112
17 liblagom-core.0.0.0.dylib 0x0000000100ce8078 Core::ThreadEventQueue::process() + 400
18 liblagom-core.0.0.0.dylib 0x0000000100cd523c Core::EventLoop::spin_until(AK::Function<bool ()>) + 116
19 liblagom-web.0.0.0.dylib 0x0000000102dc1edc Web::Platform::EventLoopPluginSerenity::spin_until(GC::Root<GC::Function<bool ()>>) + 116
20 liblagom-web.0.0.0.dylib 0x0000000102b9c4b8 Web::HTML::EventLoop::spin_until(GC::Ref<GC::Function<bool ()>>) + 360
21 liblagom-web.0.0.0.dylib 0x0000000102c55b94 Web::HTML::HTMLParser::the_end(GC::Ref<Web::DOM::Document>, GC::Ptr<Web::HTML::HTMLParser>) + 992
22 liblagom-web.0.0.0.dylib 0x0000000102c556b8 Web::HTML::HTMLParser::run(URL::URL const&, Web::HTML::HTMLTokenizer::StopAtInsertionPoint) + 244
23 liblagom-web.0.0.0.dylib 0x0000000102aaa160 AK::Function<void ()>::CallableWrapper<Web::load_html_document(Web::HTML::NavigationParams const&)::$_0::operator()(AK::Detail::ByteBuffer<32ul>) const::'lambda'()>::call() + 128
24 liblagom-web.0.0.0.dylib 0x00000001028b8d64 AK::Function<void (AK::Span<unsigned char>)>::operator()(AK::Span<unsigned char>) const + 76
25 liblagom-core.0.0.0.dylib 0x0000000100cd8024 AK::Function<void (AK::Error&)>::operator()(AK::Error&) const + 76
26 liblagom-core.0.0.0.dylib 0x0000000100ce8030 Core::ThreadEventQueue::process() + 328
27 liblagom-core.0.0.0.dylib 0x0000000100cebda4 Core::EventLoopImplementationUnix::exec() + 44
28 liblagom-core.0.0.0.dylib 0x0000000100cd50dc Core::EventLoop::exec() + 72
29 WebContent 0x000000010073daec serenity_main(Main::Arguments) + 4292
30 WebContent 0x00000001007da7cc main + 196
Returning null pointer on successful data retrieval doesn't look good, and failed data retrieval is supposed to run on_fail callback, that never happens.
As discussed yesterday at #testing on Discord, the problem of the same kind occurs on https://wpt.live//css/css-images/object-fit-scale-down-png-001e.html , that prevented @InvalidUsernameException from running this WPT on wpt.live
The problem is reproducible at least on two machines, and it seems to sometimes happen on WPT runner as well
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too