cytoscape / cytoscape-explore

Network visualization webapp.
MIT License
12 stars 4 forks source link

Server startup too slow for tests on CI #152

Closed maxkfranz closed 2 years ago

maxkfranz commented 2 years ago

Describe the bug

CI is failing sporadically -- and always for CI deployments -- because the new Express server startups used in tests times out (2000ms).

To Reproduce

  1. Go to the CI server: https://captain.ce.baderlab.org
  2. Take a look at the build log:
[[ TRUNCATED ]]

Skipping 'fsevents' build as platform linux is not supported
> fsevents@1.2.13 install /usr/src/app/node_modules/nodemon/node_modules/fsevents
> node install.js

Skipping 'fsevents' build as platform linux is not supported
> nodemon@1.19.4 postinstall /usr/src/app/node_modules/nodemon
> node bin/postinstall || exit 0
Love nodemon? You can now support the project via the open collective:
 > https://opencollective.com/nodemon/donate
> core-js@3.19.1 postinstall /usr/src/app/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js:
> https://opencollective.com/core-js 
> https://patreon.com/zloirock 
> https://paypal.me/zloirock 
> bitcoin: bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
added 1712 packages in 84.558s
Removing intermediate container 7139b7bdafd9
---> 27c2cc60252c
Step 7/10 : RUN npm test # ensure test instances always pass tests before deploying

---> Running in 76baccf144ff
> cytoscape-explore@0.0.0 test /usr/src/app
> run-s test:mocha test:bundle lint
> cytoscape-explore@0.0.0 test:mocha /usr/src/app
> cross-env TESTING=true mocha -r dotenv/config -r esm --exit

registering cytoscape extensions
starting express server
Tue, 08 Mar 2022 14:39:10 GMT morgan deprecated default format: use combined format at node_modules/esm/esm.js:1:278827

Can not register `edgehandles` for `core` since `edgehandles` already exists in the prototype and can not be overridden

Can not register `vizmapper` for `core` since `vizmapper` already exists in the prototype and can not be overridden
Can not register `dataLocked` for `core` since `dataLocked` already exists in the prototype and can not be overridden
Can not register `exportCX2` for `core` since `exportCX2` already exists in the prototype and can not be overridden
Can not register `importCX2` for `core` since `importCX2` already exists in the prototype and can not be overridden
Can not register `exportJSON` for `core` since `exportJSON` already exists in the prototype and can not be overridden
Can not register `importJSON` for `core` since `importJSON` already exists in the prototype and can not be overridden

Can not register `popper` for `core` since `popper` already exists in the prototype and can not be overridden

Can not register `popper` for `collection` since `popper` already exists in the prototype and can not be overridden
Can not register `popperRef` for `core` since `popperRef` already exists in the prototype and can not be overridden
Can not register `popperRef` for `collection` since `popperRef` already exists in the prototype and can not be overridden

1) "before all" hook in "{root}"
stopped express server

0 passing (2s)
  1 failing
1) "before all" hook in "{root}":
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
      at listOnTimeout (internal/timers.js:557:17)
      at processTimers (internal/timers.js:500:7)

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR!
 cytoscape-explore@0.0.0 test:mocha: `cross-env TESTING=true mocha -r dotenv/config -r esm --exit`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the cytoscape-explore@0.0.0 test:mocha 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/2022-03-08T14_39_12_405Z-debug.log

ERROR: "test:mocha" exited with 1.

npm

ERR!
 Test failed.  See above for more details.

{"code":1,"message":"The command '/bin/sh -c npm test # ensure test instances always pass tests before deploying' returned a non-zero code: 1"}
The command '/bin/sh -c npm test # ensure test instances always pass tests before deploying' returned a non-zero code: 1
Build has failed!
----------------------
Deploy failed!
Error: {"code":1,"message":"The command '/bin/sh -c npm test # ensure test instances always pass tests before deploying' returned a non-zero code: 1"}
The command '/bin/sh -c npm test # ensure test instances always pass tests before deploying' returned a non-zero code: 1

Expected behavior

The tests should pass when the dockerised CI deployment is made.

Server (please complete the following information):

Additional context

There could be a better way to start the server for tests, or we could increase some timeouts.

maxkfranz commented 2 years ago

Latest log:

[[ TRUNCATED ]]

registering cytoscape extensions
starting express server
Wed, 09 Mar 2022 16:21:00 GMT morgan deprecated default format: use combined format at node_modules/esm/esm.js:1:278827

Can not register `edgehandles` for `core` since `edgehandles` already exists in the prototype and can not be overridden
Can not register `vizmapper` for `core` since `vizmapper` already exists in the prototype and can not be overridden
Can not register `dataLocked` for `core` since `dataLocked` already exists in the prototype and can not be overridden

Can not register `exportCX2` for `core` since `exportCX2` already exists in the prototype and can not be overridden
Can not register `importCX2` for `core` since `importCX2` already exists in the prototype and can not be overridden
Can not register `exportJSON` for `core` since `exportJSON` already exists in the prototype and can not be overridden
Can not register `importJSON` for `core` since `importJSON` already exists in the prototype and can not be overridden
Can not register `popper` for `core` since `popper` already exists in the prototype and can not be overridden
Can not register `popper` for `collection` since `popper` already exists in the prototype and can not be overridden
Can not register `popperRef` for `core` since `popperRef` already exists in the prototype and can not be overridden
Can not register `popperRef` for `collection` since `popperRef` already exists in the prototype and can not be overridden

Importing CX networks to CE
✓ converts nodel label position CX values to CE
✓ imports networks to CE (290ms)

Exporting CE networks to CX
✓ converts CE style values to CX style values
✓ converts networks from CE to CX
✓ produces a CX type string for supported values

  History (Snapshots)
1) "before each" hook: create fixture for "creates and lists snapshots"
2) "after each" hook for "creates and lists snapshots"
Network Analyser
✓ intialized correctly
✓ add a node and an edge
✓ remove a node and an edge
✓ update data properties
✓ remove two nodes at the same time

  CytoscapeSyncher
    on server, two instances
      crud ops
3) client1 creates a doc, client2 loads it
4) "after each" hook for "client1 creates a doc, client2 loads it"
on two clients through proxy server
crud ops
5) "before each" hook for "client2 loads existing doc"
FetchError: request to http://localhost:5984/cydd358317-048a-4cb7-be76-7b9f76e821fd/ failed, reason: connect ECONNREFUSED 127.0.0.1:5984
    at ClientRequest.<anonymous> (/usr/src/app/node_modules/pouchdb/node_modules/node-fetch/lib/index.js:1455:11)
    at ClientRequest.emit (events.js:400:28)
    at ClientRequest.emit (domain.js:475:12)
    at Socket.socketErrorListener (_http_client.js:475:9)
    at Socket.emit (events.js:400:28)
    at Socket.emit (domain.js:475:12)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)

6) "after each" hook for "client2 loads existing doc"

stopped express server

10 passing (4s)
  6 failing
1) History (Snapshots)
       "before each" hook: create fixture for "creates and lists snapshots":
     FetchError: request to http://localhost:5984/history_test/ failed, reason: connect ECONNREFUSED 127.0.0.1:5984
      at ClientRequest.<anonymous> (node_modules/pouchdb/node_modules/node-fetch/lib/index.js:1455:11)
      at ClientRequest.emit (domain.js:475:12)
      at Socket.socketErrorListener (_http_client.js:475:9)
      at Socket.emit (domain.js:475:12)
      at emitErrorNT (internal/streams/destroy.js:106:8)
      at emitErrorCloseNT (internal/streams/destroy.js:74:3)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)
2) History (Snapshots)
       "after each" hook for "creates and lists snapshots":
     FetchError: request to http://localhost:5984/history_test/ failed, reason: connect ECONNREFUSED 127.0.0.1:5984
      at ClientRequest.<anonymous> (node_modules/pouchdb/node_modules/node-fetch/lib/index.js:1455:11)
      at ClientRequest.emit (domain.js:475:12)
      at Socket.socketErrorListener (_http_client.js:475:9)
      at Socket.emit (domain.js:475:12)
      at emitErrorNT (internal/streams/destroy.js:106:8)
      at emitErrorCloseNT (internal/streams/destroy.js:74:3)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  3) CytoscapeSyncher
       on server, two instances
         crud ops
           client1 creates a doc, client2 loads it:
     FetchError: request to http://localhost:5984/test/ failed, reason: connect ECONNREFUSED 127.0.0.1:5984
      at ClientRequest.<anonymous> (node_modules/pouchdb/node_modules/node-fetch/lib/index.js:1455:11)
      at ClientRequest.emit (domain.js:475:12)
      at Socket.socketErrorListener (_http_client.js:475:9)
      at Socket.emit (domain.js:475:12)
      at emitErrorNT (internal/streams/destroy.js:106:8)
      at emitErrorCloseNT (internal/streams/destroy.js:74:3)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  4) CytoscapeSyncher
       on server, two instances
         "after each" hook for "client1 creates a doc, client2 loads it":
     FetchError: request to http://localhost:5984/test/ failed, reason: connect ECONNREFUSED 127.0.0.1:5984
      at ClientRequest.<anonymous> (node_modules/pouchdb/node_modules/node-fetch/lib/index.js:1455:11)
      at ClientRequest.emit (domain.js:475:12)
      at Socket.socketErrorListener (_http_client.js:475:9)
      at Socket.emit (domain.js:475:12)
      at emitErrorNT (internal/streams/destroy.js:106:8)
      at emitErrorCloseNT (internal/streams/destroy.js:74:3)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

  5) CytoscapeSyncher
       on two clients through proxy server
         "before each" hook for "client2 loads existing doc":
     FetchError: invalid json response body at http://localhost:3000/api/document reason: Unexpected token < in JSON at position 0
      at /usr/src/app/node_modules/node-fetch/lib/index.js:273:32
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
      at async Context.<anonymous> (test/syncher-test.js:199:23)

  6) CytoscapeSyncher
       on two clients through proxy server
         "after each" hook for "client2 loads existing doc":
     Error: database is destroyed
      at PouchDB.<anonymous> (node_modules/pouchdb/lib/index.js:273:29)
      at PouchDB.<anonymous> (node_modules/argsarray/index.js:14:18)
      at /usr/src/app/node_modules/pouchdb/lib/index.js:227:21
      at new Promise (<anonymous>)
      at PouchDB.<anonymous> (node_modules/pouchdb/lib/index.js:214:19)
      at PouchDB.destroy (node_modules/argsarray/index.js:16:18)
      at CytoscapeSyncher.delete (src/model/cytoscape-syncher.js:243:24)
      at Context.<anonymous> (test/syncher-test.js:212:27)
      at processImmediate (internal/timers.js:464:21)
npm ERR! code ELIFECYCLE

npm ERR! errno 6

npm ERR! cytoscape-explore@0.0.0 test:mocha: `cross-env TESTING=true mocha -r dotenv/config -r esm --exit`

npm ERR! Exit status 6
npm ERR! 
npm ERR! Failed at the cytoscape-explore@0.0.0 test:mocha 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/2022-03-09T16_21_04_385Z-debug.log

ERROR: "test:mocha" exited with 6.

npm ERR!
 Test failed.  See above for more details.

{"code":1,"message":"The command '/bin/sh -c npm test # ensure test instances always pass tests before deploying' returned a non-zero code: 1"}
The command '/bin/sh -c npm test # ensure test instances always pass tests before deploying' returned a non-zero code: 1
Build has failed!
----------------------
Deploy failed!
Error: {"code":1,"message":"The command '/bin/sh -c npm test # ensure test instances always pass tests before deploying' returned a non-zero code: 1"}
The command '/bin/sh -c npm test # ensure test instances always pass tests before deploying' returned a non-zero code: 1
maxkfranz commented 2 years ago

https://dev.ce.baderlab.org is currently, temporarily pointing to fix/slow-tests. It's currently deploying successfully.

@mikekucera, could you confirm that your snapshot images work on this deployment?

mikekucera commented 2 years ago

They don't look to be working.

maxkfranz commented 2 years ago

Any clues or error messages for why that's happening?

mikekucera commented 2 years ago

The app log has this in it...

Error: Failed to launch chrome! 2022-03-10T20:34:55.480159071Z /usr/src/app/node_modules/puppeteer/.local-chromium/linux-686378/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory

But I'm totally new to caprover and I have no idea if I'm looking in the right place.

maxkfranz commented 2 years ago

Does 293c8f4 make a difference?

mikekucera commented 2 years ago

I don't know how to check that.

maxkfranz commented 2 years ago

It should be up at https://dev.ce.baderlab.org

mikekucera commented 2 years ago

Maybe we need to have a call because I don't understand what you're asking.

maxkfranz commented 2 years ago

OK, I've sent you an email to set up a call

mikekucera commented 2 years ago

I don't think the problem is the couch auth. I created an admin in my local installation, turned on USE_COUCH_AUTH, and the tests passed with no modification to the code. According to this: https://guide.couchdb.org/draft/security.html, with the default security setup you don't need credentials to create or read documents in a database. So creating and reading snapshot documents works without username/password.

I'm not sure what the next steps should be.

maxkfranz commented 2 years ago

Let's treat this doc as a test case:

Currently, the thumbnail gives Internal Server Error. This is the log:

2022-03-10T20:57:46.090166989Z Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted 2022-03-10T20:57:46.113958459Z [0310/205746.113569:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2) 2022-03-10T20:57:46.114262613Z [0310/205746.114066:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2) 2022-03-10T20:57:48.644185507Z Thu, 10 Mar 2022 20:57:48 GMT morgan deprecated default format: use combined format at node_modules/esm/esm.js:1:278827 2022-03-10T21:55:52.935353432Z Error: Failed to launch chrome! 2022-03-10T21:55:52.935409362Z [0310/215552.499547:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox. 2022-03-10T21:55:52.935425748Z #0 0x562216d81879 base::debug::CollectStackTrace() 2022-03-10T21:55:52.935432427Z #1 0x562216cdec63 base::debug::StackTrace::StackTrace() 2022-03-10T21:55:52.935439559Z #2 0x562216cf3013 logging::LogMessage::~LogMessage() 2022-03-10T21:55:52.935445952Z #3 0x56221848d95e service_manager::ZygoteHostImpl::Init() 2022-03-10T21:55:52.935452676Z #4 0x562216922adc content::ContentMainRunnerImpl::Initialize() 2022-03-10T21:55:52.935459587Z #5 0x56221696e72c service_manager::Main() 2022-03-10T21:55:52.935466084Z #6 0x5622169210b1 content::ContentMain() 2022-03-10T21:55:52.935494305Z #7 0x56221696d99d headless::(anonymous namespace)::RunContentMain() 2022-03-10T21:55:52.935501371Z #8 0x56221696d70b headless::HeadlessShellMain() 2022-03-10T21:55:52.935506846Z #9 0x5622146fe1b8 ChromeMain 2022-03-10T21:55:52.935512251Z #10 0x7ff21f6bd2e1 __libc_start_main 2022-03-10T21:55:52.935517784Z #11 0x5622146fe02a _start 2022-03-10T21:55:52.935523431Z 2022-03-10T21:55:52.935528925Z Received signal 6 2022-03-10T21:55:52.935534188Z #0 0x562216d81879 base::debug::CollectStackTrace() 2022-03-10T21:55:52.935538847Z #1 0x562216cdec63 base::debug::StackTrace::StackTrace() 2022-03-10T21:55:52.935543930Z #2 0x562216d81401 base::debug::(anonymous namespace)::StackDumpSignalHandler() 2022-03-10T21:55:52.935549493Z #3 0x7ff22584c0e0 <unknown> 2022-03-10T21:55:52.935555561Z #4 0x7ff21f6cffff gsignal 2022-03-10T21:55:52.935560925Z #5 0x7ff21f6d142a abort 2022-03-10T21:55:52.935566127Z #6 0x562216d80265 base::debug::BreakDebugger() 2022-03-10T21:55:52.935571328Z #7 0x562216cf3461 logging::LogMessage::~LogMessage() 2022-03-10T21:55:52.935576431Z #8 0x56221848d95e service_manager::ZygoteHostImpl::Init() 2022-03-10T21:55:52.935581842Z #9 0x562216922adc content::ContentMainRunnerImpl::Initialize() 2022-03-10T21:55:52.935587439Z #10 0x56221696e72c service_manager::Main() 2022-03-10T21:55:52.935592211Z #11 0x5622169210b1 content::ContentMain() 2022-03-10T21:55:52.935597711Z #12 0x56221696d99d headless::(anonymous namespace)::RunContentMain() 2022-03-10T21:55:52.935603199Z #13 0x56221696d70b headless::HeadlessShellMain() 2022-03-10T21:55:52.935608759Z #14 0x5622146fe1b8 ChromeMain 2022-03-10T21:55:52.935614122Z #15 0x7ff21f6bd2e1 __libc_start_main 2022-03-10T21:55:52.935619556Z #16 0x5622146fe02a _start 2022-03-10T21:55:52.935624853Z r8: 0000000000000000 r9: 00007ffea39b33c0 r10: 0000000000000008 r11: 0000000000000246 2022-03-10T21:55:52.935630072Z r12: 00007ffea39b4678 r13: 00007ffea39b3658 r14: 00007ffea39b3658 r15: 00007ffea39b3670 2022-03-10T21:55:52.935635496Z di: 0000000000000002 si: 00007ffea39b33c0 bp: 00007ffea39b3600 bx: 0000000000000006 2022-03-10T21:55:52.935643358Z dx: 0000000000000000 ax: 0000000000000000 cx: 00007ff21f6cffff sp: 00007ffea39b3438 2022-03-10T21:55:52.935649120Z ip: 00007ff21f6cffff efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000 2022-03-10T21:55:52.935655315Z trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000 2022-03-10T21:55:52.935660889Z [end of stack trace] 2022-03-10T21:55:52.935666248Z Calling _exit(1). Core file will not be generated. 2022-03-10T21:55:52.935671590Z 2022-03-10T21:55:52.935676896Z 2022-03-10T21:55:52.935682083Z TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md 2022-03-10T21:55:52.935695252Z 2022-03-10T21:55:52.935700838Z at onClose (/home/appuser/app/node_modules/puppeteer/lib/Launcher.js:348:14) 2022-03-10T21:55:52.935706645Z at Interface.<anonymous> (/home/appuser/app/node_modules/puppeteer/lib/Launcher.js:337:50) 2022-03-10T21:55:52.935712629Z at Interface.emit (events.js:412:35) 2022-03-10T21:55:52.935718239Z at Interface.emit (domain.js:475:12) 2022-03-10T21:55:52.935723716Z at Interface.close (readline.js:530:8) 2022-03-10T21:55:52.935729279Z at Socket.onend (readline.js:254:10) 2022-03-10T21:55:52.935734385Z at Socket.emit (events.js:412:35) 2022-03-10T21:55:52.935751970Z at Socket.emit (domain.js:475:12) 2022-03-10T21:55:52.935758097Z at endReadableNT (internal/streams/readable.js:1334:12) 2022-03-10T21:55:52.935763401Z at processTicksAndRejections (internal/process/task_queues.js:82:21) 2022-03-11T16:11:17.906316722Z Error: Failed to launch chrome! 2022-03-11T16:11:17.906377134Z [0311/161117.472457:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox. 2022-03-11T16:11:17.906396574Z #0 0x556c25b20879 base::debug::CollectStackTrace() 2022-03-11T16:11:17.906408252Z #1 0x556c25a7dc63 base::debug::StackTrace::StackTrace() 2022-03-11T16:11:17.906422015Z #2 0x556c25a92013 logging::LogMessage::~LogMessage() 2022-03-11T16:11:17.906428723Z #3 0x556c2722c95e service_manager::ZygoteHostImpl::Init() 2022-03-11T16:11:17.906435590Z #4 0x556c256c1adc content::ContentMainRunnerImpl::Initialize() 2022-03-11T16:11:17.906443159Z #5 0x556c2570d72c service_manager::Main() 2022-03-11T16:11:17.906450072Z #6 0x556c256c00b1 content::ContentMain() 2022-03-11T16:11:17.906484132Z #7 0x556c2570c99d headless::(anonymous namespace)::RunContentMain() 2022-03-11T16:11:17.906499029Z #8 0x556c2570c70b headless::HeadlessShellMain() 2022-03-11T16:11:17.906506059Z #9 0x556c2349d1b8 ChromeMain 2022-03-11T16:11:17.906512166Z #10 0x7ffa0f79e2e1 __libc_start_main 2022-03-11T16:11:17.906517761Z #11 0x556c2349d02a _start 2022-03-11T16:11:17.906523684Z 2022-03-11T16:11:17.906529654Z Received signal 6 2022-03-11T16:11:17.906535857Z #0 0x556c25b20879 base::debug::CollectStackTrace() 2022-03-11T16:11:17.906542037Z #1 0x556c25a7dc63 base::debug::StackTrace::StackTrace() 2022-03-11T16:11:17.906547823Z #2 0x556c25b20401 base::debug::(anonymous namespace)::StackDumpSignalHandler() 2022-03-11T16:11:17.906553567Z #3 0x7ffa1592d0e0 <unknown> 2022-03-11T16:11:17.906561027Z #4 0x7ffa0f7b0fff gsignal 2022-03-11T16:11:17.906583243Z #5 0x7ffa0f7b242a abort 2022-03-11T16:11:17.906589164Z #6 0x556c25b1f265 base::debug::BreakDebugger() 2022-03-11T16:11:17.906594540Z #7 0x556c25a92461 logging::LogMessage::~LogMessage() 2022-03-11T16:11:17.906601313Z #8 0x556c2722c95e service_manager::ZygoteHostImpl::Init() 2022-03-11T16:11:17.906606046Z #9 0x556c256c1adc content::ContentMainRunnerImpl::Initialize() 2022-03-11T16:11:17.906611357Z #10 0x556c2570d72c service_manager::Main() 2022-03-11T16:11:17.906616477Z #11 0x556c256c00b1 content::ContentMain() 2022-03-11T16:11:17.906622298Z #12 0x556c2570c99d headless::(anonymous namespace)::RunContentMain() 2022-03-11T16:11:17.906628092Z #13 0x556c2570c70b headless::HeadlessShellMain() 2022-03-11T16:11:17.906633885Z #14 0x556c2349d1b8 ChromeMain 2022-03-11T16:11:17.906638862Z #15 0x7ffa0f79e2e1 __libc_start_main 2022-03-11T16:11:17.906644085Z #16 0x556c2349d02a _start 2022-03-11T16:11:17.906648931Z r8: 0000000000000000 r9: 00007fff390ae6d0 r10: 0000000000000008 r11: 0000000000000246 2022-03-11T16:11:17.906654034Z r12: 00007fff390af988 r13: 00007fff390ae968 r14: 00007fff390ae968 r15: 00007fff390ae980 2022-03-11T16:11:17.906658977Z di: 0000000000000002 si: 00007fff390ae6d0 bp: 00007fff390ae910 bx: 0000000000000006 2022-03-11T16:11:17.906667192Z dx: 0000000000000000 ax: 0000000000000000 cx: 00007ffa0f7b0fff sp: 00007fff390ae748 2022-03-11T16:11:17.906673595Z ip: 00007ffa0f7b0fff efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000 2022-03-11T16:11:17.906678834Z trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000 2022-03-11T16:11:17.906684314Z [end of stack trace] 2022-03-11T16:11:17.906689162Z Calling _exit(1). Core file will not be generated. 2022-03-11T16:11:17.906694568Z 2022-03-11T16:11:17.906699438Z 2022-03-11T16:11:17.906704128Z TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md 2022-03-11T16:11:17.906709758Z 2022-03-11T16:11:17.906717472Z at onClose (/home/appuser/app/node_modules/puppeteer/lib/Launcher.js:348:14) 2022-03-11T16:11:17.906723512Z at Interface.<anonymous> (/home/appuser/app/node_modules/puppeteer/lib/Launcher.js:337:50) 2022-03-11T16:11:17.906729128Z at Interface.emit (events.js:412:35) 2022-03-11T16:11:17.906734202Z at Interface.emit (domain.js:475:12) 2022-03-11T16:11:17.906739219Z at Interface.close (readline.js:530:8) 2022-03-11T16:11:17.906744372Z at Socket.onend (readline.js:254:10) 2022-03-11T16:11:17.906749558Z at Socket.emit (events.js:412:35) 2022-03-11T16:11:17.906755108Z at Socket.emit (domain.js:475:12) 2022-03-11T16:11:17.906760625Z at endReadableNT (internal/streams/readable.js:1334:12) 2022-03-11T16:11:17.906777638Z at processTicksAndRejections (internal/process/task_queues.js:82:21) 2022-03-14T19:14:15.944118462Z no snapID, generating thumbnail for network doc 2022-03-14T19:14:16.644044835Z Error: Failed to launch chrome! 2022-03-14T19:14:16.644083227Z [0314/191416.284471:FATAL:zygote_host_impl_linux.cc(116)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox. 2022-03-14T19:14:16.644093127Z #0 0x5588774db879 base::debug::CollectStackTrace() 2022-03-14T19:14:16.644100524Z #1 0x558877438c63 base::debug::StackTrace::StackTrace() 2022-03-14T19:14:16.644106753Z #2 0x55887744d013 logging::LogMessage::~LogMessage() 2022-03-14T19:14:16.644113786Z #3 0x558878be795e service_manager::ZygoteHostImpl::Init() 2022-03-14T19:14:16.644120078Z #4 0x55887707cadc content::ContentMainRunnerImpl::Initialize() 2022-03-14T19:14:16.644127155Z #5 0x5588770c872c service_manager::Main() 2022-03-14T19:14:16.644133700Z #6 0x55887707b0b1 content::ContentMain() 2022-03-14T19:14:16.644140232Z #7 0x5588770c799d headless::(anonymous namespace)::RunContentMain() 2022-03-14T19:14:16.644146954Z #8 0x5588770c770b headless::HeadlessShellMain() 2022-03-14T19:14:16.644153210Z #9 0x558874e581b8 ChromeMain 2022-03-14T19:14:16.644160067Z #10 0x7f16f9fde2e1 __libc_start_main 2022-03-14T19:14:16.644166612Z #11 0x558874e5802a _start 2022-03-14T19:14:16.644173423Z 2022-03-14T19:14:16.644179618Z Received signal 6 2022-03-14T19:14:16.644186063Z #0 0x5588774db879 base::debug::CollectStackTrace() 2022-03-14T19:14:16.644192672Z #1 0x558877438c63 base::debug::StackTrace::StackTrace() 2022-03-14T19:14:16.644199039Z #2 0x5588774db401 base::debug::(anonymous namespace)::StackDumpSignalHandler() 2022-03-14T19:14:16.644205941Z #3 0x7f170016d0e0 <unknown> 2022-03-14T19:14:16.644213365Z #4 0x7f16f9ff0fff gsignal 2022-03-14T19:14:16.644220116Z #5 0x7f16f9ff242a abort 2022-03-14T19:14:16.644227049Z #6 0x5588774da265 base::debug::BreakDebugger() 2022-03-14T19:14:16.644252215Z #7 0x55887744d461 logging::LogMessage::~LogMessage() 2022-03-14T19:14:16.644259291Z #8 0x558878be795e service_manager::ZygoteHostImpl::Init() 2022-03-14T19:14:16.644266088Z #9 0x55887707cadc content::ContentMainRunnerImpl::Initialize() 2022-03-14T19:14:16.644272791Z #10 0x5588770c872c service_manager::Main() 2022-03-14T19:14:16.644279448Z #11 0x55887707b0b1 content::ContentMain() 2022-03-14T19:14:16.644286186Z #12 0x5588770c799d headless::(anonymous namespace)::RunContentMain() 2022-03-14T19:14:16.644293093Z #13 0x5588770c770b headless::HeadlessShellMain() 2022-03-14T19:14:16.644299713Z #14 0x558874e581b8 ChromeMain 2022-03-14T19:14:16.644330048Z #15 0x7f16f9fde2e1 __libc_start_main 2022-03-14T19:14:16.644336572Z #16 0x558874e5802a _start 2022-03-14T19:14:16.644342863Z r8: 0000000000000000 r9: 00007ffed5e12880 r10: 0000000000000008 r11: 0000000000000246 2022-03-14T19:14:16.644349080Z r12: 00007ffed5e13b38 r13: 00007ffed5e12b18 r14: 00007ffed5e12b18 r15: 00007ffed5e12b30 2022-03-14T19:14:16.644355654Z di: 0000000000000002 si: 00007ffed5e12880 bp: 00007ffed5e12ac0 bx: 0000000000000006 2022-03-14T19:14:16.644364002Z dx: 0000000000000000 ax: 0000000000000000 cx: 00007f16f9ff0fff sp: 00007ffed5e128f8 2022-03-14T19:14:16.644370734Z ip: 00007f16f9ff0fff efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000 2022-03-14T19:14:16.644376787Z trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000 2022-03-14T19:14:16.644382613Z [end of stack trace] 2022-03-14T19:14:16.644388549Z Calling _exit(1). Core file will not be generated. 2022-03-14T19:14:16.644395013Z 2022-03-14T19:14:16.644401025Z 2022-03-14T19:14:16.644407005Z TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md 2022-03-14T19:14:16.644413420Z 2022-03-14T19:14:16.644419582Z at onClose (/home/appuser/app/node_modules/puppeteer/lib/Launcher.js:348:14) 2022-03-14T19:14:16.644425863Z at Interface.<anonymous> (/home/appuser/app/node_modules/puppeteer/lib/Launcher.js:337:50) 2022-03-14T19:14:16.644432873Z at Interface.emit (events.js:412:35) 2022-03-14T19:14:16.644439672Z at Interface.emit (domain.js:475:12) 2022-03-14T19:14:16.644451375Z at Interface.close (readline.js:530:8) 2022-03-14T19:14:16.644457781Z at Socket.onend (readline.js:254:10) 2022-03-14T19:14:16.644463897Z at Socket.emit (events.js:412:35) 2022-03-14T19:14:16.644469914Z at Socket.emit (domain.js:475:12) 2022-03-14T19:14:16.644476528Z at endReadableNT (internal/streams/readable.js:1334:12) 2022-03-14T19:14:16.644482601Z at processTicksAndRejections (internal/process/task_queues.js:82:21)

This looks closer than before. Let's try refining the flags a bit by making them unconditional here and including a few more:

https://github.com/cytoscape/cytoscape-explore/blob/90860603bc864be2b1810f0ac2835ada6068a85d/src/server/routes/api/thumbnail.js#L68

Takeaways:

maxkfranz commented 2 years ago

@mikekucera, it looks like the example doc thumbnail is working: https://dev.ce.baderlab.org/api/thumbnail/cyb06bcbf0-9984-4610-86f0-c28de9c75403

Apart from checking the example, is there anything else we should check to make sure your history features are being deployed correctly?