Closed Bug 1321432 Opened 3 years ago Closed 4 months ago

Intermittent test_safe_browsing_notification.py TestSafeBrowsingNotificationBar.test_notification_bar | TimeoutException: Timed out after 300.0 seconds with message: Expected target element "#main-feature" has not been found

Categories

(Testing :: Firefox UI Tests, defect)

Version 3
defect
Not set

Tracking

(firefox50 wontfix, firefox51 wontfix)

RESOLVED INCOMPLETE
mozilla53
Tracking Status
firefox50 --- wontfix
firefox51 --- wontfix

People

(Reporter: intermittent-bug-filer, Unassigned)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

Most likely a networking issue loading the target page when clicking the ignoreWarningButton.
The situation should be better now given that we bumped the timeout for page load from 30s to 300s (as part of the webdriver spec) on bug
Status: NEW → RESOLVED
Closed: 3 years ago
Depends on: 1321480
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached image screenshot.png
The problem here is an outage of itisatrap.org. I see two possible changes here:

1) Don't use the external site if possible (is there a pref to modify it to a local page) when clicking the ignore warning button.

2) Since `click` can now wait for page load (bug 1335778) we could rely on it, to get rid of the long wait time of 300s, because it would return after 5s with no page load detected.

Francois, do you have some feedback to me?

Also one thing to note is that the current page load implementation doesn't raise an error if the navigation ended up in a 404, or 500 like in this case. Andreas, is that something we should do?
Flags: needinfo?(francois)
Flags: needinfo?(ato)
(In reply to Henrik Skupin (:whimboo) from comment #5)
> The problem here is an outage of itisatrap.org. I see two possible changes
> here:
> 
> 1) Don't use the external site if possible (is there a pref to modify it to
> a local page) when clicking the ignore warning button.

We should absolutely not be using an external site in automation.  I would
consider it a bug if there is not a preference to change where you are
redirected when clicking this button.

> Also one thing to note is that the current page load implementation doesn't
> raise an error if the navigation ended up in a 404, or 500 like in this
> case. Andreas, is that something we should do?

The expected behaviour is described in
https://w3c.github.io/webdriver/webdriver-spec.html#dfn-post-navigation-checks.

In other words, we should not return errors when hitting a 404 or 500.
Flags: needinfo?(ato)
(In reply to Henrik Skupin (:whimboo) from comment #5)
> 1) Don't use the external site if possible (is there a pref to modify it to
> a local page) when clicking the ignore warning button.

There's no pref to control that URL. It's hardcoded: https://searchfox.org/mozilla-central/rev/d441cb24482c2e5448accaf07379445059937080/toolkit/components/url-classifier/SafeBrowsing.jsm#378

(In reply to Andreas Tolfsen ‹:ato› from comment #6)
> We should absolutely not be using an external site in automation.  I would
> consider it a bug if there is not a preference to change where you are
> redirected when clicking this button.

You're not really redirected to a URL. Instead you're allowed to proceed to the original URL you were going to before we showed the interstitial warning page.

Can we redirect the itisatrap.org domain to a local webserver while we run the tests?
Flags: needinfo?(francois)
(In reply to François Marier [:francois] from comment #8)
> Can we redirect the itisatrap.org domain to a local webserver while we run
> the tests?

But the entries in the safebrowsing database are hard-coded for itisatrap.org, so it won't work for locally served data. Or am I wrong on this part?
Flags: needinfo?(francois)
(In reply to Henrik Skupin (:whimboo) from comment #9)
> But the entries in the safebrowsing database are hard-coded for
> itisatrap.org, so it won't work for locally served data. Or am I wrong on
> this part?

The redirection I had in mind was at the DNS / hosts file level. i.e. making itisatrap.org resolve to 127.0.0.1
Flags: needinfo?(francois)
Sadly we don't have an easy way to do that. But do you have any hints in case other test harnesses are doing that already?
Flags: needinfo?(francois)
(In reply to Henrik Skupin (:whimboo) from comment #11)
> Sadly we don't have an easy way to do that. But do you have any hints in
> case other test harnesses are doing that already?

If we had a harness that could "redirect" that domain to 127.0.0.1, then it would just work.

Since we don't have that and there isn't an easy pref to change the hard-coded entries, we could either continue to rely on itisatrap.org (which in theory should be reliable since it's just a static site) or maybe move it to a QA-hosted server?
Flags: needinfo?(francois)
We have mozqa.com, which serves all of our test files. Several other projects make also use of it. In any case it would be a remote connection, so I don't think it will be much better than the current situation.
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → INCOMPLETE
Lets keep this bug open given that it will only fail if there is an outage of itisatrap.org.
Status: RESOLVED → REOPENED
Resolution: INCOMPLETE → ---
Summary: Intermittent test_safe_browsing_notification.py TestSafeBrowsingNotificationBar.test_notification_bar | TimeoutException: Timed out after 30.0 seconds with message: Expected target element "#main-feature" has not been found → Intermittent test_safe_browsing_notification.py TestSafeBrowsingNotificationBar.test_notification_bar | TimeoutException: Timed out after 300.0 seconds with message: Expected target element "#main-feature" has not been found
Duplicate of this bug: 1443980

We don't use itsatrap anymore. So lets close it now.

Status: REOPENED → RESOLVED
Closed: 3 years ago4 months ago
Keywords: leave-open
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.