After adding a new language with the command "yo jhipster:langaugues", I get the following error with grunt test. Those errors are at bower_components which I already exclude from the project on Intellij Idea. Is something I didn't do it right or a problem within JHister?
C:\Users\me/projects/myapp>grunt test
Running "clean:server" (clean) task
>> 0 paths cleaned.
Running "wiredep:test" (wiredep) task
Running "ngconstant:dev" (ngconstant) task
Creating module yellowflowApp at src/main/webapp/scripts/app/app.constants.js...OK
Running "karma:unit" (karma) task
INFO [karma]: Karma v0.12.35 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.8 (Windows 7 0.0.0)]: Connected on socket FPQ9_PnLvN3UNXN4CjH4 with id 99835325
PhantomJS 1.9.8 (Windows 7 0.0.0): Executed 14 of 21 SUCCESS (0 secs / 0.155 secs)
PhantomJS 1.9.8 (Windows 7 0.0.0) Directive Tests Password strength Should display the password strength bar FAILED
Error: Unexpected request: GET i18n/zh-cn/global.json
Expected GET i18n/en/global.json
at $httpBackend (C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular-mocks/angular-mocks.js:1212)
at sendReq (C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:10233)
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:9944
at processQueue (C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:14454)
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:14470
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:15719
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:15530
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular-mocks/angular-mocks.js:1510
at C:/Users/me/projects/myapp/src/test/javascript/spec/app/account/password/password.directive.spec.js:27
PhantomJS 1.9.8 (Windows 7 0.0.0) Directive Tests Password strength Should change the first 2 points of the strength bar FAILED
Error: Unexpected request: GET i18n/zh-cn/global.json
Expected GET i18n/en/global.json
at $httpBackend (C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular-mocks/angular-mocks.js:1212)
at sendReq (C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:10233)
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:9944
at processQueue (C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:14454)
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:14470
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:15719
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:15530
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:15824
at C:/Users/me/projects/myapp/src/test/javascript/spec/app/account/password/password.directive.spec.js:41
Error: [$rootScope:inprog] $digest already in progress
http://errors.angularjs.org/1.4.0/$rootScope/inprog?p0=%24digest
at beginPhase (C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:16073)
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:15510
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular-mocks/angular-mocks.js:1510
at C:/Users/me/projects/myapp/src/test/javascript/spec/app/account/password/password.directive.spec.js:27
PhantomJS 1.9.8 (Windows 7 0.0.0) Directive Tests Password strength Should change the first 4 points of the strength bar FAILED
Error: Unexpected request: GET i18n/zh-cn/global.json
Expected GET i18n/en/global.json
at $httpBackend (C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular-mocks/angular-mocks.js:1212)
at sendReq (C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:10233)
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:9944
at processQueue (C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:14454)
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:14470
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:15719
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:15530
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:15824
at C:/Users/me/projects/myapp/src/test/javascript/spec/app/account/password/password.directive.spec.js:56
Error: [$rootScope:inprog] $digest already in progress
http://errors.angularjs.org/1.4.0/$rootScope/inprog?p0=%24digest
at beginPhase (C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:16073)
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:15510
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular-mocks/angular-mocks.js:1510
at C:/Users/me/projects/myapp/src/test/javascript/spec/app/account/password/password.directive.spec.js:27
PhantomJS 1.9.8 (Windows 7 0.0.0) Services Tests Auth should call LocalStorageService.clearAll on logout FAILED
Error: Unexpected request: GET i18n/zh-cn/global.json
Expected GET i18n/en/global.json
at $httpBackend (C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular-mocks/angular-mocks.js:1212)
at sendReq (C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:10233)
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:9944
at processQueue (C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:14454)
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:14470
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:15719
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:15530
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular-mocks/angular-mocks.js:1510
at C:/Users/me/projects/myapp/src/test/javascript/spec/components/auth/auth.services.spec.js:39
Error: [$rootScope:inprog] $digest already in progress
http://errors.angularjs.org/1.4.0/$rootScope/inprog?p0=%24digest
at beginPhase (C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:16073)
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular/angular.js:15510
at C:/Users/me/projects/myapp/src/main/webapp/bower_components/angular-mocks/angular-mocks.js:1542
at C:/Users/me/projects/myapp/src/test/javascript/spec/components/auth/auth.services.spec.js:27
PhantomJS 1.9.8 (Windows 7 0.0.0): Executed 21 of 21 (4 FAILED) (0.282 secs / 0.256 secs)
Warning: Task "karma:unit" failed. Use --force to continue.
Aborted due to warnings.
Execution Time (2015-07-16 18:04:35 UTC)
wiredep:test 3.8s █████████████████████ 23%
karma:unit 12.6s ███████████████████████████████████████████████████████████████████ 76%
Total 16.5s
For recent versions of jHipster this problem should not be occurring anymore, because there is now a regular expression that does not take into account the language in the path.
For older versions though, if you changed the default language then you must adapt password.directive.spec.js and auth.services.spec.js in order to expect the (now different) default language. Those lines are similar to this:
$httpBackend.expectGET('i18n/en/global.json').respond({});
(Notice "/en/" in the path, that part is the one that should match the current default language).
Related
I am trying to run glxgears or glxinfo from a server and I am receiving the following error:
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 149 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 25
Current serial number in output stream: 26
My server is a Linux server and my local machine is OS X. However, I have tried running the same thing on a Linux machine and I am receiving the same error. I can run xeyes and xclock on the server and see the window pop up locally. If I saw nothing then I would think XForwading wasn't working at all, but since xeyes and xclock work then I am not sure what is going on.
What could be causing the BadValue (integer parameter out of range for operation) error?
In order to fix this issue I downgraded Xquartz from 2.7.11 to 2.7.8. For some reason the newer version of Xquartz doesnt work...
I am trying to run tests with Travis CI, but I am getting:
Module not found: Error: Cannot resolve 'file' or 'directory' ../api/Seminar in ...
I do not see this error on my local machine (Mac).
The Node version of Travis and my Mac are identical:
node v7.1.0
npm v3.10.9
Here is a larger dump of the error:
ERROR in ./~/isparta-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/UpcomingSeminars.vue
Module not found: Error: Cannot resolve 'file' or 'directory' ../api/Seminar in /home/travis/build/tam5/my-app/src/components
# ./~/isparta-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/UpcomingSeminars.vue 9:786-813
14 11 2016 19:50:54.546:INFO [karma]: Karma v1.3.0 server started at http://localhost:9876/
14 11 2016 19:50:54.548:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency
14 11 2016 19:50:54.554:INFO [launcher]: Starting browser PhantomJS
14 11 2016 19:50:54.922:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket /#IMyChahiZWxdaUeTAAAA with id 80626811
PhantomJS 2.1.1 (Linux 0.0.0) ERROR
Error: Cannot find module "../api/Seminar"
at webpack:///src/components/UpcomingSeminars.vue?4396:9:0 <- index.js:26609
Here is my entire .travis.yml:
language: node_js
node_js:
- "7"
- "6"
How can I fix this to run on Travis as well?
I currently starting to learn angular (v2) and wanted to get into testing.
After some unsuccessful tries in my first project, I cloned the official quickstart repo from here:
https://github.com/angular/quickstart
and tried to launch the tests there with:
npm test
Sometimes the tests work as expected, but sometimes I get a strange error:
[1] Missing error handler on `socket`.
[1] TypeError: Cannot set property '60946738' of null
I've found several hints with a similar error (the socket part) but with (msg || "").replace is not a function on the next line. This error seems to be different.
From the console output I see that the tests are actually run. Looks like the error occurs right after the tests (the one test failing is actually expected, as I intentionally changed the smoke test to make the test fail). Apart from this test I changed nothing to the project.
I'm under the impression, that the error occurs more frequently with failing tests (but this could be totally unrelated).
Any idea what's wrong?
A larger part of the console output:
[1] 26 09 2016 15:47:03.221:WARN [web-server]: 404: /base/systemjs.config.extras.js
[1] Chrome 53.0.2785 (Windows 10 0.0.0) LOG: 'WARNING: System.import could not load "systemjs.config.extras.js"; continuing without it.'
[1]
[1] Chrome 53.0.2785 (Windows 10 0.0.0) LOG: Error{originalErr: Error{}}
[1]
Chrome 53.0.2785 (Windows 10 0.0.0) Smoke test should run a passing test FAILED
[1] Expected true to equal false, 'should pass'.
Chrome 53.0.2785 (Windows 10 0.0.0): Executed 3 of 3 (1 FAILED) (0.109 secs / 0.1 secs)
[1] 26 09 2016 15:47:03.732:WARN [web-server]: 404: /base/systemjs.config.extras.js
[1] Chrome 53.0.2785 (Windows 10 0.0.0) LOG: 'WARNING: System.import could not load "systemjs.config.extras.js"; continuing without it.'
[1]
[1] Chrome 53.0.2785 (Windows 10 0.0.0) LOG: Error{originalErr: Error{}}
[1]
Chrome 53.0.2785 (Windows 10 0.0.0): Executed 0 of 3 SUCCESS (0 secs / 0 secs)
[1] Missing error handler on `socket`.
[1] TypeError: Cannot set property '60946738' of null
[1] at createHtmlResults (C:\Users\username\Documents\Projekte\cc-dashboard-qs\cc-dashboard-qs\node_modules\karma-htmlfile-reporter\index.js:57:32)
[1] at initializeHtmlForBrowser (C:\Users\username\Documents\Projekte\cc-dashboard-qs\cc-dashboard-qs\node_modules\karma-htmlfile-reporter\index.js:78:5)
[1] at HTMLReporter.onBrowserStart (C:\Users\username\Documents\Projekte\cc-dashboard-qs\cc-dashboard-qs\node_modules\karma-htmlfile-reporter\index.js:91:5)
[1] at Server.<anonymous> (C:\Users\username\Documents\Projekte\cc-dashboard-qs\cc-dashboard-qs\node_modules\karma\lib\events.js:13:22)
[1] at emitTwo (events.js:111:20)
[1] at Server.emit (events.js:191:7)
[1] at Browser.onStart (C:\Users\username\Documents\Projekte\cc-dashboard-qs\cc-dashboard-qs\node_modules\karma\lib\browser.js:126:13)
I have a shell script to register the node machine to hub at startup.
The script contains:
java -jar ~/selenium/selenium-server.jar -role node -hub http://HUB_IP:4444/grid/register -browser browserName="firefox",maxInstances=5,Platform="LINUX",applicationName="VM_NAME" -browser browserName="chrome",maxInstances=5,Platform="LINUX",applicationName="VM_NAME" -Dwebdriver.chrome.driver=~/selenium/chromedriver
The script starts fine in the startup and even the node gets registered to hub, but, when I start a job from Jenkins its gives below error in case of Firefox:
FAILED CONFIGURATION: #BeforeClass setup
org.openqa.selenium.WebDriverException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
Error: no display specified
When I start a job from Jenkins its gives below error in case of Chrome:
FAILED CONFIGURATION: #BeforeClass setup
org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.20.353124 (035346203162d32c80f1dce587c8154a1efa0c3b),platform=Linux 3.13.0-68-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Note:
1. Using later version of chrome, firefox & Selenium jar files
2. When the script is run manually, everything works fine.
3. Start up batch file in windows works fine without any problem.
I am using karma, jasmine and phantomjs for my project and when I am executing start karma; I am getting following error:
PhantomJS 1.9.7 (Linux) View:: Login guestRegistration Should call the guestRegistration event when btn-grey is clicked FAILED
ReferenceError: Can't find variable: loadFixtures
at /apps/devops/jenkins/home/jobs/UIMod-Jasmine-Karma/workspace/WebContent/test/javascript/spec/login.view.spec.js:84
ReferenceError: Can't find variable: spyOnEvent
at /apps/devops/jenkins/home/jobs/UIMod-Jasmine-Karma/workspace/WebContent/test/javascript/spec/login.view.spec.js:89
PhantomJS 1.9.7 (Linux) View:: Login Check for blur event Should call the checkElementToValidate event when username is blurred FAILED
ReferenceError: Can't find variable: readFixtures
at /apps/devops/jenkins/home/jobs/UIMod-Jasmine-Karma/workspace/WebContent/test/javascript/spec/login.view.spec.js:103
ReferenceError: Can't find variable: spyOnEvent
at /apps/devops/jenkins/home/jobs/UIMod-Jasmine-Karma/workspace/WebContent/test/javascript/spec/login.view.spec.js:112
PhantomJS 1.9.7 (Linux) View:: Login Check for blur event Should call the checkElementToValidate event when username is blurred FAILED
ReferenceError: Can't find variable: readFixtures
at /apps/devops/jenkins/home/jobs/UIMod-Jasmine-Karma/workspace/WebContent/test/javascript/spec/login.view.spec.js:103
ReferenceError: Can't find variable: spyOnEvent
at /apps/devops/jenkins/home/jobs/UIMod-Jasmine-Karma/workspace/WebContent/test/javascript/spec/login.view.spec.js:123
PhantomJS 1.9.7 (Linux) View:: Login Check for blur event Should call the addLoginInputPlaceholder event when login-input is blurred FAILED
ReferenceError: Can't find variable: readFixtures
at /apps/devops/jenkins/home/jobs/UIMod-Jasmine-Karma/workspace/WebContent/test/javascript/spec/login.view.spec.js:103
ReferenceError: Can't find variable: spyOnEvent
at /apps/devops/jenkins/home/jobs/UIMod-Jasmine-Karma/workspace/WebContent/test/javascript/spec/login.view.spec.js:133
PhantomJS 1.9.7 (Linux) View:: Login Check for focus event Should call the addLoginInputPlaceholder event when login-input is focussed FAILED
ReferenceError: Can't find variable: readFixtures
at /apps/devops/jenkins/home/jobs/UIMod-Jasmine-Karma/workspace/WebContent/test/javascript/spec/login.view.spec.js:146
ReferenceError: Can't find variable: spyOnEvent
at /apps/devops/jenkins/home/jobs/UIMod-Jasmine-Karma/workspace/WebContent/test/javascript/spec/login.view.spec.js:154
PhantomJS 1.9.7 (Linux) View:: Login Check whether sendFormdata() triggers submit form Should trigger the submit:form method atleast once FAILED
ReferenceError: Can't find variable: sinon
at /apps/devops/jenkins/home/jobs/UIMod-Jasmine-Karma/workspace/WebContent/test/javascript/spec/login.view.spec.js:231
PhantomJS 1.9.7 (Linux) ERROR
SyntaxError: Unable to parse JSON string
at /apps/devops/jenkins/home/jobs/UIMod-Jasmine-Karma/workspace/WebContent/js/controllers/common/base.controller.js:107
PhantomJS 1.9.7 (Linux): Executed 21 of 38 (6 FAILED) ERROR (2.36 secs / 1.854 secs)
The error is can't find variable loadFixture. Can anyone tell me what is the reason behind this error?
It seems like you're using jasmine-jquery. First make sure you install it with npm. Can you also make sure that your karma.conf.js has a similar entry:
frameworks: ['jasmine-jquery', 'jasmine']
The order of the frameworks matters.