Closed
Description
There is a agent-js-cypress
blow-up error found when i tried to use a same cypress test script from a macos
machine.
- No RP data being sent to the RP-service (portal) as the blow-up error happens
I did some searches around already, but found nothing helpful till now....and thus raise issue hereseeking help/advice
....thanks.
What's wrong
When the same cypress test scripts run from a ubuntu (24.04, where the RP-service is deployed), it works well:
- the cypress test scripts generate the RP-data and got it sent to RP-server successfully
While same cypress test scripts run from a mac (intel x86, in same LAN, RP-service reachable), it reports below error with agent-js-cypress
blow-up....
- key error log around:
mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed
"@reportportal/agent-js-cypress" reporter blew up with error:
Error: dlopen(/Users/hmeng/space2/login-test/node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node, 0x0001): tried: '/Users/hmeng/space2/login-test/node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node' (code signature in <6717F568-DB73-35A6-AEF7-71C7B76AB6CC> '/Users/hmeng/space2/login-test/node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node' not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.), '/System/Volumes/Preboot/Cryptexes/OS/Users/hmeng/space2/login-test/node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node' (no such file), '/Users/hmeng/space2/login-test/node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node' (code signature in <6717F568-DB73-35A6-AEF7-71C7B76AB6CC> '/Users/hmeng/space2/login-test/node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node' not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.)
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1810)
at Module._extensions..node (node:internal/modules/cjs/loader:1205:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:1810)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at c._load [as origLoad] (node:electron/js2c/asar_bundle:5:13339)
at PackherdModuleLoader.tryLoad (evalmachine.<anonymous>:1:739547)
at Function.<anonymous> (evalmachine.<anonymous>:1:749730)
at d._load (<embedded>:4594:29304)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at load (/Users/hmeng/space2/login-test/node_modules/node-gyp-build/node-gyp-build.js:22:10)
at Object.<anonymous> (/Users/hmeng/space2/login-test/node_modules/microtime/index.js:1:43)
....<traceback...omitted>
at Object.<anonymous> (/Users/hmeng/space2/login-test/node_modules/@reportportal/client-javascript/lib/helpers.js:4:19)
....<traceback...omitted>
at p.emitUntyped (<embedded>:4357:84346)
at <embedded>:4357:91863
at process.processTicksAndRejections (node:internal/process/task_queues:78:11)
Reporter not found! @reportportal/agent-js-cypress
Context
- I started the RP-service deployed on a ubuntu-24.04 machine in my home LAN, which it was running all good with the same npm lib and text scripts/configs run from local.
- Then i copied over the test script to my mac laptop (Intel x86) in same LAN, and still access the reportportal service that has been deployed on the ubuntu server (all network access related stuff have been set properly...mac can access ubuntu-ip:8080 successfully)
- It fails as below with a reportportal lib blow-up error
- I've tried some searches and quick turnarounds -
no good
- switch to chrome
- node/cypress/lib ver check/tweaks
- cleanup and re-install the dependency (rm -rf node_modules package-lock.json && npm install)
- rebuild microtime (npm rebuild microtime, npm i -g node-gyp, npm rebuild microtime --build-from-source)
- manual force sign
microtime
file (codesign --force --sign - node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node) - arch -x86_64 zsh
Concern
The major error text looks related to signature issue from macos specifically.....not sure if it's certain arch diff related from my macos and how could i get out of this? 😮💨
Error text highlight (easy reads)
Error:
dlopen(/Users/hmeng/space2/login-test/node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node, 0x0001):
tried: '/Users/hmeng/space2/login-test/node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node' (code
signature in <6717F568-DB73-35A6-AEF7-71C7B76AB6CC> '/Users/hmeng/space2/login-test/node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node' not valid for use in process:
mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.),
'/System/Volumes/Preboot/Cryptexes/OS/Users/hmeng/space2/login-test/node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node' (no such file),
'/Users/hmeng/space2/login-test/node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node'
(code signature in <6717F568-DB73-35A6-AEF7-71C7B76AB6CC>
'/Users/hmeng/space2/login-test/node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node'
not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.)
ubuntu vs macos - basic checks
Later i further compared my ubuntu
machine vs macos
machine...it's like below:
ubuntu vs macos - basic checks
// ubuntu
❯ node -v
v18.19.1
❯ node -p "process.arch"
x64
❯ npx cypress -v
Cypress package version: 13.16.1
Cypress binary version: 13.16.1
Electron version: 27.3.10
Bundled Node version: 18.17.1
❯ uname -m
arch
x86_64
x86_64
// macos
❯ node -v
v20.18.1
❯ node -p "process.arch"
x64
❯ npx cypress -v
Cypress package version: 12.17.2
Cypress binary version: 12.17.2
Electron version: 21.0.0
Bundled Node version: 16.16.0
❯ uname -m
arch
x86_64
i386
Appendix
Full error log
"@reportportal/agent-js-cypress" reporter blew up with error:
Running: cypress_test.cy.js (1 of 1)
"@reportportal/agent-js-cypress" reporter blew up with error:
Error: dlopen(/Users/hmeng/space2/login-test/node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node, 0x0001): tried: '/Users/hmeng/space2/login-test/node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node' (code signature in <6717F568-DB73-35A6-AEF7-71C7B76AB6CC> '/Users/hmeng/space2/login-test/node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node' not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.), '/System/Volumes/Preboot/Cryptexes/OS/Users/hmeng/space2/login-test/node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node' (no such file), '/Users/hmeng/space2/login-test/node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node' (code signature in <6717F568-DB73-35A6-AEF7-71C7B76AB6CC> '/Users/hmeng/space2/login-test/node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node' not valid for use in process: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.)
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1810)
at Module._extensions..node (node:internal/modules/cjs/loader:1205:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:1810)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at c._load [as origLoad] (node:electron/js2c/asar_bundle:5:13339)
at PackherdModuleLoader.tryLoad (evalmachine.<anonymous>:1:739547)
at Function.<anonymous> (evalmachine.<anonymous>:1:749730)
at d._load (<embedded>:4594:29304)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at load (/Users/hmeng/space2/login-test/node_modules/node-gyp-build/node-gyp-build.js:22:10)
at Object.<anonymous> (/Users/hmeng/space2/login-test/node_modules/microtime/index.js:1:43)
at Module._compile (node:internal/modules/cjs/loader:1120:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1175:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at c._load [as origLoad] (node:electron/js2c/asar_bundle:5:13339)
at PackherdModuleLoader.tryLoad (evalmachine.<anonymous>:1:739547)
at Function.<anonymous> (evalmachine.<anonymous>:1:749730)
at d._load (<embedded>:4594:29304)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/hmeng/space2/login-test/node_modules/@reportportal/client-javascript/lib/helpers.js:4:19)
at Module._compile (node:internal/modules/cjs/loader:1120:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1175:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at c._load [as origLoad] (node:electron/js2c/asar_bundle:5:13339)
at PackherdModuleLoader.tryLoad (evalmachine.<anonymous>:1:739547)
at Function.<anonymous> (evalmachine.<anonymous>:1:749730)
at d._load (<embedded>:4594:29304)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/hmeng/space2/login-test/node_modules/@reportportal/agent-js-cypress/lib/utils/objectCreators.js:18:23)
at Module._compile (node:internal/modules/cjs/loader:1120:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1175:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at c._load [as origLoad] (node:electron/js2c/asar_bundle:5:13339)
at PackherdModuleLoader.tryLoad (evalmachine.<anonymous>:1:739547)
at Function.<anonymous> (evalmachine.<anonymous>:1:749730)
at d._load (<embedded>:4594:29304)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/hmeng/space2/login-test/node_modules/@reportportal/agent-js-cypress/lib/utils/index.js:19:24)
at Module._compile (node:internal/modules/cjs/loader:1120:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1175:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at c._load [as origLoad] (node:electron/js2c/asar_bundle:5:13339)
at PackherdModuleLoader.tryLoad (evalmachine.<anonymous>:1:739547)
at Function.<anonymous> (evalmachine.<anonymous>:1:749730)
at d._load (<embedded>:4594:29304)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/hmeng/space2/login-test/node_modules/@reportportal/agent-js-cypress/lib/cypressReporter.js:43:5)
at Module._compile (node:internal/modules/cjs/loader:1120:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1175:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at c._load [as origLoad] (node:electron/js2c/asar_bundle:5:13339)
at PackherdModuleLoader.tryLoad (evalmachine.<anonymous>:1:739547)
at Function.<anonymous> (evalmachine.<anonymous>:1:749730)
at d._load (<embedded>:4594:29304)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/hmeng/space2/login-test/node_modules/@reportportal/agent-js-cypress/index.js:1:18)
at Module._compile (node:internal/modules/cjs/loader:1120:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1175:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at c._load [as origLoad] (node:electron/js2c/asar_bundle:5:13339)
at PackherdModuleLoader.tryLoad (evalmachine.<anonymous>:1:739547)
at Function.<anonymous> (evalmachine.<anonymous>:1:749730)
at d._load (<embedded>:4594:29304)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at MultiReporters.processReporterEnabled (/Users/hmeng/space2/login-test/node_modules/cypress-multi-reporters/lib/MultiReporters.js:75:36)
at Array.map (<anonymous>)
at new MultiReporters (/Users/hmeng/space2/login-test/node_modules/cypress-multi-reporters/lib/MultiReporters.js:55:44)
at E.setRunnables (<embedded>:4599:15381)
at Object.onTestsReceivedAndMaybeRecord (<embedded>:4646:388954)
at p.<anonymous> (<embedded>:4646:30516)
at p.emit (node:events:527:28)
at p.emitUntyped (<embedded>:4357:84346)
at <embedded>:4357:91863
at process.processTicksAndRejections (node:internal/process/task_queues:78:11)
Reporter not found! @reportportal/agent-js-cypress
cypress script - reportportal relevant
cypress.config.js clip
const { defineConfig } = require("cypress");
const registerReportPortalPlugin = require('@reportportal/agent-js-cypress/lib/plugin');
module.exports = defineConfig({
reporter: 'cypress-multi-reporters',
reporterOptions: {
reporterEnabled: '@reportportal/agent-js-cypress, mochawesome',
//reporterEnabled: 'mochawesome',
reportportalAgentJsCypressReporterOptions: {
endpoint: `http://${process.env.RP_BASEURL}/api/v1`,
apiKey: process.env.RP_APIKEY,
launch: 'Happy Helming',
//project: 'superadmin_personal',
project: process.env.RP_PROJECT,
description: 'heyoyo...aloha!',
attributes: [
{
key: 'Regression',
value: '14.3',
},
{
value: 'anotherAttributeValue',
},
],
mode: 'DEFAULT',
//autoMerge: true,
},
//reporter: 'mochawesome',
mochawesomeReporterOptions: {
reportFilename: "[name]-report",
overwrite: true,
html: true,
json: true
},
},
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
return registerReportPortalPlugin(on, config);
},
},
...
});
Metadata
Metadata
Assignees
Labels
No labels