Open Bug 1742357 Opened 4 years ago Updated 5 months ago

geckodriver inappropriately returns "HTTP method not allowed" for not yet implemented commands

Categories

(Testing :: geckodriver, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: whimboo, Unassigned)

References

()

Details

Originally reported as: https://github.com/mozilla/geckodriver/issues/1962

Running a geckodriver command that is not handled yet a HTTP method not allowed is returned instead of HTTP unknown command.

Interesting is that I cannot see that UnknownMethod is used at all in the Rust code:

https://searchfox.org/mozilla-central/search?q=UnknownMethod&path=testing%2F&case=false&regexp=false

It would be good to get a wdspec test added for error types that we don't have yet.

All the tests for get_computed_label and get_computed_role also fail with not allowed even we don't have some implemented yet. Making that change for geckodriver might also change the error output. As such marking both of them being blocked.

Blocks: 1744927, 1744929

geckodriver uses the Warp crate to handle all the HTTP requests. And as it looks like this problem is known and covered by:

https://github.com/seanmonstar/warp/issues/77

James, do you see a way to get this fixed with a workaround until Warp allows more customization or better handling of 404?

Flags: needinfo?(james)

Quickly discussed with James on Element but we don't see right now how to workaround. Also it's not severe enough to give it priority at the moment. Best might be to wait for a fix in warp.

I spent a bit of time looking at this, and it at least wasn't obvious how to get it working. It seems like you ought to be able to register a route that handles any request that didn't otherwise match, and set the error code in that. But I kept running into type errors which suggested that my approach wasn't quite right. In any case gettting the error code wrong here seems like it's unlikely to have a huge impact on users.

Flags: needinfo?(james)
No longer blocks: 1744927

I am getting 'method not allowed' a lot after the introduction of the built-in free VPN. Eg here They are always http addresses, not offering https. If I disable VPN these sites work.

149.0.2 Flatpak on Debian

(In reply to meso5 from comment #11)

I am getting 'method not allowed' a lot after the introduction of the built-in free VPN. Eg here They are always http addresses, not offering https. If I disable VPN these sites work.

Are you talking about the new built-in VPN feature only or in combination with geckodriver? If it's only for the former this is the wrong bug for it, and you most likely want to file a new bug.

(In reply to Henrik Skupin [:whimboo][⌚️UTC+2] from comment #12)

Are you talking about the new built-in VPN feature only or in combination with geckodriver? If it's only for the former this is the wrong bug for it, and you most likely want to file a new bug.

Not sure if it's in combination with geckodriver so I reported it as separate bug.

You need to log in before you can comment on or make changes to this bug.