Closed Bug 1744764 Opened 3 years ago Closed 3 years ago

Permanent toolkit/mozapps/downloads/tests/browser/browser_unknownContentType_delayedbutton.js | button was disabled - Got false, expected true when Gecko 97 merges to Beta on 2022-01-10

Categories

(Toolkit :: Downloads API, defect, P1)

defect

Tracking

()

VERIFIED FIXED
97 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox95 --- unaffected
firefox96 --- unaffected
firefox97 + verified

People

(Reporter: aryx, Assigned: Gijs)

References

(Regressed 1 open bug)

Details

Attachments

(1 file)

[task 2021-12-07T11:59:03.333Z] 11:59:03     INFO - TEST-START | toolkit/mozapps/downloads/tests/browser/browser_unknownContentType_delayedbutton.js
[task 2021-12-07T11:59:04.411Z] 11:59:04     INFO - GECKO(7286) | Waiting for browser load
[task 2021-12-07T11:59:04.411Z] 11:59:04     INFO - GECKO(7286) | Waiting for browser state change
[task 2021-12-07T11:59:04.451Z] 11:59:04     INFO - GECKO(7286) | Saw state f0001 and status 0
[task 2021-12-07T11:59:04.545Z] 11:59:04     INFO - GECKO(7286) | Saw state c0010 and status 0
[task 2021-12-07T11:59:04.545Z] 11:59:04     INFO - GECKO(7286) | Browser got expected state change http://mochi.test:8888/browser/toolkit/mozapps/downloads/tests/browser/unknownContentType_dialog_layout_data.txt
[task 2021-12-07T11:59:05.915Z] 11:59:05     INFO - GECKO(7286) | must wait for focus
[task 2021-12-07T11:59:05.951Z] 11:59:05     INFO - TEST-INFO | started process screentopng
[task 2021-12-07T11:59:06.241Z] 11:59:06     INFO - TEST-INFO | screentopng: exit 0
[task 2021-12-07T11:59:06.241Z] 11:59:06     INFO - Buffered messages logged at 11:59:03
[task 2021-12-07T11:59:06.241Z] 11:59:06     INFO - Entering test bound test_unknownContentType_delayedbutton
[task 2021-12-07T11:59:06.241Z] 11:59:06     INFO - Starting browser_unknownContentType_delayedbutton.js...
[task 2021-12-07T11:59:06.241Z] 11:59:06     INFO - Buffered messages logged at 11:59:04
[task 2021-12-07T11:59:06.242Z] 11:59:06     INFO - TEST-PASS | toolkit/mozapps/downloads/tests/browser/browser_unknownContentType_delayedbutton.js | button started disabled - 
[task 2021-12-07T11:59:06.242Z] 11:59:06     INFO - Buffered messages logged at 11:59:05
[task 2021-12-07T11:59:06.242Z] 11:59:06     INFO - TEST-PASS | toolkit/mozapps/downloads/tests/browser/browser_unknownContentType_delayedbutton.js | button was enabled - 
[task 2021-12-07T11:59:06.243Z] 11:59:06     INFO - Buffered messages finished
[task 2021-12-07T11:59:06.244Z] 11:59:06     INFO - TEST-UNEXPECTED-FAIL | toolkit/mozapps/downloads/tests/browser/browser_unknownContentType_delayedbutton.js | button was disabled - Got false, expected true
[task 2021-12-07T11:59:06.244Z] 11:59:06     INFO - Stack trace:
[task 2021-12-07T11:59:06.244Z] 11:59:06     INFO - chrome://mochikit/content/browser-test.js:test_is:1364
[task 2021-12-07T11:59:06.244Z] 11:59:06     INFO - chrome://mochitests/content/browser/toolkit/mozapps/downloads/tests/browser/browser_unknownContentType_delayedbutton.js:test_unknownContentType_delayedbutton/<:10

Bug 1053327 added the test which runs directly before (and this test doesn't run any more as the first one).

Flags: needinfo?(gijskruitbosch+bugs)

After bug 1724319 this test isn't really testing anything any more on nightly, which is how this went unnoticed.

The test code indicates it's trying to test whether the dialog appears in response to a download, but it doesn't actually do this because it waits for the window to appear before loading a URL that would cause the download to appear. It's also doing this before the registerNotification call that actually registers the window listener. So a dialog will never open during that time, which means we always just end up waiting a full second, also on beta.

I haven't yet worked out why this test now starts failing with the new test in bug 1053327 though, that's a bit of a puzzle. I'll leave needinfo for that.

Depends on: 1724319

We got also this kind of failures that can be related to this one.
Failure log: https://treeherder.mozilla.org/logviewer?job_id=360804950&repo=try&lineNumber=9855
Failure line: toolkit/mozapps/downloads/tests/browser/browser_unknownContentType_delayedbutton.js | Test timed out

We got a new failure line that I think it cat be related to this one so I'll post here some details about it.
Failure log: https://treeherder.mozilla.org/logviewer?job_id=361038466&repo=try&lineNumber=6952
Failure line: TEST-UNEXPECTED-FAIL | toolkit/mozapps/downloads/tests/browser/browser_unknownContentType_blob.js | Cleanup function threw an exception - NotAllowedError: Could not remove the file at C:\Users\task_163939746493219\AppData\Local\Temp\my-file.txt.

(In reply to Cristian Tuns from comment #6)

We got a new failure line that I think it cat be related to this one so I'll post here some details about it.
Failure log: https://treeherder.mozilla.org/logviewer?job_id=361038466&repo=try&lineNumber=6952
Failure line: TEST-UNEXPECTED-FAIL | toolkit/mozapps/downloads/tests/browser/browser_unknownContentType_blob.js | Cleanup function threw an exception - NotAllowedError: Could not remove the file at C:\Users\task_163939746493219\AppData\Local\Temp\my-file.txt.

Is this intermittent or perma-failure with these central-as-beta simulations?

Flags: needinfo?(ctuns)

It's intermittent. Compare yesterday's sim with today's.

Flags: needinfo?(ctuns)

I cannot reproduce on a local build from this morning's central, when following the instructions with --no-push in https://wiki.mozilla.org/Sheriffing/How_To/Beta_simulations#TRUNK_AS_EARLY_BETA , because configure is upset:

 0:05.09 checking bindgen cflags... -x c++ -fno-sized-deallocation -fno-aligned-new -DTRACING=1 -DIMPL_LIBXUL -DMOZILLA_INTERNAL_API -DRUST_BINDGEN -DOS_WIN=1 -DWIN32=1 -D_CRT_USE_BUILTIN_OFFSETOF -DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 -std=gnu++17
 0:05.09 Traceback (most recent call last):
 0:05.09   File "c:/dev/mozilla-unified\configure.py", line 280, in <module>
 0:05.09     sys.exit(main(sys.argv))
 0:05.09   File "c:/dev/mozilla-unified\configure.py", line 62, in main
 0:05.09     sandbox.run(os.path.join(os.path.dirname(__file__), "moz.configure"))
 0:05.09   File "c:\dev\mozilla-unified\python\mozbuild\mozbuild\configure\__init__.py", line 560, in run
 0:05.09     func(*args)
 0:05.09   File "c:\dev\mozilla-unified\python\mozbuild\mozbuild\configure\__init__.py", line 611, in _value_for
 0:05.09     return self._value_for_depends(obj)
 0:05.09   File "c:\dev\mozilla-unified\python\mozbuild\mozbuild\util.py", line 1061, in method_call
 0:05.09     cache[args] = self.func(instance, *args)
 0:05.09   File "c:\dev\mozilla-unified\python\mozbuild\mozbuild\configure\__init__.py", line 620, in _value_for_depends

 0:05.09     value = obj.result()
 0:05.09   File "c:\dev\mozilla-unified\python\mozbuild\mozbuild\util.py", line 1061, in method_call
 0:05.09     cache[args] = self.func(instance, *args)
 0:05.09   File "c:\dev\mozilla-unified\python\mozbuild\mozbuild\configure\__init__.py", line 157, in result
 0:05.09     return self._func(*resolved_args)
 0:05.09   File "c:\dev\mozilla-unified\python\mozbuild\mozbuild\configure\__init__.py", line 1289, in wrapped
 0:05.09     return new_func(*args, **kwargs)
 0:05.09   File "c:/dev/mozilla-unified/js/moz.configure", line 1237, in <lambda>
 0:05.09     depends(js_version)(lambda x: x.version[-2] if x.version[-2] in "ab" else None),
 0:05.09 TypeError: 'in <string>' requires string as left operand, not int
Error running mach:

    ['build']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file build| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

Exception: Process executed with non-0 exit code 1: ['c:/dev/builds/opt\\_virtualenvs\\build\\Scripts\\python.exe', 'c:/dev/mozilla-unified\\configure.py']

  File "c:\dev\mozilla-unified\python/mozbuild/mozbuild/build_commands.py", line 229, in build
    append_env=append_env,
  File "c:\dev\mozilla-unified\python\mozbuild\mozbuild\controller\building.py", line 1300, in build
    append_env=append_env,
  File "c:\dev\mozilla-unified\python\mozbuild\mozbuild\controller\building.py", line 1680, in configure
    append_env=append_env,
  File "c:\dev\mozilla-unified\python\mozbuild\mozbuild\base.py", line 855, in _run_command_in_objdir
    return self.run_process(cwd=self.topobjdir, **args)
  File "c:\dev\mozilla-unified\python\mach\mach\mixin\process.py", line 176, in run_process
    "Process executed with non-0 exit code %d: %s" % (status, args)

Any idea what that's about?

Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(aryx.bugmail)

I also tried reproducing on normal nightly with just --setpref for the downloads pref, but that seems to pass on my local machine, also when running the entire directory.

I then tried downloading target.zip from https://treeherder.mozilla.org/jobs?repo=try&group_state=expanded&selectedTaskRun=avYwwJBbTOi8-neGIuizkw.0&revision=d1e14cda240be63237176c4a24fe9efa5563354b&searchStr=build%2Cwin and run with --appname, but that doesn't work because those bundles don't have an xpcshell binary, so you get:

JavaScript error: c:\dev\builds\opt\dist\bin\components\httpd.js, line 54: NS_ERROR_FILE_NOT_FOUND:

I'm a little unsure how to make progress at this point. :-\

Finally managed to reproduce after hardcoding a different value into StaticPrefList.yaml.

Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Flags: needinfo?(aryx.bugmail)

Hi, the patch seems to be working, no more failures in the most recent beta-sim

Severity: -- → S4
Priority: -- → P1
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/baa6a51c8957 fix browser_unknownContentType_blob.js and friends to test the same things on beta and nightly, irrespective of the downloads improvement pref, r=mak
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
Regressions: 1747285

Verified fixed in today's central as early beta simulation.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: