Skip to content
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

Assertion failed is<HTML::Window>(global_object) on NavigationTiming/PerformanceTiming.cpp:30 on web.whatsapp.com #3840

Open
1 task
teaalltr opened this issue Mar 6, 2025 · 5 comments

Comments

@teaalltr
Copy link

teaalltr commented Mar 6, 2025

Summary

This shows up when trying to load web.whatsapp.com, it's an assertion failed is<HTML::Window>(global_object).

I'm able to reproduce it multiple times, doing the procedure below

Operating system

Linux

Steps to reproduce

  1. Go to web.whatsapp.com (from ladybird command line, ./Meta/ladybird.sh run ladybird https://web.whatsapp.com/
  2. It starts loading the QR code page
  3. But it can't

Expected behavior

Page should load :-P

Actual behavior

Page not load

URL for a reduced test case

None

HTML/SVG/etc. source for a reduced test case

None

Log output and (if possible) backtrace

2404.381 WebContent(28867): FIXME: Unimplemented IDL interface: 'IDBFactoryPrototype.databases'
2404.384 WebContent(28867): FIXME: Unimplemented IDL interface: 'IDBFactoryPrototype.databases'
2404.528 WebContent(28867): FIXME: Unimplemented IDL interface: 'IDBTransactionPrototype.db'
2404.821 WebContent(28867): FIXME: Unimplemented IDL interface: 'ServiceWorkerContainerPrototype.controller'
2404.821 WebContent(28867): FIXME: Unimplemented IDL interface: 'ServiceWorkerContainerPrototype.controller'
2404.878 WebContent(28867): FIXME: Unimplemented IDL interface: 'ServiceWorkerContainerPrototype.controller'
2405.959 WebContent(28867): FIXME: InlineFormattingContext::dimension_box_on_line got unexpected box in inline context:
2405.959 WebContent(28867): Label <label.x17fgdl5.x1f6kntn.xt0psk2> (not painted) children: inline
  TextNode <#text>

2405.959 WebContent(28867): FIXME: InlineFormattingContext::dimension_box_on_line got unexpected box in inline context:
2405.959 WebContent(28867): Label <label.x17fgdl5.x1f6kntn.xt0psk2> (not painted) children: inline
  TextNode <#text>

2405.960 WebContent(28867): FIXME: InlineFormattingContext::dimension_box_on_line got unexpected box in inline context:
2405.960 WebContent(28867): Label <label.x17fgdl5.x1f6kntn.xt0psk2> (not painted) children: inline
  TextNode <#text>

2405.961 WebContent(28867): FIXME: InlineFormattingContext::dimension_box_on_line got unexpected box in inline context:
2405.961 WebContent(28867): Label <label.x17fgdl5.x1f6kntn.xt0psk2> (not painted) children: inline
  TextNode <#text>

2406.073 WebContent(28867): FIXME: InlineFormattingContext::dimension_box_on_line got unexpected box in inline context:
2406.073 WebContent(28867): Label <label.x17fgdl5.x1f6kntn.xt0psk2> at (1487.71875,737.015625) content-size 0x0 [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: inline
  TextNode <#text>

2406.073 WebContent(28867): FIXME: InlineFormattingContext::dimension_box_on_line got unexpected box in inline context:
2406.073 WebContent(28867): Label <label.x17fgdl5.x1f6kntn.xt0psk2> at (1487.71875,737.015625) content-size 0x0 [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: inline
  TextNode <#text>

2406.073 WebContent(28867): FIXME: InlineFormattingContext::dimension_box_on_line got unexpected box in inline context:
2406.073 WebContent(28867): Label <label.x17fgdl5.x1f6kntn.xt0psk2> at (1487.71875,737.015625) content-size 0x0 [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: inline
  TextNode <#text>

2406.075 WebContent(28867): FIXME: InlineFormattingContext::dimension_box_on_line got unexpected box in inline context:
2406.075 WebContent(28867): Label <label.x17fgdl5.x1f6kntn.xt0psk2> at (1487.71875,737.015625) content-size 0x0 [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: inline
  TextNode <#text>

2406.107 WebContent(28867): FIXME: InlineFormattingContext::dimension_box_on_line got unexpected box in inline context:
2406.107 WebContent(28867): Label <label.x17fgdl5.x1f6kntn.xt0psk2> at (1487.71875,737.015625) content-size 0x0 [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: inline
  TextNode <#text>

2406.107 WebContent(28867): FIXME: InlineFormattingContext::dimension_box_on_line got unexpected box in inline context:
2406.107 WebContent(28867): Label <label.x17fgdl5.x1f6kntn.xt0psk2> at (1487.71875,737.015625) content-size 0x0 [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: inline
  TextNode <#text>

2406.107 WebContent(28867): FIXME: InlineFormattingContext::dimension_box_on_line got unexpected box in inline context:
2406.108 WebContent(28867): Label <label.x17fgdl5.x1f6kntn.xt0psk2> at (1487.71875,737.015625) content-size 0x0 [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: inline
  TextNode <#text>

2406.109 WebContent(28867): FIXME: InlineFormattingContext::dimension_box_on_line got unexpected box in inline context:
2406.109 WebContent(28867): Label <label.x17fgdl5.x1f6kntn.xt0psk2> at (1487.71875,737.015625) content-size 0x0 [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: inline
  TextNode <#text>

2406.204 WebContent(28867): FIXME: InlineFormattingContext::dimension_box_on_line got unexpected box in inline context:
2406.204 WebContent(28867): Label <label.x17fgdl5.x1f6kntn.xt0psk2> at (1487.71875,737.015625) content-size 0x0 [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: inline
  TextNode <#text>

2406.204 WebContent(28867): FIXME: InlineFormattingContext::dimension_box_on_line got unexpected box in inline context:
2406.204 WebContent(28867): Label <label.x17fgdl5.x1f6kntn.xt0psk2> at (1487.71875,737.015625) content-size 0x0 [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: inline
  TextNode <#text>

2406.204 WebContent(28867): FIXME: InlineFormattingContext::dimension_box_on_line got unexpected box in inline context:
2406.204 WebContent(28867): Label <label.x17fgdl5.x1f6kntn.xt0psk2> at (1487.71875,737.015625) content-size 0x0 [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: inline
  TextNode <#text>

2406.206 WebContent(28867): FIXME: InlineFormattingContext::dimension_box_on_line got unexpected box in inline context:
2406.206 WebContent(28867): Label <label.x17fgdl5.x1f6kntn.xt0psk2> at (1487.71875,737.015625) content-size 0x0 [0+0+0 0 0+0+0] [0+0+0 0 0+0+0] children: inline
  TextNode <#text>

VERIFICATION FAILED: is<HTML::Window>(global_object) at /home/marco/ladybird/Libraries/LibWeb/NavigationTiming/PerformanceTiming.cpp:30
/home/marco/ladybird/Build/release/lib/liblagom-ak.so.0(ak_trap+0x4d) [0x7a40edb020cd]
/home/marco/ladybird/Build/release/lib/liblagom-ak.so.0(ak_verification_failed+0x43) [0x7a40edb02063]
/home/marco/ladybird/Build/release/lib/liblagom-web.so.0 Web::NavigationTiming::PerformanceTiming::monotonic_timestamp_to_wall_time_milliseconds(AK::Function<double (Web::DOM::DocumentLoadTimingInfo const&)>) const 0x14c) [0x7a40eea8b2fc]
/home/marco/ladybird/Build/release/lib/liblagom-web.so.0 Web::Bindings::PerformanceTimingPrototype::navigation_start_getter(JS::VM&) 0x99) [0x7a40ef66f6b9]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::NativeFunction::call() 0x69) [0x7a40ed7b1b19]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::NativeFunction::internal_call(JS::Value, AK::Span<JS::Value const>) 0x264) [0x7a40ed7b29c4]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::Object::internal_get(JS::PropertyKey const&, JS::Value, JS::CacheablePropertyMetadata*, JS::Object::PropertyLookupPhase) const 0x276) [0x7a40ed7bb676]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::Object::internal_get(JS::PropertyKey const&, JS::Value, JS::CacheablePropertyMetadata*, JS::Object::PropertyLookupPhase) const 0xcf) [0x7a40ed7bb4cf]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0(+0x1c4557) [0x7a40ed5c4557]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::Bytecode::Op::GetById::execute_impl(JS::Bytecode::Interpreter&) const 0x63) [0x7a40ed5a9923]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::Bytecode::Interpreter::run_bytecode(unsigned long) 0x1909) [0x7a40ed5ab6c9]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::Bytecode::Interpreter::run_executable(JS::Bytecode::Executable&, AK::Optional<unsigned long>, JS::Value) 0x21c) [0x7a40ed5ae89c]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::ECMAScriptFunctionObject::ordinary_call_evaluate_body() 0xbc) [0x7a40ed6efa0c]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::ECMAScriptFunctionObject::internal_call(JS::Value, AK::Span<JS::Value const>) 0x145) [0x7a40ed6f0a25]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::Bytecode::Op::Call::execute_impl(JS::Bytecode::Interpreter&) const 0x21d) [0x7a40ed5a51ed]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::Bytecode::Interpreter::run_bytecode(unsigned long) 0x1f59) [0x7a40ed5abd19]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::Bytecode::Interpreter::run_executable(JS::Bytecode::Executable&, AK::Optional<unsigned long>, JS::Value) 0x21c) [0x7a40ed5ae89c]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::Bytecode::Interpreter::run(JS::Script&, GC::Ptr<JS::Environment>) 0x331) [0x7a40ed5aef11]
/home/marco/ladybird/Build/release/lib/liblagom-web.so.0 Web::HTML::ClassicScript::run(Web::HTML::ClassicScript::RethrowErrors, GC::Ptr<JS::Environment>) 0x189) [0x7a40ee90d669]
/home/marco/ladybird/Build/release/lib/liblagom-web.so.0 Web::HTML::WorkerGlobalScope::import_scripts(AK::Vector<AK::String, 0ul> const&, GC::Ptr<GC::Function<Web::WebIDL::ExceptionOr<void> (GC::Ref<Web::Fetch::Infrastructure::Request>, Web::HTML::TopLevelModule, AK::Function<void (GC::Ref<Web::Fetch::Infrastructure::Response>, AK::Variant<AK::Empty, Web::Fetch::Infrastructure::FetchAlgorithms::ConsumeBodyFailureTag, AK::Detail::ByteBuffer<32ul> >)>)> >) 0x200) [0x7a40ee9a90f0]
/home/marco/ladybird/Build/release/lib/liblagom-web.so.0 Web::Bindings::WorkerGlobalScopePrototype::import_scripts(JS::VM&) 0xa2) [0x7a40ef5c9d92]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::NativeFunction::call() 0x69) [0x7a40ed7b1b19]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::NativeFunction::internal_call(JS::Value, AK::Span<JS::Value const>) 0x264) [0x7a40ed7b29c4]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::Bytecode::Op::Call::execute_impl(JS::Bytecode::Interpreter&) const 0x21d) [0x7a40ed5a51ed]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::Bytecode::Interpreter::run_bytecode(unsigned long) 0x1f59) [0x7a40ed5abd19]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::Bytecode::Interpreter::run_executable(JS::Bytecode::Executable&, AK::Optional<unsigned long>, JS::Value) 0x21c) [0x7a40ed5ae89c]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::ECMAScriptFunctionObject::ordinary_call_evaluate_body() 0xbc) [0x7a40ed6efa0c]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::ECMAScriptFunctionObject::internal_call(JS::Value, AK::Span<JS::Value const>) 0x145) [0x7a40ed6f0a25]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::Bytecode::Op::Call::execute_impl(JS::Bytecode::Interpreter&) const 0x21d) [0x7a40ed5a51ed]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::Bytecode::Interpreter::run_bytecode(unsigned long) 0x1f59) [0x7a40ed5abd19]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::Bytecode::Interpreter::run_executable(JS::Bytecode::Executable&, AK::Optional<unsigned long>, JS::Value) 0x21c) [0x7a40ed5ae89c]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::ECMAScriptFunctionObject::ordinary_call_evaluate_body() 0xbc) [0x7a40ed6efa0c]
/home/marco/ladybird/Build/release/lib/liblagom-js.so.0 JS::ECMAScriptFunctionObject::internal_call(JS::Value, AK::Span<JS::Value const>) 0x145) [0x7a40ed6f0a25]
/home/marco/ladybird/Build/release/lib/liblagom-web.so.0 Web::WebIDL::call_user_object_operation(Web::WebIDL::CallbackType&, AK::String const&, AK::Optional<JS::Value>, GC::RootVector<JS::Value, 0ul>) 0xf2) [0x7a40eec1cad2]
/home/marco/ladybird/Build/release/lib/liblagom-web.so.0 JS::Completion Web::WebIDL::call_user_object_operation<Web::DOM::Event*&>(Web::WebIDL::CallbackType&, AK::String const&, AK::Optional<JS::Value>, Web::DOM::Event*&) 0x148) [0x7a40ee652768]
/home/marco/ladybird/Build/release/lib/liblagom-web.so.0 Web::DOM::EventDispatcher::inner_invoke(Web::DOM::Event&, AK::Vector<GC::Root<Web::DOM::DOMEventListener>, 0ul>&, Web::DOM::Event::Phase, bool, bool&) 0x1ea) [0x7a40ee6514ca]
/home/marco/ladybird/Build/release/lib/liblagom-web.so.0 Web::DOM::EventDispatcher::invoke(Web::DOM::Event::PathEntry&, Web::DOM::Event&, Web::DOM::Event::Phase, bool&) 0x150) [0x7a40ee651830]
/home/marco/ladybird/Build/release/lib/liblagom-web.so.0 Web::DOM::EventDispatcher::dispatch(GC::Ref<Web::DOM::EventTarget>, Web::DOM::Event&, bool, bool&) 0xa30) [0x7a40ee652550]
/home/marco/ladybird/Build/release/lib/liblagom-web.so.0 Web::DOM::EventDispatcher::dispatch(GC::Ref<Web::DOM::EventTarget>, Web::DOM::Event&, bool) 0x23) [0x7a40ee652603]
/home/marco/ladybird/Build/release/lib/liblagom-web.so.0 Web::HTML::MessagePort::post_message_task_steps(Web::HTML::SerializedTransferRecord&) 0x18d) [0x7a40ee8a13dd]
/home/marco/ladybird/Build/release/lib/liblagom-web.so.0 Web::HTML::Task::execute() 0x49) [0x7a40ee7c0af9]
/home/marco/ladybird/Build/release/lib/liblagom-web.so.0(+0xbbf5ad) [0x7a40ee7bf5ad]
/home/marco/ladybird/Build/release/lib/liblagom-web.so.0(+0xef63ba) [0x7a40eeaf63ba]
/home/marco/ladybird/Build/release/lib/liblagom-core.so.0 Core::Timer::timer_event(Core::TimerEvent&) 0xb2) [0x7a40efef5ed2]
/home/marco/ladybird/Build/release/lib/liblagom-core.so.0 Core::EventReceiver::dispatch_event(Core::Event&, Core::EventReceiver*) 0x51) [0x7a40efeea941]
/home/marco/ladybird/Build/release/lib/liblagom-webview.so.0(+0x108e70) [0x7a40f0715e70]
/lib/x86_64-linux-gnu/libQt6Core.so.6(+0x1ba5c4) [0x7a40f01ba5c4]
/lib/x86_64-linux-gnu/libQt6Core.so.6 QTimer::timeout(QTimer::QPrivateSignal) 0x3d) [0x7a40f01bde7d]
/lib/x86_64-linux-gnu/libQt6Core.so.6 QObject::event(QEvent*) 0x1b9) [0x7a40f01a3919]
/lib/x86_64-linux-gnu/libQt6Core.so.6 QCoreApplication::notifyInternal2(QObject*, QEvent*) 0xee) [0x7a40f01666ee]
/lib/x86_64-linux-gnu/libQt6Core.so.6 QTimerInfoList::activateTimers() 0x4e6) [0x7a40f02b53a6]
/lib/x86_64-linux-gnu/libQt6Core.so.6(+0x374a81) [0x7a40f0374a81]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x5f397) [0x7a40ed310397]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0xbfdc7) [0x7a40ed370dc7]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x33) [0x7a40ed30f8b3]
/lib/x86_64-linux-gnu/libQt6Core.so.6 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) 0x73) [0x7a40f0373253]
/lib/x86_64-linux-gnu/libQt6Core.so.6 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) 0x2db) [0x7a40f0170b5b]
/home/marco/ladybird/Build/release/lib/liblagom-core.so.0 Core::EventLoop::exec() 0x35) [0x7a40efee9795]
/home/marco/ladybird/Build/release/libexec/WebWorker(+0xbc8e) [0x5be27ac13c8e]
/home/marco/ladybird/Build/release/libexec/WebWorker(main+0x103) [0x5be27ac13473]
/lib/x86_64-linux-gnu/libc.so.6(+0x2a3b8) [0x7a40ecc2a3b8]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b) [0x7a40ecc2a47b]
/home/marco/ladybird/Build/release/libexec/WebWorker(+0xb5a5) [0x5be27ac135a5]

Screenshots or screen recordings

No response

Build flags or config settings

No response

Contribute a patch?

  • I’ll contribute a patch for this myself.
@ADKaster
Copy link
Member

ADKaster commented Mar 6, 2025

@teaalltr what user agent did you spoof as? It loads fine for me on master but gives me a "I hate your user agent" page:

Image

@tcl3
Copy link
Member

tcl3 commented Mar 6, 2025

@ADKaster It breaks for me when spoofing with any supported user agent. It breaks when trying to access PerformanceTiming::navigation_start() from inside a Worker because PerformanceTiming::document_load_timing_info() expects the current global object to be a Window.

@ADKaster
Copy link
Member

ADKaster commented Mar 6, 2025

. It breaks when trying to access PerformanceTiming::navigation_start() from inside a Worker

That should be impossible. it's only exposed on Window

// https://w3c.github.io/navigation-timing/#dom-performancetiming
[Exposed=Window]
interface PerformanceTiming {

@ADKaster
Copy link
Member

ADKaster commented Mar 6, 2025

Oh I see. their code probably checks if Performance.timing exists, and then uses it if it does.

    // https://w3c.github.io/navigation-timing/#extensions-to-the-performance-interface
    // Obsolete "Navigation Timing" extensions to the Performance interface
    [SameObject]
    readonly attribute PerformanceTiming timing;
    [SameObject]
    readonly attribute PerformanceNavigation navigation;

We expose timing unconditionally on Performance, but it and navigation should only be exposed on window

@teaalltr
Copy link
Author

teaalltr commented Mar 6, 2025

@teaalltr what user agent did you spoof as? It loads fine for me on master but gives me a "I hate your user agent" page:

Image

@ADKaster Chrome Linux

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

No branches or pull requests

3 participants