Closed Bug 1921330 Opened 2 months ago Closed 2 months ago

Startup failure when running `mach jstestbrowser`: MOZ_RELEASE_ASSERT(IsInAutomation())

Categories

(Testing :: General, defect)

Firefox 132
x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1839769

People

(Reporter: sfink, Unassigned)

References

Details

Attachments

(1 file)

It doesn't always happen, but usually (4 of 6 runs) when I run MOZ_DISABLE_NONLOCAL_CONNECTIONS=0 mach jstestbrowser I get the above error message. I will attach a log. (The environment variable is to avoid bug 1839769)

so why is jstestbrowser failing the isInAutomation() check, especially intermittently. I believe the pref needs to be set:
https://searchfox.org/mozilla-central/search?q=turn_off_all_security_so_that_viruses_can_take_over_this_computer&path=&case=false&regexp=false

The crashing function is being called from SpecialPowers. Why can you only use SpecialPowers in automation? How does any testing work locally if that's a restriction? I'm confused.

Oh, ok. So I guess mach jstestbrowser should be setting that? I'll try running with that setting.

so specialpowers does a lot of things that would violate security, and it should work with ./mach test ... because we set the preference. I am not sure what jstestbrowser does for a profile or environment vars.

Huh, I see a file that looks like it's trying to set it. I guess it's not being loaded or something.

(My guess is that mozharness is setting it in automation.)

MOZ_DISABLE_NONLOCAL_CONNECTIONS=0 mach jstestbrowser --setpref security.turn_off_all_security_so_that_viruses_can_take_over_this_computer=1

still crashes with the assert.

Hm. I'm getting confused by the load sequencing, but it looks like this might be entirely caused by bug 1839769: if MOZ_DISABLE_NONLOCAL_CONNECTIONS is set to 0, then it just skips looking at the IsInAutomation() pref entirely.

Status: NEW → RESOLVED
Closed: 2 months ago
Duplicate of bug: 1839769
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: