Skip to content

Support Firefox as a browser in flutter run #55324

Description

@jonahwilliams

The Firefox remote protocol claims to support a subset of the chrome devtools protocol: https://firefox-source-docs.mozilla.org/remote/index.html . If this subset is sufficient, we might be able to connect with out existing chrome devtools logic and have it mostly work. This would allow 1st class support for flutter run -d firefox

Activity

  1. added
    c: new featureNothing broken; request for a new capability
    toolAffects the "flutter" command-line tool. See also t: labels.
    platform-webWeb applications specifically
    on Apr 21, 2020
  2. added this to the milestone on Apr 21, 2020
  3. jonahwilliams commented on May 2, 2020

    @jonahwilliams
    ContributorAuthor

    More info: this is only available on the nightly download and doesn't seem to be supported on windows.

  4. removed this from the milestone on Jun 1, 2020
  5. jonahwilliams commented on Mar 7, 2021

    @jonahwilliams
    ContributorAuthor
  6. Zenb0t commented on Oct 18, 2021

    @Zenb0t
  7. NicTanghe commented on Feb 24, 2022

    @NicTanghe
  8. jonahwilliams commented on Feb 24, 2022

    @jonahwilliams
    ContributorAuthor

    All the updates are provided above. in summary, it does not seem like it is possible to connect to the devtools of a Firefox browser unless you are using a nightly build, and even then only on certain platforms. Connecting to the browser devtools is a requirement for making Flutter devtools fully work.

    We could build the Flutter tool to open firefox with the newly compiled app and support basic hot restart without any additional debugging functionality. This would mean that if you launched firefox from your IDE, you would be unable to do things like set breakpoints. Functionally, it would not be much different than flutter run -d web-server and opening up that page in Firefox, so we haven't spent any time on it. I'd also be worried it would be confusing to folks that are used to how Chrome is supported today.

    @NicTanghe I resent the accusation that we are intentionally withholding functionality due to some vague implied conspiracy. Many aspects of Flutter are a labor of love and that includes Flutter Web. We have chosen to focus on performance and compatibility for the Web instead of investing significantly more time in expanding the debugging experience. I realize that not everyone will be satisfied with that - but the cost of working on a popular project is that there are many more requested features than we have time to work on.

    If anyone wants to spend their time working on this, you would certainly get no objections from me - and I'd be happy to help review patches and provide guidance. I just can't help when it comes to actually connecting to firefox, since that is the whole reason this isn't done.

  9. caniko commented on Aug 15, 2022

    @caniko

    This seems more like a firefox issue than a flutter issue.

  10. NicTanghe commented on Sep 10, 2022

    @NicTanghe

    I’m not saying you are withholding functionality.
    I’m saying most of the work is being done by people that work at Google, and it would be contra productive to spend time on creating said functionality for said people.

    "C:\Program Files\Mozilla Firefox\firefox.exe" -start-debugger-server

    /Applications/Firefox.app/Contents/MacOS/firefox -start-debugger-server

    firefox -start-debugger-server

    Might fix a hurdle.
    firefox_nfMA3LzEnI

  11. pixiekat commented on Jan 9, 2023

    @pixiekat
  12. 22 remaining items

  13. deandreamatias commented on Jun 18, 2024

    @deandreamatias
  14. TechnicJelle commented on Jun 18, 2024

    @TechnicJelle

    They don't at least let you use chromium

    You are wrong about this part: you can use export CHROME_EXECUTABLE="chromium".

    Exactly. In fact, I've been using Ungoogled Chromium for ages now.
    It's been working great.
    Though I would also prefer actual Firefox support...

  15. rempas commented on Jun 18, 2024

    @rempas

    They don't at least let you use chromium

    You are wrong about this part: you can use export CHROME_EXECUTABLE="chromium".

    Thanks for the information! That is something at least! Tho, actual Firefox like @TechnicJelle or even better, any browser you want, would be the optimal choice.

  16. smunshi0mi commented on Jun 22, 2024

    @smunshi0mi
  17. zs-dima commented on Jun 22, 2024

    @zs-dima
  18. smunshi0mi commented on Jun 23, 2024

    @smunshi0mi
  19. zs-dima commented on Jun 23, 2024

    @zs-dima
  20. smunshi0mi commented on Jun 23, 2024

    @smunshi0mi
  21. juxuanu commented on Aug 7, 2024

    @juxuanu
  22. sctech-tr commented on Dec 16, 2024

    @sctech-tr

    just do export CHROME_EXECUTABLE="firefox" lol

  23. bkonyi commented on Dec 16, 2024

    @bkonyi
    Contributor

    In order for us to consider supporting Firefox as a launch target, we need to be able to support debugging and Dart developer tooling.

    Given that Mozilla has stated that they're deprecating support for the Chrome DevTools protocol (CDP) EOY 2024, debugging support would require us to reimplement our web developer services to support a completely different protocol. This would be a significant engineering effort, requiring months of design and implementation work, so the Dart and Flutter teams are unlikely to prioritize this work.

  24. pixiekat commented on Feb 13, 2025

    @pixiekat
  25. samirm commented on May 28, 2025

    @samirm

    @bkonyi would you be willing to provide a detailed plan of what needs to be considered/implemented to support a new protocol such as the one from FF? this way at least the community has a path forward to work on this if they really want it

  26. bkonyi commented on May 30, 2025

    @bkonyi
    Contributor

    @samirm, in all honesty, it would be a fairly hard sell to add support for an additional web browser debugging protocol as it would drastically increase the maintainable surface area of our web debugging services. It's unlikely that we'd have the bandwidth long term to take on the additional maintenance burden.

    We do have some work ongoing to allow for our web debugging services to work without the Chrome DevTools protocol for limited use cases (e.g., no breakpoints or stepping, maybe hot reload / hot restart support). If we get to a state where we can provide a reasonable amount of support for our developer tooling when deploying to Firefox, we might be able to reconsider this in the future.

    We'd also like to explore making the flutter CLI tool extensible so the community can create custom deployment targets without having to ship them with the Flutter SDK. This is still in the early planning stages and may not happen, but we might be able to investigate this further in the next year.

  27. bkonyi commented on Sep 22, 2025

    @bkonyi
    Contributor

    Quick update for everyone here:

    We've recently landed a change to enable limited developer tooling functionality for non-Chromium based browsers (e.g., Firefox and Safari), which includes hot reload and hot restart support. Functionality which requires communication with the browser's debugger (e.g., setting breakpoints, stepping through code, inspecting values, some Dart/Flutter DevTools tooling, etc.) won't work.

    This feature is currently available on the main branch and will be part of the next stable release.

    In general, we will continue to recommend using a Chromium based browser for the best Dart/Flutter for web development experience, but for those of you who are mostly interested in features like hot reload and widget inspector support, this should allow for that.

    Currently, we don't have dedicated device targets for non-Chromium browsers, so the web-server device will need to be used. The Flutter team won't have cycles to add explicit support for common non-Chromium browsers as devices, but I would be happy to review well-tested PRs that add them.

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

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityplatform-webWeb applications specificallyteam-webOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform team

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions