[meta] Support WebDriver BiDi in Cypress
Categories
(Remote Protocol :: Agent, task)
Tracking
(Not tracked)
People
(Reporter: ato, Unassigned)
References
(Blocks 2 open bugs, )
Details
(Keywords: meta)
Attachments
(1 file)
248.22 KB,
text/plain
|
Details |
Tracking bug for Cypress related issues with Firefox.
Reporter | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Does Cypress really depend on Puppeteer or does it make direct use of the Chrome dev-tools protocol? I only see references to CDP when checking the repository, but nothing about Puppeteer.
Comment 2•5 years ago
|
||
As James seconded on IRC it is using CDP directly.
Comment 3•5 years ago
|
||
Current commands in use seem to be:
Methods:
- Browser.getVersion (supported)
- Page.bringToFront (supported)
- Page.captureScreenshot (supported - clip option soon via bug 1587845)
- Page.navigate (supported but there are issues with early returning - see bug 1603776)
- Page.startScreencast (not supported)
Events:
- Page.screencastFrame (not supported)
Reporter | ||
Comment 4•5 years ago
|
||
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+1] from comment #2)
As James seconded on IRC it is using CDP directly.
Not only that, Cypress uses CDP through chrome-remote-interface, which we are fortunate enough to use for our browser-chrome testing! 👏🏻
Comment 5•5 years ago
|
||
Cypress also uses some Network.* commands to manage cookies: https://github.com/cypress-io/cypress/blob/develop/packages/server/lib/browsers/cdp_automation.ts
- Network.setCookie bug 1588114
- Network.deleteCookies bug 1549453
- Network.getAllCookies - there does not seem to be an open bug for this
- Network.getCookies bug 1549458
Comment 6•5 years ago
|
||
It also uses Emulation.setDeviceMetricsOverride
to provide a consistent viewport size in some of the tests:
Comment 7•5 years ago
|
||
(In reply to Zach Bloomquist from comment #5)
- Network.getAllCookies - there does not seem to be an open bug for this
Is that a new feature? I wonder why it isn't listed under https://chromedevtools.github.io/devtools-protocol/tot/Network. Maybe they missed to add it?
Comment 8•5 years ago
|
||
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+1] from comment #7)
(In reply to Zach Bloomquist from comment #5)
- Network.getAllCookies - there does not seem to be an open bug for this
Is that a new feature? I wonder why it isn't listed under https://chromedevtools.github.io/devtools-protocol/tot/Network. Maybe they missed to add it?
What version of the API are you looking at? I see it in the docs for 1.3 and latest
: https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-getAllCookies
Reporter | ||
Comment 9•5 years ago
|
||
Network.getAllCookies
is a new feature as of 13th December of this year, introduced by 9349e8fc
.
I made a similar comments with some more details on the review for bug 1590098 implementing Network.getCookies
yesterday.
Comment 10•5 years ago
|
||
(In reply to Andreas Tolfsen 「:ato」 from comment #9)
Network.getAllCookies
is a new feature as of 13th December of this year, introduced by9349e8fc
.
Hmm, that commit seems to say Tue Dec 13 17:12:37 2016, not Tue Dec 13 17:12:37 2019. I am not sure what exact release it was introduced in Chrome, but we've been using it in Cypress for at least a few months with no complaints from users (users use their Chrome version of choice)
Reporter | ||
Comment 11•5 years ago
|
||
Oops, years are apparently easy to misread (-:
Comment 12•5 years ago
|
||
Zach, which specific features of Emulation.setDeviceMetricsOverride
is in use by Cypress? Could you check if the current Firefox Nightly build contains everything with bug 1544417 fixed? Thanks
Comment 13•5 years ago
|
||
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+1] from comment #12)
Zach, which specific features of
Emulation.setDeviceMetricsOverride
is in use by Cypress? Could you check if the current Firefox Nightly build contains everything with bug 1544417 fixed? Thanks
It's used in 1 place, in Cypress's tests, here is how it's invoked:
Cypress uses width
, height
, deviceScaleFactor
, mobile
, screenWidth
, and screenHeight
. It looks like the first three of those are implemented, and the last two (screenHeight
and screenWidth
) actually seem to be redundant, so we don't need those for now.
mobile
isn't implemented in FF yet, but we set it to false
anyways, so that's fine too. Interestingly though, if I omit mobile
from the arguments, Chrome responds with an error:
received CDP message { error: { code: -32602, message: 'Invalid parameters', data: 'mobile: boolean value expected' }, id: 6 } +12ms
Comment 14•5 years ago
|
||
Yes, it's not raising an error because we don't have the mobile
support yet. It will be added with bug 1608468.
Updated•2 years ago
|
Updated•3 months ago
|
Comment 15•3 months ago
|
||
Cypress is starting work to migrate Cypress' use of Firefox from CDP, marionette, and foxdriver over to Webdriver BiDi and geckodriver.
Today, Cypress uses an old fork of the marionette client that is responsible for a few WebDriver Classic methods and to install Cypress' web extension.
Right now Cypress' web extension in Firefox is responsible for a few things, such as:
- listening for download events
- attaching Cypress specific automation headers to the support the
cy.origin()
command - Automating cookie operations (normally handled by CDP in chromium based browsers)
- Clearing browser state between tests
- Taking screenshots for failures or for
cy.screenshot()
Currently, this is a temporary unsigned extension, which makes sense for us as we are automating the browser and it makes the extension easier to develop without signing it for open source users, as they would need the signing keys. It currently isn't possible to register an unsigned extension through the -install-global-extension argument.
Talking with Henrik, it looks like the Marionette JavaScript client is not supported, but geckodriver has commands that we can leverage to install a temporary web extension. I believe this uses the marionette protocol under the hood, which should work for now as the extensions responsibilities will be significantly less as we migrate more code over to BiDi, so this works as a good interim band-aid.
I have a small POC commit that uses wdio's wrapper around geckodriver to start up geckodriver and initialize a WebDriver session. From this, we can install our web extension and connect to the Webdriver BiDi socket and stream subscribed BiDi events in.
I have created a mapping spreadsheet of the CDP, web APIs, and replacement BiDi methods that Cypress will likely be migrating to. Everyone should be able to view this but if anyone needs comment/edit access let me know!
Im currently using these for documentation:
Are there other resources I should be leveraging? I am also curious if it is possible to clone the geckodriver code as I haven't used mozilla-central before.
The big proving replacement work is in the POC commit . I will start the cutover process and will comment and findings or issues I run into as I am quite early on in my migration journey.
Comment 16•3 months ago
|
||
Do we know what parts of the BiDi specification landed in which Firefox versions? The main reason I ask is Cypress currently supports back to Firefox 86. I'm assuming the spec was introduced over time between then and the current 130 version. We can increase the version of our minimum support but it does promote a breaking change.
With that in mind, I believe the current plan is to completely remove CDP from firefox by the end of 2024. Is this still correct? Is there an approximate date for removal?
Comment 17•3 months ago
|
||
Hi William,
First thank you for moving our conversation to Bugzilla which will help us to better track the required work on our side to support Cypress in moving away from CDP by using WebDriver BiDi in the future. It's great to see your interest!
(In reply to William Glesias from comment #15)
Right now Cypress' web extension in Firefox is responsible for a few things, such as:
- listening for download events
- attaching Cypress specific automation headers to the support the
cy.origin()
command- Automating cookie operations (normally handled by CDP in chromium based browsers)
- Clearing browser state between tests
- Taking screenshots for failures or for
cy.screenshot()
Except for download events and and fully clearing the browser state (without a profile reset I assume) all the other features should be fully available in our WebDriver BiDi implementation. That means that those might be a good start. If one of these features doesn't work as expected please let us know and we will fix or have to extend the WebDriver BiDi specification.
Talking with Henrik, it looks like the Marionette JavaScript client is not supported, but geckodriver has commands that we can leverage to install a temporary web extension. I believe this uses the marionette protocol under the hood, which should work for now as the extensions responsibilities will be significantly less as we migrate more code over to BiDi, so this works as a good interim band-aid.
It’s interesting to see that the JS client from the old B2G project is still in use for Marionette. I just wanted to mention that since then, a lot has changed in Marionette’s server implementation, so certain features might not be available in your client version, depending on when the fork happened. But all that could be irrelevant if the features you need are supported.
I have a small POC commit that uses wdio's wrapper around geckodriver to start up geckodriver and initialize a WebDriver session. From this, we can install our web extension and connect to the Webdriver BiDi socket and stream subscribed BiDi events in.
That sounds actually great and it looks like you can at least easily switch over to geckodriver. When you are mentioning WebDriver IO you most likely also noticed that it has support for WebDriver BiDi included and gets regularly updated for the recent changes in the specification.
I have created a mapping spreadsheet of the CDP, web APIs, and replacement BiDi methods that Cypress will likely be migrating to. Everyone should be able to view this but if anyone needs comment/edit access let me know!
Thanks a lot! This is a great starting point. I’ll go through each of these items and let you know if anything is unclear or missing. Once we have a clear understanding of what still needs to be added to the specification and implemented in Firefox, we can update the bug with a checklist of features.
Im currently using these for documentation:
Are there other resources I should be leveraging?
More documentation can be found at these locations:
- https://firefox-source-docs.mozilla.org/testing/geckodriver/index.html
- https://firefox-source-docs.mozilla.org/remote/index.html
- https://webdriver.io/de/blog/2023/06/08/bidi-typescript-support/
There are others as well and we can share once certain help is needed.
I am also curious if it is possible to clone the geckodriver code as I haven't used mozilla-central before.
We have a github fork of geckodriver at https://github.com/mozilla/geckodriver/ but it's only used for publishing releases. If you want to stay on the latest changes or once in a while contribute a patch you would have to clone the central or unified repository. You can use git as well by utilizing git-cinnabar
for the moment.
The big proving replacement work is in the POC commit . I will start the cutover process and will comment and findings or issues I run into as I am quite early on in my migration journey.
Thank you! And whenever there are issues please reach out to us so that we can early find solutions and work on enhancements. Best here would be to join our Matrix channel at https://chat.mozilla.org/#/room/#webdriver:mozilla.org.
(In reply to William Glesias from comment #16)
Do we know what parts of the BiDi specification landed in which Firefox versions? The main reason I ask is Cypress currently supports back to Firefox 86. I'm assuming the spec was introduced over time between then and the current 130 version. We can increase the version of our minimum support but it does promote a breaking change.
Yes that's what we track in this Google spreadsheet at the moment. Our plan is to bring this information to MDN as well so that for certain APIs and arguments you will have clear version numbers but this work hasn't started yet.
Also I want to note that Firefox 86 is not supported for a very long time, and it would be good to know why your compatibility matrix goes back that long. Those versions are vulnerable to certain security issues and should basically no longer be used. The oldest officially supported Firefox release is 115 ESR (extended release) and soon 128 ESR.
With that in mind, I believe the current plan is to completely remove CDP from firefox by the end of 2024. Is this still correct? Is there an approximate date for removal?
Yes, that's still correct. At this point, we don't have a concrete timeline, as it will also depend on the migration progress for consumers like yourself. If we encounter any issues with completion and need to extend support for a few weeks, that won't be a problem.
Updated•3 months ago
|
Comment 18•2 months ago
|
||
Comment 19•2 months ago
|
||
( looks like my log upload posted my comment in draft. sorry about that! Doesn't look like I can edit it. Would you mind deleting the contents? Here is the complete comment)
Hi Henrik,
Sorry for the delay on an update here. I've been pretty busy heads down trying to cut over the older b2g marionette client
over to geckodriver
.
The good news is it has mostly been successful! I have a draft pull request open that mostly works, using the geckodriver
package that wdio has to spin up the geckodriver process and then send our capabilities to start firefox.
That sounds actually great and it looks like you can at least easily switch over to geckodriver. When you are mentioning WebDriver IO you most likely also noticed that it has support for WebDriver BiDi included and gets regularly updated for the recent changes in the specification.
I do want to clarify that we are just using the geckodriver
package from wdio. I see that they have WebDriver BiDi support but we need to hook into the protocol ourselves to help automate the browser, which should not be too difficult at least from my experience so far, which is good!
Most things seem to work correctly, like arguments, and preferences, but I cannot seem to get environment variables to actually work. We are sending the env
capabilities, which looks correct looking at the documentation and source code.
What am I missing here? based on the geckodriver
debug logs everything looks to be forwarded as expected
geckodriver starts
Starting Geckodriver at /tmp/geckodriver with params: --host=127.0.0.1 --port=43323 --marionette-host=127.0.0.1 --marionette-port=42595 --websocket-port=33209 --profile-root=/home/atofstryker/snap/firefox/current/Cypress/firefox-stable/run-47207 --binary=firefox --jsdebugger --log=debug --log-no-truncate +0ms
We send our capabilities to geckodriver via the webdriver new session command. We can see the MOZ_REMOTE_SETTINGS_DEVTOOLS
, MOZ_HEADLESS_WIDTH
, and MOZ_HEADLESS_HEIGHT
env variables populated in the capabilities object (sorry for the large preferences object)
webdriver::server DEBUG -> POST /session {"capabilities":{"alwaysMatch":{"acceptInsecureCerts":true,"moz:firefoxOptions":{"binary":"firefox","args":["-new-instance","-start-debugger-server","-no-remote","-headless","-width","1280","-height","806"],"env":{"MOZ_REMOTE_SETTINGS_DEVTOOLS":"1","MOZ_HEADLESS_WIDTH":"1280","MOZ_HEADLESS_HEIGHT":"721"},"prefs":{"app.normandy.api_url":"","app.update.checkInstallTime":false,"app.update.disabledForTesting":true,"apz.content_response_timeout":60000,"browser.contentblocking.features.standard":"-tp,tpPrivate,cookieBehavior0,-cm,-fp","browser.dom.window.dump.enabled":true,"browser.newtabpage.activity-stream.feeds.section.topstories":false,"browser.newtabpage.enabled":false,"browser.pagethumbnails.capturing_disabled":true,"browser.safebrowsing.blockedURIs.enabled":false,"browser.safebrowsing.downloads.enabled":false,"browser.safebrowsing.malware.enabled":false,"browser.safebrowsing.passwords.enabled":false,"browser.safebrowsing.phishing.enabled":false,"browser.search.update":false,"browser.sessionstore.resume_from_crash":false,"browser.shell.checkDefaultBrowser":false,"browser.startup.homepage":"about:blank","browser.startup.homepage_override.mstone":"ignore","browser.startup.page":0,"browser.startup.couldRestoreSession.count":0,"browser.tabs.disableBackgroundZombification":false,"browser.tabs.warnOnCloseOtherTabs":false,"browser.tabs.warnOnOpen":false,"browser.uitour.enabled":false,"browser.urlbar.suggest.searches":false,"browser.usedOnWindows10.introURL":"","browser.warnOnQuit":false,"datareporting.healthreport.about.reportUrl":"","datareporting.healthreport.documentServerURI":"","datareporting.healthreport.logging.consoleEnabled":false,"datareporting.healthreport.service.enabled":false,"datareporting.healthreport.service.firstRun":false,"datareporting.healthreport.uploadEnabled":false,"datareporting.policy.dataSubmissionEnabled":false,"datareporting.policy.dataSubmissionPolicyAccepted":false,"datareporting.policy.dataSubmissionPolicyBypassNotification":true,"devtools.jsonview.enabled":false,"dom.disable_open_during_load":false,"dom.file.createInChild":true,"dom.ipc.reportProcessHangs":false,"dom.max_chrome_script_run_time":0,"dom.max_script_run_time":0,"extensions.autoDisableScopes":0,"extensions.enabledScopes":5,"extensions.getAddons.cache.enabled":false,"extensions.installDistroAddons":false,"extensions.screenshots.disabled":true,"extensions.update.enabled":false,"extensions.update.notifyUser":false,"extensions.webservice.discoverURL":"","focusmanager.testmode":true,"general.useragent.updates.enabled":false,"geo.provider.testing":true,"geo.wifi.scan":false,"hangmonitor.timeout":0,"javascript.options.showInConsole":true,"media.gmp-manager.updateEnabled":false,"network.cookie.cookieBehavior":0,"network.http.prompt-temp-redirect":false,"network.http.speculative-parallel-limit":0,"network.manage-offline-status":false,"network.sntp.pools":"","plugin.state.flash":0,"privacy.trackingprotection.enabled":false,"remote.active-protocols":2,"remote.enabled":true,"security.certerrors.mitm.priming.enabled":false,"security.fileuri.strict_origin_policy":false,"security.notification_enable_delay":0,"services.settings.server":"","signon.autofillForms":false,"signon.rememberSignons":false,"startup.homepage_welcome_url":"about:blank","startup.homepage_welcome_url.additional":"","toolkit.cosmeticAnimations.enabled":false,"toolkit.telemetry.server":"''","toolkit.startup.max_resumed_crashes":-1,"network.proxy.type":1,"devtools.debugger.remote-enabled":true,"devtools.debugger.remote-host":"127.0.0.1","devtools.debugger.prompt-connection":false,"devtools.chrome.enabled":true,"app.update.auto":false,"app.update.enabled":false,"browser.displayedE10SNotice":4,"browser.download.manager.showWhenStarting":false,"browser.EULA.override":true,"browser.EULA.3.accepted":true,"browser.link.open_external":2,"browser.link.open_newwindow":2,"browser.offline":false,"browser.reader.detectedFirstArticle":true,"browser.selfsupport.url":"","browser.tabs.warnOnClose":false,"devtools.errorconsole.enabled":true,"extensions.blocklist.enabled":false,"extensions.checkCompatibility.nightly":false,"extensions.logging.enabled":true,"javascript.enabled":true,"network.http.phishy-userpass-length":255,"offline-apps.allow_by_default":true,"prompts.tab_modal.enabled":false,"security.fileuri.origin_policy":3,"toolkit.networkmanager.disable":true,"toolkit.telemetry.prompted":2,"toolkit.telemetry.enabled":false,"toolkit.telemetry.rejected":true,"xpinstall.signatures.required":false,"xpinstall.whitelist.required":false,"browser.laterrun.enabled":false,"browser.newtab.url":"about:blank","dom.report_all_js_exceptions":true,"network.captive-portal-service.enabled":false,"security.csp.enable":false,"webdriver_accept_untrusted_certs":true,"webdriver_assume_untrusted_issuer":true,"toolkit.legacyUserProfileCustomizations.stylesheets":true,"browser.tabs.drawInTitlebar":false,"media.autoplay.default":0,"browser.safebrowsing.enabled":false,"media.getusermedia.browser.enabled":true,"media.navigator.permission.disabled":true,"dom.min_background_timeout_value":4,"dom.timeout.enable_budget_timer_throttling":false,"media.devices.insecure.enabled":true,"media.getusermedia.insecure.enabled":true,"browser.download.folderList":2,"browser.helperApps.neverAsk.saveToDisk":"application/andrew-inset,application/applixware,application/atom+xml,application/atomcat+xml,application/atomdeleted+xml,application/atomsvc+xml,application/atsc-dwd+xml,application/atsc-held+xml,application/atsc-rsat+xml,application/bdoc,application/calendar+xml,application/ccxml+xml,application/cdfx+xml,application/cdmi-capability,application/cdmi-container,application/cdmi-domain,application/cdmi-object,application/cdmi-queue,application/cu-seeme,application/dash+xml,application/davmount+xml,application/docbook+xml,application/dssc+der,application/dssc+xml,application/ecmascript,application/emma+xml,application/emotionml+xml,application/epub+zip,application/exi,application/fdt+xml,application/font-tdpfr,application/geo+json,application/gml+xml,application/gpx+xml,application/gxf,application/gzip,application/hjson,application/hyperstudio,application/inkml+xml,application/ipfix,application/its+xml,application/java-archive,application/java-serialized-object,application/java-vm,application/javascript,application/json,application/json5,application/jsonml+json,application/ld+json,application/lgr+xml,application/lost+xml,application/mac-binhex40,application/mac-compactpro,application/mads+xml,application/manifest+json,application/marc,application/marcxml+xml,application/mathematica,application/mathml+xml,application/mbox,application/mediaservercontrol+xml,application/metalink+xml,application/metalink4+xml,application/mets+xml,application/mmt-aei+xml,application/mmt-usd+xml,application/mods+xml,application/mp21,application/mp4,application/mrb-consumer+xml,application/mrb-publish+xml,application/msword,application/mxf,application/n-quads,application/n-triples,application/node,application/octet-stream,application/oda,application/oebps-package+xml,application/ogg,application/omdoc+xml,application/onenote,application/oxps,application/p2p-overlay+xml,application/patch-ops-error+xml,application/pdf,application/pgp-encrypted,application/pgp-signature,application/pics-rules,application/pkcs10,application/pkcs7-mime,application/pkcs7-signature,application/pkcs8,application/pkix-attr-cert,application/pkix-cert,application/pkix-crl,application/pkix-pkipath,application/pkixcmp,application/pls+xml,application/postscript,application/provenance+xml,application/prs.cww,application/pskc+xml,application/raml+yaml,application/rdf+xml,application/reginfo+xml,application/relax-ng-compact-syntax,application/resource-lists+xml,application/resource-lists-diff+xml,application/rls-services+xml,application/route-apd+xml,application/route-s-tsid+xml,application/route-usd+xml,application/rpki-ghostbusters,application/rpki-manifest,application/rpki-roa,application/rsd+xml,application/rss+xml,application/rtf,application/sbml+xml,application/scvp-cv-request,application/scvp-cv-response,application/scvp-vp-request,application/scvp-vp-response,application/sdp,application/senml+xml,application/sensml+xml,application/set-payment-initiation,application/set-registration-initiation,application/shf+xml,application/sieve,application/smil+xml,application/sparql-query,application/sparql-results+xml,application/srgs,application/srgs+xml,application/sru+xml,application/ssdl+xml,application/ssml+xml,application/swid+xml,application/tei+xml,application/thraud+xml,application/timestamped-data,application/toml,application/ttml+xml,application/ubjson,application/urc-ressheet+xml,application/urc-targetdesc+xml,application/vnd.1000minds.decision-model+xml,application/vnd.3gpp.pic-bw-large,application/vnd.3gpp.pic-bw-small,application/vnd.3gpp.pic-bw-var,application/vnd.3gpp2.tcap,application/vnd.3m.post-it-notes,application/vnd.accpac.simply.aso,application/vnd.accpac.simply.imp,application/vnd.acucobol,application/vnd.acucorp,application/vnd.adobe.air-application-installer-package+zip,application/vnd.adobe.formscentral.fcdt,application/vnd.adobe.fxp,application/vnd.adobe.xdp+xml,application/vnd.adobe.xfdf,application/vnd.ahead.space,application/vnd.airzip.filesecure.azf,application/vnd.airzip.filesecure.azs,application/vnd.amazon.ebook,application/vnd.americandynamics.acc,application/vnd.amiga.ami,application/vnd.android.package-archive,application/vnd.anser-web-certificate-issue-initiation,application/vnd.anser-web-funds-transfer-initiation,application/vnd.antix.game-component,application/vnd.apple.installer+xml,application/vnd.apple.keynote,application/vnd.apple.mpegurl,application/vnd.apple.numbers,application/vnd.apple.pages,application/vnd.apple.pkpass,application/vnd.aristanetworks.swi,application/vnd.astraea-software.iota,application/vnd.audiograph,application/vnd.balsamiq.bmml+xml,application/vnd.blueice.multipass,application/vnd.bmi,application/vnd.businessobjects,application/vnd.chemdraw+xml,application/vnd.chipnuts.karaoke-mmd,application/vnd.cinderella,application/vnd.citationstyles.style+xml,application/vnd.claymore,application/vnd.cloanto.rp9,application/vnd.clonk.c4group,application/vnd.cluetrust.cartomobile-config,application/vnd.cluetrust.cartomobile-config-pkg,application/vnd.commonspace,application/vnd.contact.cmsg,application/vnd.cosmocaller,application/vnd.crick.clicker,application/vnd.crick.clicker.keyboard,application/vnd.crick.clicker.palette,application/vnd.crick.clicker.template,application/vnd.crick.clicker.wordbank,application/vnd.criticaltools.wbs+xml,application/vnd.ctc-posml,application/vnd.cups-ppd,application/vnd.curl.car,application/vnd.curl.pcurl,application/vnd.dart,application/vnd.data-vision.rdz,application/vnd.dbf,application/vnd.dece.data,application/vnd.dece.ttml+xml,application/vnd.dece.unspecified,application/vnd.dece.zip,application/vnd.denovo.fcselayout-link,application/vnd.dna,application/vnd.dolby.mlp,application/vnd.dpgraph,application/vnd.dreamfactory,application/vnd.ds-keypoint,application/vnd.dvb.ait,application/vnd.dvb.service,application/vnd.dynageo,application/vnd.ecowin.chart,application/vnd.enliven,application/vnd.epson.esf,application/vnd.epson.msf,application/vnd.epson.quickanime,application/vnd.epson.salt,application/vnd.epson.ssf,application/vnd.eszigno3+xml,application/vnd.ezpix-album,application/vnd.ezpix-package,application/vnd.fdf,application/vnd.fdsn.mseed,application/vnd.fdsn.seed,application/vnd.flographit,application/vnd.fluxtime.clip,application/vnd.framemaker,application/vnd.frogans.fnc,application/vnd.frogans.ltf,application/vnd.fsc.weblaunch,application/vnd.fujitsu.oasys,application/vnd.fujitsu.oasys2,application/vnd.fujitsu.oasys3,application/vnd.fujitsu.oasysgp,application/vnd.fujitsu.oasysprs,application/vnd.fujixerox.ddd,application/vnd.fujixerox.docuworks,application/vnd.fujixerox.docuworks.binder,application/vnd.fuzzysheet,application/vnd.genomatix.tuxedo,application/vnd.geogebra.file,application/vnd.geogebra.tool,application/vnd.geometry-explorer,application/vnd.geonext,application/vnd.geoplan,application/vnd.geospace,application/vnd.gmx,application/vnd.google-apps.document,application/vnd.google-apps.presentation,application/vnd.google-apps.spreadsheet,application/vnd.google-earth.kml+xml,application/vnd.google-earth.kmz,application/vnd.grafeq,application/vnd.groove-account,application/vnd.groove-help,application/vnd.groove-identity-message,application/vnd.groove-injector,application/vnd.groove-tool-message,application/vnd.groove-tool-template,application/vnd.groove-vcard,application/vnd.hal+xml,application/vnd.handheld-entertainment+xml,application/vnd.hbci,application/vnd.hhe.lesson-player,application/vnd.hp-hpgl,application/vnd.hp-hpid,application/vnd.hp-hps,application/vnd.hp-jlyt,application/vnd.hp-pcl,application/vnd.hp-pclxl,application/vnd.hydrostatix.sof-data,application/vnd.ibm.minipay,application/vnd.ibm.modcap,application/vnd.ibm.rights-management,application/vnd.ibm.secure-container,application/vnd.iccprofile,application/vnd.igloader,application/vnd.immervision-ivp,application/vnd.immervision-ivu,application/vnd.insors.igm,application/vnd.intercon.formnet,application/vnd.intergeo,application/vnd.intu.qbo,application/vnd.intu.qfx,application/vnd.ipunplugged.rcprofile,application/vnd.irepository.package+xml,application/vnd.is-xpr,application/vnd.isac.fcs,application/vnd.jam,application/vnd.jcp.javame.midlet-rms,application/vnd.jisp,application/vnd.joost.joda-archive,application/vnd.kahootz,application/vnd.kde.karbon,application/vnd.kde.kchart,application/vnd.kde.kformula,application/vnd.kde.kivio,application/vnd.kde.kontour,application/vnd.kde.kpresenter,application/vnd.kde.kspread,application/vnd.kde.kword,application/vnd.kenameaapp,application/vnd.kidspiration,application/vnd.kinar,application/vnd.koan,application/vnd.kodak-descriptor,application/vnd.las.las+xml,application/vnd.llamagraphics.life-balance.desktop,application/vnd.llamagraphics.life-balance.exchange+xml,application/vnd.lotus-1-2-3,application/vnd.lotus-approach,application/vnd.lotus-freelance,application/vnd.lotus-notes,application/vnd.lotus-organizer,application/vnd.lotus-screencam,application/vnd.lotus-wordpro,application/vnd.macports.portpkg,application/vnd.mcd,application/vnd.medcalcdata,application/vnd.mediastation.cdkey,application/vnd.mfer,application/vnd.mfmp,application/vnd.micrografx.flo,application/vnd.micrografx.igx,application/vnd.mif,application/vnd.mobius.daf,application/vnd.mobius.dis,application/vnd.mobius.mbk,application/vnd.mobius.mqy,application/vnd.mobius.msl,application/vnd.mobius.plc,application/vnd.mobius.txf,application/vnd.mophun.application,application/vnd.mophun.certificate,application/vnd.mozilla.xul+xml,application/vnd.ms-artgalry,application/vnd.ms-cab-compressed,application/vnd.ms-excel,application/vnd.ms-excel.addin.macroenabled.12,application/vnd.ms-excel.sheet.binary.macroenabled.12,application/vnd.ms-excel.sheet.macroenabled.12,application/vnd.ms-excel.template.macroenabled.12,application/vnd.ms-fontobject,application/vnd.ms-htmlhelp,application/vnd.ms-ims,application/vnd.ms-lrm,application/vnd.ms-officetheme,application/vnd.ms-outlook,application/vnd.ms-pki.seccat,application/vnd.ms-pki.stl,application/vnd.ms-powerpoint,application/vnd.ms-powerpoint.addin.macroenabled.12,application/vnd.ms-powerpoint.presentation.macroenabled.12,application/vnd.ms-powerpoint.slide.macroenabled.12,application/vnd.ms-powerpoint.slideshow.macroenabled.12,application/vnd.ms-powerpoint.template.macroenabled.12,application/vnd.ms-project,application/vnd.ms-word.document.macroenabled.12,application/vnd.ms-word.template.macroenabled.12,application/vnd.ms-works,application/vnd.ms-wpl,application/vnd.ms-xpsdocument,application/vnd.mseq,application/vnd.musician,application/vnd.muvee.style,application/vnd.mynfc,application/vnd.neurolanguage.nlu,application/vnd.nitf,application/vnd.noblenet-directory,application/vnd.noblenet-sealer,application/vnd.noblenet-web,application/vnd.nokia.n-gage.ac+xml,application/vnd.nokia.n-gage.data,application/vnd.nokia.n-gage.symbian.install,application/vnd.nokia.radio-preset,application/vnd.nokia.radio-presets,application/vnd.novadigm.edm,application/vnd.novadigm.edx,application/vnd.novadigm.ext,application/vnd.oasis.opendocument.chart,application/vnd.oasis.opendocument.chart-template,application/vnd.oasis.opendocument.database,application/vnd.oasis.opendocument.formula,application/vnd.oasis.opendocument.formula-template,application/vnd.oasis.opendocument.graphics,application/vnd.oasis.opendocument.graphics-template,application/vnd.oasis.opendocument.image,application/vnd.oasis.opendocument.image-template,application/vnd.oasis.opendocument.presentation,application/vnd.oasis.opendocument.presentation-template,application/vnd.oasis.opendocument.spreadsheet,application/vnd.oasis.opendocument.spreadsheet-template,application/vnd.oasis.opendocument.text,application/vnd.oasis.opendocument.text-master,application/vnd.oasis.opendocument.text-template,application/vnd.oasis.opendocument.text-web,application/vnd.olpc-sugar,application/vnd.oma.dd2+xml,application/vnd.openblox.game+xml,application/vnd.openofficeorg.extension,application/vnd.openstreetmap.data+xml,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.openxmlformats-officedocument.presentationml.slide,application/vnd.openxmlformats-officedocument.presentationml.slideshow,application/vnd.openxmlformats-officedocument.presentationml.template,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.spreadsheetml.template,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.wordprocessingml.template,application/vnd.osgeo.mapguide.package,application/vnd.osgi.dp,application/vnd.osgi.subsystem,application/vnd.palm,application/vnd.pawaafile,application/vnd.pg.format,application/vnd.pg.osasli,application/vnd.picsel,application/vnd.pmi.widget,application/vnd.pocketlearn,application/vnd.powerbuilder6,application/vnd.previewsystems.box,application/vnd.proteus.magazine,application/vnd.publishare-delta-tree,application/vnd.pvi.ptid1,application/vnd.quark.quarkxpress,application/vnd.rar,application/vnd.realvnc.bed,application/vnd.recordare.musicxml,application/vnd.recordare.musicxml+xml,application/vnd.rig.cryptonote,application/vnd.rim.cod,application/vnd.rn-realmedia,application/vnd.rn-realmedia-vbr,application/vnd.route66.link66+xml,application/vnd.sailingtracker.track,application/vnd.seemail,application/vnd.sema,application/vnd.semd,application/vnd.semf,application/vnd.shana.informed.formdata,application/vnd.shana.informed.formtemplate,application/vnd.shana.informed.interchange,application/vnd.shana.informed.package,application/vnd.simtech-mindmapper,application/vnd.smaf,application/vnd.smart.teacher,application/vnd.software602.filler.form+xml,application/vnd.solent.sdkm+xml,application/vnd.spotfire.dxp,application/vnd.spotfire.sfs,application/vnd.stardivision.calc,application/vnd.stardivision.draw,application/vnd.stardivision.impress,application/vnd.stardivision.math,application/vnd.stardivision.writer,application/vnd.stardivision.writer-global,application/vnd.stepmania.package,application/vnd.stepmania.stepchart,application/vnd.sun.wadl+xml,application/vnd.sun.xml.calc,application/vnd.sun.xml.calc.template,application/vnd.sun.xml.draw,application/vnd.sun.xml.draw.template,application/vnd.sun.xml.impress,application/vnd.sun.xml.impress.template,application/vnd.sun.xml.math,application/vnd.sun.xml.writer,application/vnd.sun.xml.writer.global,application/vnd.sun.xml.writer.template,application/vnd.sus-calendar,application/vnd.svd,application/vnd.symbian.install,application/vnd.syncml+xml,application/vnd.syncml.dm+wbxml,application/vnd.syncml.dm+xml,application/vnd.syncml.dmddf+xml,application/vnd.tao.intent-module-archive,application/vnd.tcpdump.pcap,application/vnd.tmobile-livetv,application/vnd.trid.tpt,application/vnd.triscape.mxs,application/vnd.trueapp,application/vnd.ufdl,application/vnd.uiq.theme,application/vnd.umajin,application/vnd.unity,application/vnd.uoml+xml,application/vnd.vcx,application/vnd.visio,application/vnd.visionary,application/vnd.vsf,application/vnd.wap.wbxml,application/vnd.wap.wmlc,application/vnd.wap.wmlscriptc,application/vnd.webturbo,application/vnd.wolfram.player,application/vnd.wordperfect,application/vnd.wqd,application/vnd.wt.stf,application/vnd.xara,application/vnd.xfdl,application/vnd.yamaha.hv-dic,application/vnd.yamaha.hv-script,application/vnd.yamaha.hv-voice,application/vnd.yamaha.openscoreformat,application/vnd.yamaha.openscoreformat.osfpvg+xml,application/vnd.yamaha.smaf-audio,application/vnd.yamaha.smaf-phrase,application/vnd.yellowriver-custom-menu,application/vnd.zul,application/vnd.zzazz.deck+xml,application/voicexml+xml,application/wasm,application/widget,application/winhlp,application/wsdl+xml,application/wspolicy+xml,application/x-7z-compressed,application/x-abiword,application/x-ace-compressed,application/x-apple-diskimage,application/x-arj,application/x-authorware-bin,application/x-authorware-map,application/x-authorware-seg,application/x-bcpio,application/x-bdoc,application/x-bittorrent,application/x-blorb,application/x-bzip,application/x-bzip2,application/x-cbr,application/x-cdlink,application/x-cfs-compressed,application/x-chat,application/x-chess-pgn,application/x-chrome-extension,application/x-cocoa,application/x-conference,application/x-cpio,application/x-csh,application/x-debian-package,application/x-dgc-compressed,application/x-director,application/x-doom,application/x-dtbncx+xml,application/x-dtbook+xml,application/x-dtbresource+xml,application/x-dvi,application/x-envoy,application/x-eva,application/x-font-bdf,application/x-font-ghostscript,application/x-font-linux-psf,application/x-font-pcf,application/x-font-snf,application/x-font-type1,application/x-freearc,application/x-futuresplash,application/x-gca-compressed,application/x-glulx,application/x-gnumeric,application/x-gramps-xml,application/x-gtar,application/x-hdf,application/x-httpd-php,application/x-install-instructions,application/x-iso9660-image,application/x-java-archive-diff,application/x-java-jnlp-file,application/x-keepass2,application/x-latex,application/x-lua-bytecode,application/x-lzh-compressed,application/x-makeself,application/x-mie,application/x-mobipocket-ebook,application/x-ms-application,application/x-ms-shortcut,application/x-ms-wmd,application/x-ms-wmz,application/x-ms-xbap,application/x-msaccess,application/x-msbinder,application/x-mscardfile,application/x-msclip,application/x-msdos-program,application/x-msdownload,application/x-msmediaview,application/x-msmetafile,application/x-msmoney,application/x-mspublisher,application/x-msschedule,application/x-msterminal,application/x-mswrite,application/x-netcdf,application/x-ns-proxy-autoconfig,application/x-nzb,application/x-perl,application/x-pilot,application/x-pkcs12,application/x-pkcs7-certificates,application/x-pkcs7-certreqresp,application/x-rar-compressed,application/x-redhat-package-manager,application/x-research-info-systems,application/x-sea,application/x-sh,application/x-shar,application/x-shockwave-flash,application/x-silverlight-app,application/x-sql,application/x-stuffit,application/x-stuffitx,application/x-subrip,application/x-sv4cpio,application/x-sv4crc,application/x-t3vm-image,application/x-tads,application/x-tar,application/x-tcl,application/x-tex,application/x-tex-tfm,application/x-texinfo,application/x-tgif,application/x-ustar,application/x-virtualbox-hdd,application/x-virtualbox-ova,application/x-virtualbox-ovf,application/x-virtualbox-vbox,application/x-virtualbox-vbox-extpack,application/x-virtualbox-vdi,application/x-virtualbox-vhd,application/x-virtualbox-vmdk,application/x-wais-source,application/x-web-app-manifest+json,application/x-x509-ca-cert,application/x-xfig,application/x-xliff+xml,application/x-xpinstall,application/x-xz,application/x-zmachine,application/xaml+xml,application/xcap-att+xml,application/xcap-caps+xml,application/xcap-diff+xml,application/xcap-el+xml,application/xcap-error+xml,application/xcap-ns+xml,application/xenc+xml,application/xhtml+xml,application/xliff+xml,application/xml,application/xml-dtd,application/xop+xml,application/xproc+xml,application/xslt+xml,application/xspf+xml,application/xv+xml,application/yang,application/yin+xml,application/zip,audio/3gpp,audio/adpcm,audio/basic,audio/midi,audio/mobile-xmf,audio/mp3,audio/mp4,audio/mpeg,audio/ogg,audio/s3m,audio/silk,audio/vnd.dece.audio,audio/vnd.digital-winds,audio/vnd.dra,audio/vnd.dts,audio/vnd.dts.hd,audio/vnd.lucent.voice,audio/vnd.ms-playready.media.pya,audio/vnd.nuera.ecelp4800,audio/vnd.nuera.ecelp7470,audio/vnd.nuera.ecelp9600,audio/vnd.rip,audio/wav,audio/wave,audio/webm,audio/x-aac,audio/x-aiff,audio/x-caf,audio/x-flac,audio/x-m4a,audio/x-matroska,audio/x-mpegurl,audio/x-ms-wax,audio/x-ms-wma,audio/x-pn-realaudio,audio/x-pn-realaudio-plugin,audio/x-realaudio,audio/x-wav,audio/xm,chemical/x-cdx,chemical/x-cif,chemical/x-cmdf,chemical/x-cml,chemical/x-csml,chemical/x-xyz,font/collection,font/otf,font/ttf,font/woff,font/woff2,image/aces,image/apng,image/avif,image/bmp,image/cgm,image/dicom-rle,image/emf,image/fits,image/g3fax,image/gif,image/heic,image/heic-sequence,image/heif,image/heif-sequence,image/hej2k,image/hsj2,image/ief,image/jls,image/jp2,image/jpeg,image/jph,image/jphc,image/jpm,image/jpx,image/jxr,image/jxra,image/jxrs,image/jxs,image/jxsc,image/jxsi,image/jxss,image/ktx,image/ktx2,image/png,image/prs.btif,image/prs.pti,image/sgi,image/svg+xml,image/t38,image/tiff,image/tiff-fx,image/vnd.adobe.photoshop,image/vnd.airzip.accelerator.azv,image/vnd.dece.graphic,image/vnd.djvu,image/vnd.dvb.subtitle,image/vnd.dwg,image/vnd.dxf,image/vnd.fastbidsheet,image/vnd.fpx,image/vnd.fst,image/vnd.fujixerox.edmics-mmr,image/vnd.fujixerox.edmics-rlc,image/vnd.microsoft.icon,image/vnd.ms-dds,image/vnd.ms-modi,image/vnd.ms-photo,image/vnd.net-fpx,image/vnd.pco.b16,image/vnd.tencent.tap,image/vnd.valve.source.texture,image/vnd.wap.wbmp,image/vnd.xiff,image/vnd.zbrush.pcx,image/webp,image/wmf,image/x-3ds,image/x-cmu-raster,image/x-cmx,image/x-freehand,image/x-icon,image/x-jng,image/x-mrsid-image,image/x-ms-bmp,image/x-pcx,image/x-pict,image/x-portable-anymap,image/x-portable-bitmap,image/x-portable-graymap,image/x-portable-pixmap,image/x-rgb,image/x-tga,image/x-xbitmap,image/x-xpixmap,image/x-xwindowdump,message/disposition-notification,message/global,message/global-delivery-status,message/global-disposition-notification,message/global-headers,message/rfc822,message/vnd.wfa.wsc,model/3mf,model/gltf+json,model/gltf-binary,model/iges,model/mesh,model/mtl,model/obj,model/stl,model/vnd.collada+xml,model/vnd.dwf,model/vnd.gdl,model/vnd.gtw,model/vnd.mts,model/vnd.opengex,model/vnd.parasolid.transmit.binary,model/vnd.parasolid.transmit.text,model/vnd.usdz+zip,model/vnd.valve.source.compiled-map,model/vnd.vtu,model/vrml,model/x3d+binary,model/x3d+fastinfoset,model/x3d+vrml,model/x3d+xml,model/x3d-vrml,text/cache-manifest,text/calendar,text/coffeescript,text/css,text/csv,text/html,text/jade,text/jsx,text/less,text/markdown,text/mathml,text/mdx,text/n3,text/plain,text/prs.lines.tag,text/richtext,text/rtf,text/sgml,text/shex,text/slim,text/spdx,text/stylus,text/tab-separated-values,text/troff,text/turtle,text/uri-list,text/vcard,text/vnd.curl,text/vnd.curl.dcurl,text/vnd.curl.mcurl,text/vnd.curl.scurl,text/vnd.dvb.subtitle,text/vnd.fly,text/vnd.fmi.flexstor,text/vnd.graphviz,text/vnd.in3d.3dml,text/vnd.in3d.spot,text/vnd.sun.j2me.app-descriptor,text/vnd.wap.wml,text/vnd.wap.wmlscript,text/vtt,text/x-asm,text/x-c,text/x-component,text/x-fortran,text/x-handlebars-template,text/x-java-source,text/x-lua,text/x-markdown,text/x-nfo,text/x-opml,text/x-org,text/x-pascal,text/x-processing,text/x-sass,text/x-scss,text/x-setext,text/x-sfv,text/x-suse-ymp,text/x-uuencode,text/x-vcalendar,text/x-vcard,text/xml,text/yaml,video/3gpp,video/3gpp2,video/h261,video/h263,video/h264,video/jpeg,video/jpm,video/mj2,video/mp2t,video/mp4,video/mpeg,video/ogg,video/quicktime,video/vnd.dece.hd,video/vnd.dece.mobile,video/vnd.dece.pd,video/vnd.dece.sd,video/vnd.dece.video,video/vnd.dvb.file,video/vnd.fvt,video/vnd.mpegurl,video/vnd.ms-playready.media.pyv,video/vnd.uvvu.mp4,video/vnd.vivo,video/webm,video/x-f4v,video/x-fli,video/x-flv,video/x-m4v,video/x-matroska,video/x-mng,video/x-ms-asf,video/x-ms-vob,video/x-ms-wm,video/x-ms-wmv,video/x-ms-wmx,video/x-ms-wvx,video/x-msvideo,video/x-sgi-movie,video/x-smv,x-conference/x-cooltalk","network.proxy.allow_hijacking_localhost":true,"network.proxy.http":"localhost","network.proxy.ssl":"localhost","network.proxy.http_port":38843,"network.proxy.ssl_port":38843,"network.proxy.no_proxies_on":"","browser.download.dir":"/home/atofstryker/Repositories/test-firefox-cypress/cypress/downloads","devtools.debugger.remote-port":45981,"marionette.port":42595,"browser.cache.disk.parent_directory":"/home/atofstryker/snap/firefox/current/Cypress/firefox-stable/run-47207/CypressCache"}},"moz:debuggerAddress":true}}} +1ms
geckodriver starts the firefox process, with some environment variables but not the ones I sent. Any idea why this is happening?
mozrunner::runner INFO Running command: MOZ_CRASHREPORTER="1" MOZ_CRASHREPORTER_NO_REPORT="1" MOZ_CRASHREPORTER_SHUTDOWN="1" MOZ_NO_REMOTE="1" "firefox" "--marionette" "--jsdebugger" "-new-instance" "-start-debugger-server" "-no-remote" "-headless" "-width" "1280" "-height" "806" "--remote-debugging-port" "33209" "--remote-allow-hosts" "localhost" "-profile" "/home/atofstryker/snap/firefox/current/Cypress/firefox-stable/run-47207/rust_mozprofilepZiPnI" +2ms
This looks to be the only hurdle we need to overcome. Everything else has worked out great. full log is attached above. Once we figure this out we should be able to finish the cut over and then build BiDi support on top of it.
Also I want to note that Firefox 86 is not supported for a very long time, and it would be good to know why your compatibility matrix goes back that long. Those versions are vulnerable to certain security issues and should basically no longer be used. The oldest officially supported Firefox release is 115 ESR (extended release) and soon 128 ESR.
I think this has to do with oversight on our end. We can also move the supported version of firefox up in the near future, and likely want to have some type of rolling support like "past 10 versions"
Comment 20•2 months ago
|
||
(In reply to William Glesias from comment #18)
Sorry for the delay on an update here. I've been pretty busy heads down
trying to cut over the olderb2g marionette client
over togeckodriver
.
No worries at all William. I already thought so and wanted to wait a bit until reaching out to you again.
The good news is it has mostly been successful! I have a draft pull
request open that mostly
works, using thegeckodriver
package that wdio has to spin up the
geckodriver process and then send our
[capabilities](https://github.com/cypress-io/cypress/pull/30250/files#diff-
6ec303ebac972615597a2bbcc7cd2986c44cea3ff5b0eccb0b8724a8527d1972R562) to
start firefox.
This is great to hear! So lets see that we can get the remaining issues resolved soon as well! Let me check your questions...
I do want to clarify that we are just using the
geckodriver
package from
wdio. I see that they have WebDriver BiDi support but we need to hook into
the protocol ourselves to help automate the browser, which should not be too
difficult at least from my experience so far, which is good!
So does it mean you need to fully rewrite the client yourself and you cannot rely on the BiDi code that is already present in https://www.npmjs.com/package/webdriver? I'm asking because that code is auto-generated from the actual WebDriver BiDi specification.
Most things seem to work correctly, like arguments, and preferences, but I
cannot seem to get environment variables to actually work. We are sending
theenv
capabilities, which looks correct looking at the
[documentation](https://developer.mozilla.org/en-US/docs/Web/WebDriver/
Capabilities/firefoxOptions#example) and [source
code](https://searchfox.org/mozilla-central/source/testing/geckodriver/src/
capabilities.rs#595).What am I missing here? based on the
geckodriver
debug logs everything
looks to be forwarded as expected
Yes, that is expected. Environment variables aren't supported that way. This capability is only used for Android when we have to forward the variables to the actual process on the device. It might not be that clear when reading through https://developer.mozilla.org/en-US/docs/Web/WebDriver/Capabilities/firefoxOptions.
To get it working on desktop you should be able to pass all the environment variables to the geckodriver process which itself will forward these automatically to the Firefox process.
Also I want to note that Firefox 86 is not supported for a very long time, and it would be good to know why your compatibility matrix goes back that long. Those versions are vulnerable to certain security issues and should basically no longer be used. The oldest officially supported Firefox release is 115 ESR (extended release) and soon 128 ESR.
I think this has to do with oversight on our end. We can also move the supported version of firefox up in the near future, and likely want to have some type of rolling support like "past 10 versions"
Sounds good. Note that you can find our support Matrix at:
https://firefox-source-docs.mozilla.org/testing/geckodriver/Support.html
Let me know if there are other issues you are blocked on here via Bugzilla or as mentioned on our Matrix channel. Thanks!
Comment 21•2 months ago
|
||
Looks like we have geckodriver fully working in https://github.com/cypress-io/cypress/pull/30250 which is a great sign. Passing the environment variables to geckodriver that we need in the firefox process worked just like you recommended.
So does it mean you need to fully rewrite the client yourself and you cannot rely on the BiDi code that is already present in https://www.npmjs.com/package/webdriver? I'm asking because that code is auto-generated from the actual WebDriver BiDi specification.
I think at the time of writing this comment I wasn't too sure on the direction we would go. It looks like the webdriver
package is minimal enough that it would do exactly what a websocket client would handle anyway. Now that geckodriver works, I was able to prove out using the webdriver package via being our default client. There should be a PR for that in the near future. In other words, we should be able to use the package and not need to fully rewrite a client (which sounds like a maintenance nightmare).
We are still making good progress. I will post updates on here in the near future!
Comment 22•2 months ago
|
||
(In reply to William Glesias from comment #21)
Looks like we have geckodriver fully working in https://github.com/cypress-io/cypress/pull/30250 which is a great sign. Passing the environment variables to geckodriver that we need in the firefox process worked just like you recommended.
Amazing! It's great to see and should make the rest easier to get implemented.
I think at the time of writing this comment I wasn't too sure on the direction we would go. It looks like the
webdriver
package is minimal enough that it would do exactly what a websocket client would handle anyway. Now that geckodriver works, I was able to prove out using the webdriver package via being our default client. There should be a PR for that in the near future. In other words, we should be able to use the package and not need to fully rewrite a client (which sounds like a maintenance nightmare).
Perfect. Please let me know why you have that PR open, or add it yourself to the See Also
section of this bug.
As well it would be good to get started to discuss the remaining features - especially those were no workaround is available. If you could come up with this list I would appreciate. Happy to also chat on Matrix or via a Zoom call. Maybe you can take a look at the BiDi roadmap spreadsheet and add priorities for the still missing features in column H? Thanks!
Comment 23•2 months ago
|
||
Perfect. Please let me know why you have that PR open, or add it yourself to the See Also section of this bug.
We have https://github.com/cypress-io/cypress/pull/30324 ready for review which implements the webdriver client. Our expectation is to have this released in about a week and we will start receiving feedback from our users. I couldn't figure out how to add it to "see also" so I just put it here.
As well it would be good to get started to discuss the remaining features - especially those were no workaround is available. If you could come up with this list I would appreciate. Happy to also chat on Matrix or via a Zoom call. Maybe you can take a look at the BiDi roadmap spreadsheet and add priorities for the still missing features in column H? Thanks!
I requested edit access on the BiDi roadmap spreadsheet. I will go through and fill out the priority for us on issues with the team.
Since we are now on geckodriver/webdriver, I was able to build a small BiDi wrapper for our immediate automation needs on this commit. Cypress has to do some request correlation logic in order to correctly support cookies, our cy.intercept() command, and correctly logging requests to the Cypress command log, which is the blue navigation box on the left hand screen that logs xhr/fetch requests, as well as Cypress commands.
I gave this commit a run in circleCI to run our test battery against the BiDi implementation. The good news is there weren't a lot of failures. The bad news is that there are things that are broken. The most obvious one I can see is resourceType not being fully supported on the NetworkInitiator
for network
events, like onBeforeRequestSent
. This does break the command log, the cy.intercept()
API, and cookie correlation logic in our proxy server. I can definitely say this is a p0
for us to support unless there is another way to get it . It looks like there is an issue for it as well.
I also think playwright might be blocked by this based on this issue. I would like to get an issue created similar to Cypress. For now, I can definitely say resourceType
is very important for us for adoption. For everything else I need to attempt to cut over the cypress web extension that we use to automate firefox cookies and a few other things, like downloads. I have an issue tracked for this (as well as the investigation for breaking changes or other blockers), as well as an epic to track our BiDi work. The good news is cutting over the extension is not needed for initial adoption of BiDi, but is likely informative to the team as to priority order on issues for support, so I will spike into it and see what works/doesn't.
I think the only other concern from the team is when CDP from Firefox is going to be removed if support for the needed items, like resourceType, is not completed or implemented yet. Is the date for removal still fairly flexible? We are planning Cypress 14 to be released in the next 3-4 months, so if there is a hard date or something we need to be aware of, it might give us some more time to plan accordingly, as we might be able to find other methods to support resourceType in an emergency, though it would be less than ideal.
Comment 24•1 month ago
|
||
(In reply to William Glesias from comment #23)
We have https://github.com/cypress-io/cypress/pull/30324 ready for review which implements the webdriver client. Our expectation is to have this released in about a week and we will start receiving feedback from our users. I couldn't figure out how to add it to "see also" so I just put it here.
That's great to hear! I've taken a look at the PR and had only a single question. Regarding adding the link to the see also
section you need to press the edit bug
button at the top of the page first. But it might be that you do not have edit permissions yet and as such cannot do it yourself. I'm happy to update this section whenever needed.
I requested edit access on the BiDi roadmap spreadsheet. I will go through and fill out the priority for us on issues with the team.
Thanks a lot in advance!
I gave this commit a run in circleCI to run our test battery against the BiDi implementation. The good news is there weren't a lot of failures. The bad news is that there are things that are broken. The most obvious one I can see is resourceType not being fully supported on the
NetworkInitiator
fornetwork
events, likeonBeforeRequestSent
. This does break the command log, thecy.intercept()
API, and cookie correlation logic in our proxy server. I can definitely say this is ap0
for us to support unless there is another way to get it . It looks like there is an issue for it as well.
This is great feedback! We will make sure to give this API a priority. There is bug 1904892 on our side to get it implemented once the specification was updated.
I also think playwright might be blocked by this based on this issue. I would like to get an issue created similar to Cypress. For now, I can definitely say
resourceType
is very important for us for adoption. For everything else I need to attempt to cut over the cypress web extension that we use to automate firefox cookies and a few other things, like downloads. I have an issue tracked for this (as well as the investigation for breaking changes or other blockers), as well as an epic to track our BiDi work. The good news is cutting over the extension is not needed for initial adoption of BiDi, but is likely informative to the team as to priority order on issues for support, so I will spike into it and see what works/doesn't.
Agreed and thanks for the additional information. I like the created milestone 115 which should make it easier for us to track the remaining items on your side without having to add each and every individual issue / PR.
I think the only other concern from the team is when CDP from Firefox is going to be removed if support for the needed items, like resourceType, is not completed or implemented yet. Is the date for removal still fairly flexible? We are planning Cypress 14 to be released in the next 3-4 months, so if there is a hard date or something we need to be aware of, it might give us some more time to plan accordingly, as we might be able to find other methods to support resourceType in an emergency, though it would be less than ideal.
No, there is no hard cut-off date for the removal of CDP. We are absolutely flexible here and if it takes a bit longer for remaining items to make available for you then we definitely have to move out the removal. So please don't worry about that fact. Your users should not see any degraded functionality. I'm going to mark this bug as a blocker for bug 1872254 to make that clear.
Once you had a chance to fill out the priorities in the BiDi roadmap sheet please let me know. Thanks!
Comment 25•1 month ago
|
||
No, there is no hard cut-off date for the removal of CDP. We are absolutely flexible here and if it takes a bit longer for remaining items to make available for you then we definitely have to move out the removal. So please don't worry about that fact. Your users should not see any degraded functionality. I'm going to mark this bug as a blocker for bug 1872254 to make that clear.
That is great to know and definitely reduces some pressure on our end.
Once you had a chance to fill out the priorities in the BiDi roadmap sheet please let me know. Thanks!
I have some of this filled out in a copy of the document since I don't think I have access to it (could also be because I'm using my work email). The P3 and up is still being prioritized but everything that is a P2 and below should be correct. I also have this tracked in https://github.com/cypress-io/cypress/issues/30447. I feel pretty confident on the issues currently listed there since I spiked into cutting over the basics from CDP to BiDi as well as cutting over the extension. I've also added this to the milestone.
For Cypress, we are going to deprecate a few APIs that rely somewhat tightly on CDP so we can go ahead with Cypress 14 which is our breaking change version, with the idea we can implement BiDi in Firefox as a feature once the resourceType is supported. AFAIK, this is the largest blocker for us for basic cut over from CDP to BiDi
Comment 26•1 month ago
|
||
I have some of this filled out in a copy of the document since I don't think I have access to it (could also be because I'm using my work email). The P3 and up is still being prioritized but everything that is a P2 and below should be correct. I also have this tracked in https://github.com/cypress-io/cypress/issues/30447. I feel pretty confident on the issues currently listed there since I spiked into cutting over the basics from CDP to BiDi as well as cutting over the extension. I've also added this to the milestone.
OK the priority order of the document copy mentioned above is all correct. I can copy those over once I have access to the document.
For Cypress, we are going to deprecate a few APIs that rely somewhat tightly on CDP so we can go ahead with Cypress 14 which is our breaking change version, with the idea we can implement BiDi in Firefox as a feature once the resourceType is supported. AFAIK, this is the largest blocker for us for basic cut over from CDP to BiDi
For resourceType, the most important thing for us is to get as close to what CDP offers as possible, most importantly being able to distinguish between fetch
and xhr
. I know we just signaled that we need this a few weeks ago, but any idea what the timeline would be to get something like this implemented?
Comment 27•29 days ago
|
||
(In reply to William Glesias from comment #25)
I have some of this filled out in a copy of the document since I don't think I have access to it (could also be because I'm using my work email).
It would still be great if you could fill out the original sheet and for sure get it updated whenever something changes on your side. As such please send me a private email with the email that you want to use and I can share the document with you. Note that I cannot access your document as well, so maybe we just do the update directly in the original document. The P3 and up is still being prioritized but everything that is a P2 and below should be correct.
I also have this tracked in https://github.com/cypress-io/cypress/issues/30447. I feel pretty confident on the issues currently listed there since I spiked into cutting over the basics from CDP to BiDi as well as cutting over the extension. I've also added this to the milestone.
For Cypress, we are going to deprecate a few APIs that rely somewhat tightly on CDP so we can go ahead with Cypress 14 which is our breaking change version, with the idea we can implement BiDi in Firefox as a feature once the resourceType is supported. AFAIK, this is the largest blocker for us for basic cut over from CDP to BiDi
Based on the above issue and the deprecation of CDP which of these APIs beside resourceType
would currently block you? Would it be feasible for you if we do those blockers first? I assume keeping the WebExtension running a bit longer should probably not be such a big issue, and we could do that as the second step? We will certainly have a look at the resourceType
soon, and I assume there are no other types you initially will need for that property's value?
Comment 28•29 days ago
|
||
I just saw https://github.com/cypress-io/cypress/issues/30433 as well which is about the removal of the resourceType
dependency. Would that be possible? I mean we need resouceType
for BiDi eventually so we could get started with some vlaues (that will help you) and not all.
Comment 29•28 days ago
|
||
It would still be great if you could fill out the original sheet and for sure get it updated whenever something changes on your side. As such please send me a private email with the email that you want to use and I can share the document with you. Note that I cannot access your document as well, so maybe we just do the update directly in the original document. The P3 and up is still being prioritized but everything that is a P2 and below should be correct.
OK I just sent you an email!
Based on the above issue and the deprecation of CDP which of these APIs beside resourceType would currently block you? Would it be feasible for you if we do those blockers first? I assume keeping the WebExtension running a bit longer should probably not be such a big issue, and we could do that as the second step?
Right now it is just resourceType
that is the blocker. I did mark the 'load extension' as a p2 as a "non workaround item" but as long as we can load our web extension through classic webdriver (which we do today), this is NOT a blocker. It would be feasible for us if you all do the blockers first so we can do the minimum cutover and keep the web extension running a bit longer. This is the plan anyways so it sounds like we are in alignment.
We will certainly have a look at the resourceType soon, and I assume there are no other types you initially will need for that property's value?
As long as we have something very close to CDP ResourceType this should get us up and running. If that changes though I will let you know but once it's available I can give it a try!
I just saw https://github.com/cypress-io/cypress/issues/30433 as well which is about the removal of the resourceType dependency. Would that be possible? I mean we need resourceType for BiDi eventually so we could get started with some values (that will help you) and not all.
This issue is to deprecate the resourceType filter field from our public api as users can use cy.intercept()
to filter/find requests. We might not be able to guarantee the values depending on the results of your teams implementation of ResourceType, so we figured it would be best to deprecate the field to grant us flexibility in adding BiDi support. We still need the resourceType very much for internal uses of automation!
Comment 30•28 days ago
|
||
(In reply to William Glesias from comment #29)
We will certainly have a look at the resourceType soon, and I assume there are no other types you initially will need for that property's value?
As long as we have something very close to CDP ResourceType this should get us up and running. If that changes though I will let you know but once it's available I can give it a try!
As you mentioned do you only need the XHR
and Fetch
values for now, or does the very close
mean we should have support for all the available values as provided by CDP?
Comment 31•27 days ago
|
||
As you mentioned do you only need the XHR and Fetch values for now, or does the very close mean we should have support for all the available values as provided by CDP?
I think having all the ResourceType
values would be needed.
Comment 32•19 days ago
|
||
We now have a WebDriver BiDi PR for the addition of the initiatorType
and destination
properties of network events. There is not a 100% match with resourceType
in CDP, so it still needs some feedback from Chrome folks. Lets see if we can get it reviewed soon. The implementation on our side should be not that complicated.
Comment 33•7 days ago
|
||
Hi William, we are currently trying to get the list of missing APIs for you to also get rid of the WebExtension. I had another look at your spreadsheet and tried to collect the full list of those APIs that are not yet implemented or spec'ed. Would you mind taking a look over the following list and check if it is complete? Thanks
- Command to remove the browsing data (browser.browsingData.remove)
- Command to close a window with all the tabs inside it (browser.window.remove)
- Event when a cookie has changed (browser.cookies.onChanged)
- Event when a download begins (browser.download.onCreated)
- Event when a download completes or is canceled (browser.download.onChanged)
Comment 34•5 days ago
|
||
Hey Henrik,
Right now this is the best assessment I have of the situation. I spiked into cutting this over in https://github.com/cypress-io/cypress/issues/30221#issuecomment-2432706433.
Command to remove the browsing data (browser.browsingData.remove)
This is still needed and I believe is being handled by https://github.com/w3c/webdriver-bidi/issues/798.
Command to close a window with all the tabs inside it (browser.window.remove)
We can use Bidi browsingContext.close API for this.
Event when a cookie has changed (browser.cookies.onChanged)
We use this to sync cookies back from the browser to some stateful representations in our server. I don't think the storage API currently offers a way to do this?
Event when a download begins (browser.download.onCreated)
This is accomplished by browsingContext.downloadWillBegin.
Event when a download completes or is canceled (browser.download.onChanged).
The browsing context API doesn't currently have a way to detect this, just the downloadWillBegin
.
Description
•