I have a stage in GitLab where I test dev commit for valid
I use gitlab-runner in docker and in runner I use docker for docker
My stage:
test-dev:
stage: test
image: docker:19.03.12
services:
- docker:dind
script:
- apk add --update npm
- docker run --rm -d --name=browser_$CI_JOB_ID -p 4444:4444 -p 7900:7900 --shm-size="2g" selenium/standalone-chrome
- npx mocha tests/js/screenshots-* --timeout 50000
- npx playwright test tests/js/pw_*
- php artisan test
- docker stop browser_$CI_JOB_ID
And I have next output in failure job:
$ npx mocha tests/js/screenshots-* --timeout 50000
[INFO] Searching for WebDriver executables installed on the current system...
[INFO] ... located chrome
[INFO] Running tests against [chrome]
[chrome]
Instagram screenshots
1) "before all" hook for "Instagram Back to list"
2) "after all" hook for "Instagram Emoji in comments scrolling"
[chrome]
Дополнительные НЕскриншот тесты
3) "before all" hook for "Подсветка логина во всплывашке"
4) "after all" hook for "Подсветка логина во всплывашке"
[chrome]
TikTok screenshots
5) "before all" hook for "Back to list"
6) "after all" hook for "HINT: Here are the main indicators of the channel"
[chrome]
Youtube screenshots
7) "before all" hook for "Back to list"
8) "after all" hook for "HINT: Here are the main indicators of the channel"
0 passing (214ms)
8 failing
1) [chrome]
Instagram screenshots
"before all" hook for "Instagram Back to list":
Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
at ClientRequest.<anonymous> (node_modules/selenium-webdriver/http/index.js:295:15)
at Socket.socketErrorListener (_http_client.js:427:9)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
2) [chrome]
Instagram screenshots
"after all" hook for "Instagram Emoji in comments scrolling":
TypeError: Cannot read property 'quit' of undefined
at Context.<anonymous> (tests/js/screenshots-instagram.spec.js:33:40)
at processImmediate (internal/timers.js:461:21)
3) [chrome]
Дополнительные НЕскриншот тесты
"before all" hook for "Подсветка логина во всплывашке":
Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
at ClientRequest.<anonymous> (node_modules/selenium-webdriver/http/index.js:295:15)
at Socket.socketErrorListener (_http_client.js:427:9)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
4) [chrome]
Дополнительные НЕскриншот тесты
"after all" hook for "Подсветка логина во всплывашке":
TypeError: Cannot read property 'quit' of undefined
at Context.<anonymous> (tests/js/screenshots-nonscreen_instagram.spec.js:33:40)
at processImmediate (internal/timers.js:461:21)
5) [chrome]
TikTok screenshots
"before all" hook for "Back to list":
Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
at ClientRequest.<anonymous> (node_modules/selenium-webdriver/http/index.js:295:15)
at Socket.socketErrorListener (_http_client.js:427:9)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
6) [chrome]
TikTok screenshots
"after all" hook for "HINT: Here are the main indicators of the channel":
TypeError: Cannot read property 'quit' of undefined
at Context.<anonymous> (tests/js/screenshots-tiktok.spec.js:32:40)
at processImmediate (internal/timers.js:461:21)
7) [chrome]
Youtube screenshots
"before all" hook for "Back to list":
Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
at ClientRequest.<anonymous> (node_modules/selenium-webdriver/http/index.js:295:15)
at Socket.socketErrorListener (_http_client.js:427:9)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
8) [chrome]
Youtube screenshots
"after all" hook for "HINT: Here are the main indicators of the channel":
TypeError: Cannot read property 'quit' of undefined
at Context.<anonymous> (tests/js/screenshots-youtube.spec.js:32:40)
at processImmediate (internal/timers.js:461:21)
How I can share network between containers for npx mocha test?
And why is it waiting for a response from localhost?
Related
I created some VueJS test and run with Cypress.
Everything is OK until I run it on Jenkins (with a GitHub hook trigger for GITScm polling)
Only cypress run --browser chrome and cypress run --browser electron work.
With Edge and Firefox, it returned this kind of error
Still waiting to connect to Edge, retrying in 1 second (attempt 62/62)
Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 50 seconds.
This usually indicates there was a problem opening the Edge browser.
The CDP port requested was 63444.
Error: connect ECONNREFUSED 127.0.0.1:63444
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1157:16)
Error: Command failed with exit code 1: npm run cypress:run
at makeError (C:\ProgramData\Jenkins\.jenkins\workspace\Homepage\node_modules\start-server-and-test\node_modules\execa\lib\error.js:60:11)
at handlePromise (C:\ProgramData\Jenkins\.jenkins\workspace\Homepage\node_modules\start-server-and-test\node_modules\execa\index.js:118:26)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
shortMessage: 'Command failed with exit code 1: npm run cypress:run',
command: 'npm run cypress:run',
escapedCommand: '"npm run cypress:run"',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: undefined,
stderr: undefined,
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}
How can I run it normally in Jenkins? Thanks in advance.
I am trying to install the package "react-native-webrtc" but getting this error (yarn install react-native-webrtc --verbose):
react-native-webrtc
verbose 189.970120017 Error: /Users/samwin/dev/MobileAgent/node_modules/react-native-webrtc: Command failed.
Exit code: 1
Command: node tools/downloadWebRTC.js
Arguments:
Directory: /Users/samwin/dev/MobileAgent/node_modules/react-native-webrtc
Output:
Downloading https://github.com/jitsi/webrtc/releases/download/v100.0.0/WebRTC.xcframework.tgz...
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^
Error: connect ECONNREFUSED 185.199.108.133:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '185.199.108.133',
port: 443
}
at ProcessTermError.ExtendableBuiltin (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:721:66)
at ProcessTermError.MessageError (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:750:123)
at new ProcessTermError (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:790:113)
at ChildProcess.<anonymous> (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:25884:17)
at ChildProcess.emit (node:events:390:28)
at maybeClose (node:internal/child_process:1064:16)
at Socket.<anonymous> (node:internal/child_process:450:11)
at Socket.emit (node:events:390:28)
at Pipe.<anonymous> (node:net:687:12)
error /Users/samwin/dev/MobileAgent/node_modules/react-native-webrtc: Command failed.
Exit code: 1
Command: node tools/downloadWebRTC.js
Arguments:
Directory: /Users/samwin/dev/MobileAgent/node_modules/react-native-webrtc
Output:
Downloading https://github.com/jitsi/webrtc/releases/download/v100.0.0/WebRTC.xcframework.tgz...
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^
Error: connect ECONNREFUSED 185.199.108.133:443
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
The folder react-native-webrtc exists in node_modules, but when I try to build the app in Xcode, then it throws error like described here.
BTW: I can download the file when opening the url in the browser.
Is there any solution for this issue?
My solution was to download the .tgz file manually (which should be done actually in tools/downloadWebRTC.js) and extracted it to corresponding location. Now the Xcode build works fine.
When I'm trying to run iOS scripts the Appium server is running but just shows listener started on 0.0.0.0:4723. I don't know where the error is ?
Appium: Server is not running
AlexHacki- Downloads % appium --base-path /wd/hub
[Appium] Welcome to Appium v1.23.0
[Appium] Appium REST http interface listener started on 0.0.0.0:4723.
Capabilities for iOS
capabilities: {
platformName: 'iOS',
deviceName: 'iPhone',
app: '/Users/Documents/iOSTest.ipa',
automationName: 'XCUITest',
platformVersion: '15.4',
noReset: true,
formFactor: 'MOBILE'
},
Error: After running the script
022-06-09T07:00:00.296Z INFO #wdio/local-runner: Run worker command: run
2022-06-09T07:00:00.607Z DEBUG #wdio/config:utils: Found 'ts-node' package, auto-compiling TypeScript files
2022-06-09T07:00:00.979Z DEBUG #wdio/local-runner:utils: init multiremote session
2022-06-09T07:00:00.984Z ERROR #wdio/runner: Error: Required option "capabilities" is missing
at validateConfig (/Users/alex/Documents//__tests__/appium/node_modules/#wdio/config/build/utils.js:53:19)
at remote (/Users/alex/Documents/node_modules/webdriverio/build/index.js:58:48)
at /Users/alex/Documents/webdriverio/build/index.js:139:51
at Array.map (<anonymous>)
at multiremote (/Users/alex/Documents/node_modules//webdriverio/build/index.js:138:36)
at initialiseInstance (/Users/alex/Documents/node_modules/#wdio/runner/build/utils.js:73:57)
at Runner._startSession (/Users/alex/Documents/appium/node_modules/#wdio/runner/build/index.js:223:93)
at Runner._initSession (/Users/alex/Documents/appium/node_modules/#wdio/runner/build/index.js:176:36)
at Runner.run (/Users/alex/Documents/appium/node_modules/#wdio/runner/build/index.js:88:30)
2022-06-09T07:00:13.403Z DEBUG #wdio/local-runner: Runner 0-0 finished with exit code 1
[ FAILED in /Users/alex/Documents/iOSTest.ipa - /test/specs/smoke/guide.test.js
2022-06-09T07:00:13.403Z INFO #wdio/cli:launcher: Run onWorkerEnd hook
2022-06-09T07:00:13.404Z DEBUG #wdio/cli:utils: Finished to run "onWorkerEnd" hook in 0ms
2022-06-09T07:00:13.404Z INFO #wdio/cli:launcher: Run onComplete hook
Can't generate report portal launch url
Error: Request failed with status code 401:
at /Users/alex/Documents/appium/node_modules/reportportal-js-client/lib/rest.js:33:23
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Function.getLaunchUrlByParams (/Users/alex/Documents/appium/node_modules/wdio-reportportal-service/src/index.js:108:20)
at async Function.getLaunchUrl (/Users/alex/Documents/node_modules/wdio-reportportal-service/src/index.js:92:12)
at async Object.onComplete (/Users/alex/Documents/appium/conf/shared.conf.js:60:18)
at async /Users/alex/Documents/node_modules/#wdio/cli/build/utils.js:96:13
at async Promise.all (index 0)
at async Launcher.run (/Users/alex/Documents/__tests__/appium/node_modules/#wdio/cli/build/launcher.js:96:39)
Report portal link undefined
at /Users/alex/Documents/__tests__/appium/node_modules/reportportal-js-client/lib/rest.js:33:23
at processTicksAndRejections (internal/process/task_queues.js:95:5)
Error: Request failed with status code 401:
at /Users/alex/Documents/node_modules/reportportal-js-client/lib/rest.js:33:23
at processTicksAndRejections (internal/process/task_queues.js:95:5)
2022-06-09T07:00:14.462Z DEBUG #wdio/cli:utils: Finished to run "onComplete" hook in 603ms
Get the following error when protractor is about to run on a windows host via jenkins job. We run selenium hub on a linux host with the selenium node running off of windows
^
`Error: ECONNREFUSED connect ECONNREFUSED
at ClientRequest.<anonymous> (C:\dependencies-dashboard\node_modules\selenium-webdriver\http\index.js:172:16)
at ClientRequest.emit (events.js:107:17)
at Socket.socketErrorListener (_http_client.js:271:9)
at Socket.emit (events.js:107:17)
at net.js:459:14
at process._tickCallback (node.js:355:11)
From: Task: WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession_ (C:\dependencies-dashboard\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:157:22)
at Function.webdriver.WebDriver.createSession (C:\dependencies-dashboard\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:131:30)
at new Driver (C:\dependencies-dashboard\node_modules\selenium-webdriver\chrome.js:810:36)
at [object Object].DirectDriverProvider.getNewDriver (C:\dependencies-dashboard\node_modules\protractor\lib\driverProviders\direct.js:68:16)
at [object Object].Runner.createBrowser (C:\dependencies-dashboard\node_modules\protractor\lib\runner.js:182:37)
at C:\dependencies-dashboard\node_modules\protractor\lib\runner.js:263:21
at _fulfilled (C:\dependencies-dashboard\node_modules\protractor\node_modules\q\q.js:797:54)
at self.promiseDispatch.done (C:\dependencies-dashboard\node_modules\protractor\node_modules\q\q.js:826:30)
at Promise.promise.promiseDispatch (C:\dependencies-dashboard\node_modules\protractor\node_modules\q\q.js:759:13)
at C:\dependencies-dashboard\node_modules\protractor\node_modules\q\q.js:525:49
[launcher] Process exited with error code 1
events.js:85
throw er; // Unhandled 'error' event
^
Error: protractor exited with code 1
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE`
I am studying react-native.And I follow the tutorials on the website.When I execute "react-native run-ios". It happens some error messages.
Looking for JS files in
/Users/Mapple/Developer/React-native-workspace/HelloWorld
[19:16:32] <START> Building Dependency Graph
[19:16:32] <START> Crawling File System
[Hot Module Replacement] Server listening on /hot
React packager ready.
2016-07-30T19:16:32,265: [cli] Failed to open /Users/Mapple/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
2016-07-30T19:16:32,265: [cli] Failed to open /Users/Mapple/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
Watchman: watchman--no-pretty get-sockname returned with exit code null 2016-07-30T19:16:32,265: [cli] Failed to open /Users/Mapple/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
ERROR watchman--no-pretty get-sockname returned with exit code null 2016-07-30T19:16:32,265: [cli] Failed to open /Users/Mapple/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
Error: watchman--no-pretty get-sockname returned with exit code null 2016-07-30T19:16:32,265: [cli] Failed to open /Users/Mapple/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
at ChildProcess.<anonymous> (/Users/Mapple/Developer/React-native-workspace/HelloWorld/node_modules/fb-watchman/index.js:198:18)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:850:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:492:12)
I find there is no file-com.github.facebook.watchman.plist in the /Users/Mapple/Library/LaunchAgents. I tried a variety of ways, but it does not play a role。
I will crazy。
Packages Version:
1.node: v6.1.0
2.watchman: 4.6.0
I solve my problem.There is a file in my directory called “org.lantern.plist”.I guess it's because of the Lantern software.So when I delete /Users/Mapple/Library/LaunchAgents and re create it,and re execute the command "react-native init HelloWorld",my problem has solved.