protractor appears to interrupt Node when run against Firefox - node.js

Background: I am running tests in the Protractor framework against a website written in Angular using Firefox as the browser
The website initially loads with a Server-side render. The follow-up client-side render appears to get interrupted. Angular is available, but nothing in the Dom loads.
Asking Google hasn't helped(none of the Stackoverflow results appeared to be relevant). Didn't see any open issues or closed issues on the Protractor github which appeared to be relevant
I'm not sure what's relevant to the investigation, so starting information:
Firefox version: 65
geckodriver version: v0.24.0 [last]
protractor version: 5.4.1
framework: jasmine
directconnect = true
Has anyone resolved this issue before? Is there additional information which would be relevant. What have I missed? The same tests running against Chrome pass without issue

Related

Nextjs project stopped working locally all of a sudden

I have been working on a nextjs project locally as I usually do, but all of a sudden, the website stopped working on localhost!
I kept getting this error in the console:
crbug/1173575, non-JS module files deprecated.
System and libraries versions:
OS: Ubuntu 18.04
Node: 14.15.1
Nextjs: 9.5.2
Chrome: 92.0.4515.131 (Official Build) (64-bit)
Firefox: 90.0.2 (64-bit)
start script: NODE_ENV=development node server.js
I have witnessed the same issue on both chrome and Firefox.
I have seen a lot of solutions for this problem, but nothing worked.
After a little debugging and commenting out many parts of the code, I managed to locate the issue.
Basically, it occurs on the backend; not the frontend.
There was an infinite loop that kept responses stuck. Fixing that issue, solved it for me.

Angular generated project is failing default tests [duplicate]

After upgrading to Angular version 11, unit tests now fail on Travis CI. Locally they do succeed (even after clean install with the same node, nvm and npm versions).
The error for all unit tests is the same -
Failed: fn.bind is not a function
TypeError: fn.bind is not a function
at newTrustedFunctionForJIT (node_modules/#angular/compiler/fesm2015/compiler.js:6845:1)
at JitEvaluator.evaluateCode (node_modules/#angular/compiler/fesm2015/compiler.js:6909:1)
at JitEvaluator.evaluateStatements (node_modules/#angular/compiler/fesm2015/compiler.js:6883:1)
Based on the error message, I would assume that the issue might be related to ngcc? Anyone had similar issue?
Today I had the same problem. It involved testing with ChromeHeadless.
I had old version of Chrome Headless 83.0.4103.97 installed in docker image. After updating it to latest version 88.0.4324.96 it started to work.
Additional here is the corresponding angular github issue.
Using Chrome >= 87 should fix the issue.

NodeJS does not work after uprading from version 8.11.1

I decided to upgrade my version of nodejs from 8.11.1 to 10.15.3. I am running on Windows 10 so I downloaded v10.15.3-x64.msi file. I created a brand new Angular application from "ng new" command and I got the "HTTP ERROR 400" page with no error in the console.
I have cleared the cache, reboot the system and nothing helps. When I will go back to node JS version 8.11.1 everything starts to work again. The newest version of nodejs v11.11.0-x86.msi also doesn't work for me.
How this can happen and how can I get any information what is going on?
EDIT: this is not a duplication of any existing topics about upgrading NodeJS, because the new version is seen by the system and all components - see the console result in the screenshot I provided. After upgrading the NodeJs all my solutions based on that technology stoped working showing HTTP Error 400 page. After degrading to v8 everything starts working again.
The problem came back when I had to install newer version of node (12.14.1), so this time it worked. Additionally I deleted folders that prompted from runnig where npm command after deleting an old version.

Protractor 2.28 - headless Chrome 57 - linux - tests failed

I am trying to run protractor tests with jenkins, but I couldn't get it working.
The tests are started but all fails with one of the following exceptions:
from unknown error: page could not be found: chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html
(Session info: content shell=)
(Driver info: chromedriver=2.28.455506 (18f6627e265f442aeec9b6661a49fe819aeeea1f),platform=Linux 4.4.0-22-generic x86_64)
or
Failed: Error while waiting for Protractor to sync with the page: "window.angular is undefined. This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping. See http://git.io/v4gXM for details"
The mentioned git issue doesn't help me.
All of them are running well local on a windows 10 machine.
The used versions local and on with jenkins are:
protractor: 5.1.1
chrome: 57.*
chromedriver: 2.28
I have found some issues that chrome should be downgraded to version 55.* but the all didn't solve my problem.
Thank you in advance
It says window.angular is undefined.
I assume it is not an angular site.
Have you tried entering
Browser.ignoreSynchronization = true
Before you get the browser.

running Karma in grunt with IE launcher in Linux box

We're creating a Linux build box for an angular and node application, we have setup grunt to run unit tests against 3 browsers (IE, Chrome and FF).
Now that we're automating the build, we won't be able to run unit tests against IE.
I've read Karma docs and I've learned about PhantomJS, but from what I read it is build on webkit which is chrome.
Searching the internet gave me no answer to my questions:
1. Is PhantomJS sufficient to cover IE, chrome and FF? because it seems the only straight forward solution I got from Karma.
2. Is there any way I can run karma unit tests on IE in a Linux box? it seems like a common requirement but I'm surprised I found no answer.
I've installed GNOME on the build box to try to get at least Chrome and FF covered, but the problem was that if I run the grunt build from a terminal (ie. Putty) it won't launch Chrome or FF, I have to log in from the GUI to be able to launch the browsers through Karma.
I've also tried to install wine to install IE on the build box, but it installed only IE6!! :)
Our team is relatively new to NodeJs and Angular, how would you setup your build box and how would you cover unit tests in IE??
We ended up removing IE tests in Linux, but we run them in our windows dev boxes, and kept only Chrome and FF which are both working.

Resources