Closed Bug 1838152 Opened 1 year ago Closed 2 months ago

Improve error message when sending session.new without capabilities

Categories

(Remote Protocol :: WebDriver BiDi, defect, P3)

defect

Tracking

(firefox126 fixed)

RESOLVED FIXED
126 Branch
Tracking Status
firefox126 --- fixed

People

(Reporter: jdescottes, Assigned: gravyant, Mentored)

References

Details

(Whiteboard: [lang=js][webdriver:m11:external][webdriver:relnote])

Attachments

(1 file, 1 obsolete file)

I was using the client to connect to bidi at https://juliandescottes.github.io/bidi-web-client/web/ , and I usually just send an empty session.new command to create the session, but this now fails with a cryptic error message:

Expected [object Undefined] undefined to be an object

We should add a custom message on the following assert so that users know that the issue is a missing capabilities parameter perhaps?

export function processCapabilities(params) {
  const { capabilities } = params;
  lazy.assert.object(capabilities);

Sasha: just a quick ping for you to check if this bug is valid?

Flags: needinfo?(aborovova)

Yeah, I agree, adding the custom message here would be better for the users.

Flags: needinfo?(aborovova)
Mentor: aborovova
Severity: -- → S3
Priority: -- → P3
Whiteboard: [lang=js]

Hi! Is it possible for me to use git to solve this? or should I use hg & phabricator?

(In reply to Nagendra from comment #2)

Hi! Is it possible for me to use git to solve this? or should I use hg & phabricator?

Hi! Yes, you can use git, but you still have to submit the changes to phabricator. I use myself git while working locally (to commit, to create branches, etc.) and then I use moz-phab to submit to phabricator. There is a lot of information here which might be useful, but let me know if you have any specific question.

for the previous bug fix, I used
$ wget https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py
$ python3 bootstrap.py
to Setup Firefox On Windows

and 'hg commit' to commit.

Now to use git, Do I have to use 'git clone' or can I directly use

git init
git add .
git commit

to the above setup of Firefox?

Oh, right, sorry, I did it a while ago and completely forgot that for git you need to install git-cinnabar. You can see here: https://firefox-source-docs.mozilla.org/mobile/android/geckoview/contributor/mc-quick-start.html#git-cinnabar how to do it, and then it has instructions how to set up firefox repo.

@Nagendra, btw, are you on Element/Matrix? We have a webdriver room.
There we can help you a bit faster with the questions.

(In reply to Nagendra from comment #4)

Now to use git, Do I have to use 'git clone' or can I directly use

As Sasha already said please join us in Matrix if possible. Otherwise a quick answer here... you should best clone it again with git cinnabar in use so that the changeset ids are correctly converted for the use of phabricator.

Assignee: nobody → gravyant

I’m a new contributor, and I’ll submit a patch for this bug shortly.

Thanks a lot and a warm welcome! Let us know when there are any questions. You can get in contact with us here or directly in the #webdriver Matrix channel.

Hello, which tests, if any should I run?

Flags: needinfo?(aborovova)

Hi @gravyant! Welcome!
I'd say it would be good to run the following wpt tests:

  • testing/web-platform/mozilla/tests/webdriver/bidi/session/new/
  • testing/web-platform/mozilla/tests/webdriver/classic/new_session/
  • testing/web-platform/tests/webdriver/tests/bidi/session/new/
  • testing/web-platform/tests/webdriver/tests/classic/new_session/
Flags: needinfo?(aborovova)
Pushed by aborovova@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ad20d7ff718b
Improve error message when sending session.new without capabilities. r=Sasha,webdriver-reviewers

Hey, @gravyant, thanks for the contribution!
If you're interested in doing more, we have a few other bugs which would require programming with JS (let me know if you'd like to program in other languages as well): https://codetribute.mozilla.org/languages/javascript?sortBy%3DProject%26sortDirection%3Ddesc%26project%3DWebDriver%2520BiDi. I can suggest for example this bug.
Let me know if you have any questions.

Absolutely, I think that's a great next bug!

Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch
Whiteboard: [lang=js] → [lang=js][webdriver:m11:external]
Whiteboard: [lang=js][webdriver:m11:external] → [lang=js][webdriver:m11:external][webdriver:relnote]
Attachment #9395652 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: