Skip to content

flutter/packages tests need default apps, or a way to set them, on Linux #130074

@stuartmorgan-g

Description

@stuartmorgan-g

Some Linux tests in flutter/packages, notably url_launcher, need default handlers set for common schemes (http, https, file) in order for the tests to work. Trying to run them currently on LUCI fails, as discussed in the PR trying to enable them. (Ignore the xvfb part of the discussion there; it's separate, and already resolved.)

For Cirrus we handled this in the Dockerfile. I tried running the same things in a script on LUCI to see what would happen, and got:

  • xdg-settings set default-web-browser ... to set default browser:
    xdg-settings: unknown desktop environment
  • xdg-mime default ... to set default file: handler:
     touch: cannot touch '/home/chrome-bot/.local/share/applications/mimeapps.list': No such file or directory
     /b/s/w/ir/cache/chrome/chrome/xdg-mime: 780: cannot create /home/chrome-bot/.local/share/applications/mimeapps.list.new: 
     Directory nonexistent
    

So the tools exist, but don't appear to work. While Docker support is one way to possibly resolve this, it would be significant overkill. All we really need to unblock this is either:

  • a way for a script to successfully set http, https, and file default handlers, or
  • some handlers for those schemes baked into the image (we don't need generic control of other handlers, and I don't foresee needing more than those three). The handlers can be literally anything, we just need g_app_info_get_default_for_uri_scheme and g_file_query_default_handler to return something when the plugin tests query for handlers.

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listpackageflutter/packages repository. See also p: labels.team-infraOwned by Infrastructure team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions