Protractor can't sync with AngularJS' apps using window.name for deferred bootstrap
Bug report
- Node Version:
14.16.1 - Protractor Version:
7.0.0 - Angular Version:
1.8.2 - Browser(s):
Firefox 86 - Operating System and Version
macOS Catalina
Error output
[17:04:38] E/protractor - Could not find Angular on page http://127.0.0.1:8402/:
angular never provided resumeBootstrap
Additional Information
AngularJS Deferred Bootstrap documentation: https://docs.angularjs.org/guide/bootstrap#deferred-bootstrap
There are a couple of temporary workarounds here: https://github.com/angular/angular.js/issues/17117#issuecomment-789023019
In https://bugzilla.mozilla.org/show_bug.cgi?id=1700931, Firefox said that clearing the window.name on cross-origin navigation will continue and the flag to disable it will be removed at some point.
The following long-known AngularJS/Protractor issues are related to window.name being cleared on iOS and macOS:
- Safari security fix broke
window.nameusage here: https://github.com/angular/protractor/issues/4004 - Appium doesn't support this
window.namesetting either: https://github.com/angular/protractor/issues/2840
Additionally, Chromium is getting closer to shipping the clearing of window.name in a beta:
https://groups.google.com/a/chromium.org/g/blink-dev/c/86VeIi5sZzc/m/CVJadvpqAQAJ
As this feature is a synchronization of both AngularJS and Protractor, a solution would likely need to involve both. That's why this issue exists in addition to https://github.com/angular/angular.js/issues/17117, which requests a fix for this during the AngularJS LTS period (prior to the end of December 2021).