Skip to content

get_events (aka. allEvents.events) of WebDriver test throws exception #36890

Closed

Description

@yezhizhen

Describe the bug:

0:07.58 pid:21980 [2025-05-07T02:59:37Z DEBUG webdriver::server] -> POST /session/bf5650a5-e65c-4738-81b1-f21b71f352cb/execute/sync {"script": "return allEvents.events;", "args": []}
 0:07.58 pid:21980 [2025-05-07T02:59:37Z INFO  webdriver_server] ExecuteScript(JavascriptCommandParameters { script: "return allEvents.events;", args: Some([]) })
 0:07.58 pid:21980 [2025-05-07T02:59:37Z DEBUG webdriver_server] (function() { return allEvents.events;
 0:07.58 pid:21980      })()
 0:07.58 pid:21980 [2025-05-07T02:59:37Z DEBUG webdriver::server] <- 500 Internal Server Error {"value":{"error":"javascript error","message":"JS evaluation raised an unknown exception","stacktrace":""}}

To Reproduce:
./mach test-wpt --product servodriver -r tests\wpt\tests\webdriver\tests\classic\element_click\events.py

Platform:
Linux/Windows

cc @xiaochengh @longvatrong111 @PotatoCP

Activity

  1. added
    C-untriaged
    on May 7, 2025
  2. yezhizhen commented on May 7, 2025

    @yezhizhen
    MemberAuthor

    Probably some regression, as don't have this problem a few weeks ago.

  3. yezhizhen commented on May 7, 2025

    @yezhizhen
    MemberAuthor

    @servo-highfive assign me

  4. added
    C-assigned
    on May 7, 2025
  5. servo-highfive commented on May 7, 2025

    @servo-highfive

    Hey @yezhizhen! Thanks for your interest in working on this issue. It's now assigned to you!

  6. added and removed
    C-untriaged
    on May 7, 2025
  7. yezhizhen commented on May 7, 2025

    @yezhizhen
    MemberAuthor

    Latest update: error is due to seen introduced in #27041 (review)

    Image

    According to spec, seen should only be used against Object. But in above test image, first row mousemove button, the button and buttons name have the same property: primitive type 0, which causes the error.


    Another thing is we need to

    Remove the last element of seen

    according to step 5, for the sake of backtracking. Otherwise, "cycle" may be flagged when it should not be. This is not really related to this issue tho.

    Therefore I am thinking about a PR "rework script::webdriver_handlers::jsval_to_webdriver_inner to avoid false-positive cycle error"

    cc @jdm

  8. jdm commented on May 7, 2025

    @jdm
    Member

    Yep, my mistake! Happy to review a fix.

  9. yezhizhen commented on May 7, 2025

    @yezhizhen
    MemberAuthor

    I reviewed that one so I also share the mistake!🤣
    Will work in this direction then.

  10. added a commit that references this issue on May 8, 2025
    f58b0c6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testingC-assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions