Skip to content

Conversation

@ling0x
Copy link
Contributor

@ling0x ling0x commented Dec 7, 2025

Fixes #276

@Sytten
Copy link
Collaborator

Sytten commented Dec 7, 2025

Thanks, same comment as for the other PR. Aiming to add test today.

@Sytten
Copy link
Collaborator

Sytten commented Dec 7, 2025

For some reason the flag is not working on linux

@ling0x
Copy link
Contributor Author

ling0x commented Dec 8, 2025

For some reason the flag is not working on linux

When Chrome receives two separate --disable-features flags, it applies only the last --disable-features flag it sees (here HttpsFirstBalancedModeAutoEnable), so HttpsUpgrades stays enabled. Both features must therefore be passed in a single comma-separated --disable-features value

@Sytten
Copy link
Collaborator

Sytten commented Dec 8, 2025

I reverted that and tested with the single value and still didnt work so there is probably more. It does work on macos and on chromium on Linux from my testing. It might be the default browser it decides to use on GHA doesn't support the flag? We should probably supply the one we want to use for testing. I just launched a run, you will see.

This is interesting to know though since that means we need to start accumulating those in vec. We should expose a disable_feature api so the user can disable further features.

@ling0x
Copy link
Contributor Author

ling0x commented Dec 8, 2025

Interesting - the test passes locally but fails in CI. I'll look into it further tomorrow.
image

@ling0x
Copy link
Contributor Author

ling0x commented Dec 10, 2025

Tested this in an act Docker container simulating the CI workflow locally (using command act -j test-integration --container-options "--network=host"), tried several approaches, and the CI job still fails while the tests pass on the local machine (I'm using archlinux btw).

Specifically:

  1. Set the Chrome version in CI explicitly (both latest and 143, which runs successfully locally).
  2. Switched between headless and headed modes.
  3. Enabled the --no-sandbox flag.

Despite these changes, the tests continue to fail in CI but pass when run locally.

Example GHA:

  test-integration:
    name: Test Integration
    needs: [fmt, clippy, msrv]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable
      
      - name: Setup Chrome
        uses: browser-actions/setup-chrome@v2
        with:
          chrome-version: latest
        id: setup-chrome
      
      - name: Set CHROME_BIN
        run: echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV
      
      - name: Install Xvfb (virtual display for headed mode)
        run: sudo apt-get update && sudo apt-get install -y xvfb
      
      - name: Run integration tests with headed Chrome
        run: xvfb-run -a bash -c "RUST_TEST_THREADS=1 cargo test --test '*'"

Alternative solution:

If the goal is simply to get the test passing, we can switch to http://neverssl.com as the test url, which already passes when running under the local act Docker CI simulation. Since this setup is known to work locally but not in the hosted CI environment, the remaining differences are likely due to stricter or different network/security conditions in CI.

@Sytten Sytten merged commit c671c3b into mattsse:main Dec 16, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add options to disable Https first features

2 participants