question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test execution gets interrupted with errors and timeouts

See original GitHub issue

System OS: RHEL OS version: 7.7/7.8 Platform: ppc64le/x86 Kui version: v8.12.2 node version: v10.20.1/v12.16.1 npm version: 6.14.4/6.13.4

Describe the bug The test execution errors out on RHEL 7, on x86 as well as ppc64le platforms. Prominent errors:

Error: element (".kui--tab-content.visible .kui--scrollback:nth-child(1) .repl-block[data-input-count="1"] .repl-input-element") still not visible after 55000ms
ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
/data1/kui/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js 32:16 "innerError" Error: Cannot find module '../build/Debug/pty.node'
Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

Steps to reproduce the behavior

  • x86
git clone https://github.com/IBM/kui.git
cd kui
git checkout tags/v8.12.2
npm ci
npm run test
  • ppc64le
build electron from source
ninja -C out/Release electron:electron_chromedriver_zip
cd out/Release
cp chromedriver.zip chromedriver-v7.0.0-linux-ppc64.zip
cp dist.zip electron-v7.3.1-linux-ppc64.zip
sha256sum -b chromedriver-v7.0.0-linux-ppc64.zip > SHASUMS256.txt
sha256sum -b electron-v7.3.1-linux-ppc64.zip >> SHASUMS256.txt
cd ..
python3 -m http.server &
cd ~
git clone https://github.com/IBM/kui.git
cd kui
git checkout tags/v8.12.2
export ELECTRON_MIRROR="http://0.0.0.0:8000/"
export ELECTRON_CUSTOM_DIR="Release"
npm ci
npm run test

Expected behavior The test execution should commence and display the test result.

Error log

Relevant part of the log is pasted below:

  • x86
Error: element (".kui--tab-content.visible .kui--scrollback:nth-child(1) .repl-block[data-input-count="1"] .repl-input-element") still not visible after 55000ms
    at elements(".kui--tab-content.visible .kui--scrollback:nth-child(1) .repl-block[data-input-count="1"] .repl-input-element") - isVisible.js:54:17
    at isVisible(".kui--tab-content.visible .kui--scrollback:nth-child(1) .repl-block[data-input-count="1"] .repl-input-element") - waitForVisible.js:73:22 {
  details: undefined,
  message: 'element (".kui--tab-content.visible .kui--scrollback:nth-child(1) .repl-block[data-input-count="1"] .repl-input-element") still not visible after 55000ms',
  type: 'WaitUntilTimeoutError'
}
error trying to get the output of the previous block Error: An element could not be located on the page using the given search parameters (".kui--tab-content.visible .repl .repl-block:nth-last-child(2) .repl-result").
    at execute(<Function>) - selectorExecute.js:58:65
    at execute("return !!document.evaluate;") - ensureClientSideSelectorSupport.js:23:17 {
  type: 'NoSuchElement',
  message: 'An element could not be located on the page using the given search parameters (".kui--tab-content.visible .repl .repl-block:nth-last-child(2) .repl-result").'
}
here is the content of the last block:
<div class="repl-block kui--maximize-candidate repl-active" data-uuid="false" data-input-count="0" data-is-focused="true" data-is-visible-in-minisplit="true"><div class="repl-input"><div class="repl-context">In[1]</div><div class="kui--input-and-context"><input type="text" autocorrect="off" autocomplete="off" spellcheck="false" autocapitalize="off" class="repl-input-element" aria-label="Command Input" tabindex="1"><span class="repl-prompt-right-elements"></span></div></div></div>
MAIN Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
MAIN 
MAIN DevTools listening on ws://127.0.0.1:41043/devtools/browser/68e75d1c-a802-4427-a926-1ba6f09cf51a
MAIN [6403:0910/073646.081942:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
MAIN [6403:0910/073646.136224:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
MAIN [6426:0910/073646.231664:ERROR:sandbox_linux.cc(369)] InitializeSandbox() called with multiple threads in process gpu-process.
MAIN [6436:0910/073646.298793:WARNING:ipc_message_attachment_set.cc(49)] MessageAttachmentSet destroyed with unconsumed attachments: 0/1
MAIN [6436:0910/073646.298799:ERROR:command_buffer_proxy_impl.cc(124)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.
MAIN You might need to use a local HTTP server (instead of file://): https://fb.me/react-devtools-faq font-weight:bold", source: webpack:///./node_modules/react-dom/cjs/react-dom.development.js? (24994)
MAIN     Policy set or a policy with "unsafe-eval" enabled. This exposes users of
MAIN     this app to unnecessary security risks.
MAIN 
MAIN For more information and help, consult
MAIN https://electronjs.org/docs/tutorial/security.
MAIN This warning will not show up
MAIN once the app is packaged.", source: electron/js2c/renderer_init.js (2884)
MAIN (electron) 'currentlyLoggingPath' is deprecated and will be removed.
MAIN Require stack:
MAIN - /data1/kui/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js
MAIN - /data1/kui/node_modules/node-pty-prebuilt-multiarch/lib/index.js
MAIN - /data1/kui/node_modules/@kui-shell/build/index.html", source: /data1/kui/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js (33)
MAIN You might need to use a local HTTP server (instead of file://): https://fb.me/react-devtools-faq font-weight:bold", source: webpack:///./node_modules/react-dom/cjs/react-dom.development.js? (24994)
MAIN     Policy set or a policy with "unsafe-eval" enabled. This exposes users of
MAIN     this app to unnecessary security risks.
MAIN 
MAIN For more information and help, consult
MAIN https://electronjs.org/docs/tutorial/security.
MAIN This warning will not show up
MAIN once the app is packaged.", source: electron/js2c/renderer_init.js (2884)
RENDER Download the React DevTools for a better development experience: https://fb.me/react-devtools\nYou might need to use a local HTTP server (instead of file://): https://fb.me/react-devtools-faq font-weight:bold
RENDER Electron Security Warning (Insecure Content-Security-Policy) font-weight: bold; This renderer process has either no Content Security\n    Policy set or a policy with \unsafe-eval\ enabled. This exposes users of\n    this app to unnecessary security risks.\n\nFor more information and help, consult\nhttps://electronjs.org/docs/tutorial/security.\nThis warning will not show up\nonce the app is packaged.
RENDER /data1/kui/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js 32:16 "innerError" Error: Cannot find module '../build/Debug/pty.node'
Require stack:
- /data1/kui/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js
- /data1/kui/node_modules/node-pty-prebuilt-multiarch/lib/index.js
- /data1/kui/node_modules/@kui-shell/build/index.html
    at Module._resolveFilename (internal/modules/cjs/loader.js:717:15)
    at Function../lib/common/reset-search-paths.ts.Module._resolveFilename (electron/js2c/renderer_init.js:930:16)
    at Module._load (internal/modules/cjs/loader.js:622:27)
    at Module._load (electron/js2c/asar.js:717:26)
    at Function.Module._load (electron/js2c/asar.js:717:26)
    at Module.require (internal/modules/cjs/loader.js:775:19)
    at require (internal/modules/cjs/helpers.js:68:18)
    at Object.<anonymous> (/data1/kui/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js:30:15)
    at Object.<anonymous> (/data1/kui/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js:278:3)
    at Module._compile (internal/modules/cjs/loader.js:880:30)
RENDER electron/js2c/asar.js 139:30 Uncaught Error: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not …de-pty-prebuilt-multiarch/build/Release/pty.node)
RENDER Download the React DevTools for a better development experience: https://fb.me/react-devtools\nYou might need to use a local HTTP server (instead of file://): https://fb.me/react-devtools-faq font-weight:bold
RENDER Electron Security Warning (Insecure Content-Security-Policy) font-weight: bold; This renderer process has either no Content Security\n    Policy set or a policy with \unsafe-eval\ enabled. This exposes users of\n    this app to unnecessary security risks.\n\nFor more information and help, consult\nhttps://electronjs.org/docs/tutorial/security.\nThis warning will not show up\nonce the app is packaged.
    1) should give 127 for unknown outer command


  0 passing (1m)
  1 failing

  1) bash-like commands 
       should give 127 for unknown outer command:
     Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/data1/kui/node_modules/@kui-shell/plugin-bash-like/dist/test/bash-like/bash-like.js)
      at listOnTimeout (internal/timers.js:549:17)
      at processTimers (internal/timers.js:492:7)



npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @kui-shell/test@8.12.2 testv2: `./bin/runMochaLayersv2.sh`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @kui-shell/test@8.12.2 testv2 script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-09-10T11_37_49_041Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! kui-shell@8.12.0 testv2: `export MONOREPO_MODE=true; cd packages/test && npm run testv2`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the kui-shell@8.12.0 testv2 script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-09-10T11_37_49_074Z-debug.log

> kui-shell@8.12.0 kill /data1/kui
> bash -c "if [ $OSTYPE != msys ]; then kill $(lsof -t -i:908${PORT_OFFSET-0}) > /dev/null 2> /dev/null || true; fi"

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! kui-shell@8.12.0 test:electron: `npm run watch:electron && npm run testv2; EC=$?; npm run kill; exit $EC`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the kui-shell@8.12.0 test:electron script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-09-10T11_37_49_405Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! kui-shell@8.12.0 test: `npm run test:electron`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the kui-shell@8.12.0 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-09-10T11_37_49_422Z-debug.log
  • ppc64le
{ Error: element (".kui--tab-content.visible .kui--scrollback:nth-child(1) .repl-block[data-input-count="1"] .repl-input-element") still not visible after 55000ms
    at elements(".kui--tab-content.visible .kui--scrollback:nth-child(1) .repl-block[data-input-count="1"] .repl-input-element") - isVisible.js:54:17
    at isVisible(".kui--tab-content.visible .kui--scrollback:nth-child(1) .repl-block[data-input-count="1"] .repl-input-element") - waitForVisible.js:73:22
  details: undefined,
  message:
   'element (".kui--tab-content.visible .kui--scrollback:nth-child(1) .repl-block[data-input-count="1"] .repl-input-element") still not visible after 55000ms',
  type: 'WaitUntilTimeoutError' }
error trying to get the output of the previous block { Error: An element could not be located on the page using the given search parameters (".kui--tab-content.visible .repl .repl-block:nth-last-child(2) .repl-result").
    at execute(<Function>) - selectorExecute.js:58:65
    at execute("return !!document.evaluate;") - ensureClientSideSelectorSupport.js:23:17
  type: 'NoSuchElement',
  message:
   'An element could not be located on the page using the given search parameters (".kui--tab-content.visible .repl .repl-block:nth-last-child(2) .repl-result").' }
here is the content of the last block:
<div class="repl-block kui--maximize-candidate repl-active" data-uuid="false" data-input-count="0" data-is-focused="true" data-is-visible-in-minisplit="true"><div class="repl-input"><div class="repl-context">In[1]</div><div class="kui--input-and-context"><input type="text" autocorrect="off" autocomplete="off" spellcheck="false" autocapitalize="off" class="repl-input-element" aria-label="Command Input" tabindex="1"><span class="repl-prompt-right-elements"></span></div></div></div>
MAIN Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
MAIN 
MAIN DevTools listening on ws://127.0.0.1:42294/devtools/browser/e6ad26f0-3084-428d-b223-9da49eea43e6
MAIN [21268:0909/075926.882221:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
MAIN [21268:0909/075926.927984:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
MAIN [21293:0909/075927.071936:ERROR:sandbox_linux.cc(369)] InitializeSandbox() called with multiple threads in process gpu-process.
MAIN [21296:0909/075927.090272:ERROR:command_buffer_proxy_impl.cc(124)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.
MAIN You might need to use a local HTTP server (instead of file://): https://fb.me/react-devtools-faq font-weight:bold", source: webpack:///./node_modules/react-dom/cjs/react-dom.development.js? (24994)
MAIN     Policy set or a policy with "unsafe-eval" enabled. This exposes users of
MAIN     this app to unnecessary security risks.
MAIN 
MAIN For more information and help, consult
MAIN https://electronjs.org/docs/tutorial/security.
MAIN This warning will not show up
MAIN once the app is packaged.", source: electron/js2c/renderer_init.js (2866)
MAIN (electron) 'currentlyLoggingPath' is deprecated and will be removed.
MAIN Require stack:
MAIN - /root/amit_sadaphule/kui/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js
MAIN - /root/amit_sadaphule/kui/node_modules/node-pty-prebuilt-multiarch/lib/index.js
MAIN - /root/amit_sadaphule/kui/node_modules/@kui-shell/build/index.html", source: /root/amit_sadaphule/kui/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js (33)
MAIN You might need to use a local HTTP server (instead of file://): https://fb.me/react-devtools-faq font-weight:bold", source: webpack:///./node_modules/react-dom/cjs/react-dom.development.js? (24994)
MAIN     Policy set or a policy with "unsafe-eval" enabled. This exposes users of
MAIN     this app to unnecessary security risks.
MAIN 
MAIN For more information and help, consult
MAIN https://electronjs.org/docs/tutorial/security.
MAIN This warning will not show up
MAIN once the app is packaged.", source: electron/js2c/renderer_init.js (2866)
RENDER Download the React DevTools for a better development experience: https://fb.me/react-devtools\nYou might need to use a local HTTP server (instead of file://): https://fb.me/react-devtools-faq font-weight:bold
RENDER Electron Security Warning (Insecure Content-Security-Policy) font-weight: bold; This renderer process has either no Content Security\n    Policy set or a policy with \unsafe-eval\ enabled. This exposes users of\n    this app to unnecessary security risks.\n\nFor more information and help, consult\nhttps://electronjs.org/docs/tutorial/security.\nThis warning will not show up\nonce the app is packaged.
RENDER /root/amit_sadaphule/kui/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js 32:16 "innerError" Error: Cannot find module '../build/Debug/pty.node'
Require stack:
- /root/amit_sadaphule/kui/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js
- /root/amit_sadaphule/kui/node_modules/node-pty-prebuilt-multiarch/lib/index.js
- /root/amit_sadaphule/kui/node_modules/@kui-shell/build/index.html
    at Module._resolveFilename (internal/modules/cjs/loader.js:717:15)
    at Function../lib/common/reset-search-paths.ts.Module._resolveFilename (electron/js2c/renderer_init.js:930:16)
    at Module._load (internal/modules/cjs/loader.js:622:27)
    at Module._load (electron/js2c/asar.js:717:26)
    at Function.Module._load (electron/js2c/asar.js:717:26)
    at Module.require (internal/modules/cjs/loader.js:775:19)
    at require (internal/modules/cjs/helpers.js:68:18)
    at Object.<anonymous> (/root/amit_sadaphule/kui/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js:30:15)
    at Object.<anonymous> (/root/amit_sadaphule/kui/node_modules/node-pty-prebuilt-multiarch/lib/unixTerminal.js:278:3)
    at Module._compile (internal/modules/cjs/loader.js:880:30)
RENDER electron/js2c/asar.js 139:30 Uncaught Error: /root/amit_sadaphule/kui/node_modules/node-pty-pre…pen shared object file: No such file or directory
RENDER Download the React DevTools for a better development experience: https://fb.me/react-devtools\nYou might need to use a local HTTP server (instead of file://): https://fb.me/react-devtools-faq font-weight:bold
RENDER Electron Security Warning (Insecure Content-Security-Policy) font-weight: bold; This renderer process has either no Content Security\n    Policy set or a policy with \unsafe-eval\ enabled. This exposes users of\n    this app to unnecessary security risks.\n\nFor more information and help, consult\nhttps://electronjs.org/docs/tutorial/security.\nThis warning will not show up\nonce the app is packaged.
    1) should give 127 for unknown outer command


  0 passing (1m)
  1 failing

  1) bash-like commands 
       should give 127 for unknown outer command:
     Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/root/amit_sadaphule/kui/node_modules/@kui-shell/plugin-bash-like/dist/test/bash-like/bash-like.js)
  



npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @kui-shell/test@8.12.2 testv2: `./bin/runMochaLayersv2.sh`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @kui-shell/test@8.12.2 testv2 script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-09-09T12_00_30_492Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! kui-shell@8.12.0 testv2: `export MONOREPO_MODE=true; cd packages/test && npm run testv2`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the kui-shell@8.12.0 testv2 script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-09-09T12_00_30_550Z-debug.log

> kui-shell@8.12.0 kill /root/amit_sadaphule/kui
> bash -c "if [ $OSTYPE != msys ]; then kill $(lsof -t -i:908${PORT_OFFSET-0}) > /dev/null 2> /dev/null || true; fi"

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! kui-shell@8.12.0 test:electron: `npm run watch:electron && npm run testv2; EC=$?; npm run kill; exit $EC`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the kui-shell@8.12.0 test:electron script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-09-09T12_00_31_268Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! kui-shell@8.12.0 test: `npm run test:electron`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the kui-shell@8.12.0 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-09-09T12_00_31_404Z-debug.log

Full logs attached.

Please point me in the right direction to debug these errors. Thanks! kui_test_ppc64le_fail.log kui_test_intel_fail.log

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
starpitcommented, Sep 15, 2020

we are trying ubuntu 16 now to eliminate the degrees of freedom. we’ll let you know in a bit how that went!

0reactions
amitsadaphulecommented, Oct 12, 2020

Can you please share how you solved chrome issue on ubuntu?

Just changing the display on which VNC server or Xvfb was started to 0 from 1, as follows, solved the issue:

apt-get install x11vnc xvfb fluxbox
export DISPLAY=:0
Xvfb :0 -screen 0 1024x768x16 &
fluxbox &
x11vnc -display :0 -bg -nopw -xkb
Read more comments on GitHub >

github_iconTop Results From Across the Web

Timeout functionality marks tests as failed but does not stop ...
The issue is mainly w.r.t how do I abort/interrupt current thread's execution and still not kill the current thread. If you have the...
Read more >
executionTimeAllowance | Apple Developer Documentation
executionTimeAllowance. The number of seconds, rounded up to the nearest minute, for a test to run before it fails with a timeout error....
Read more >
Error Messages During Test Execution - LambdaTest
The script timeout error is a WebDriver error that occurs when a script the user has provided did not complete before the session's...
Read more >
Tests script running Error: sandbox: execution interrupted ...
I am new to Postman. I have the following Tests code in my Post request: pm.test(“Status code is 200”, function () { pm.response....
Read more >
TestComplete error "Script execution was interrupt...
Hi, I am executing tests on LabManager using TC/TE 8.60. A testcase and all after that failed with following error.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found