ERR_INVALID_ARG_TYPE: When running latest release
The problem
Started getting a new percy error and may be upgrade related
Environment
- Node version:
-
@percy/cliversion: "^1.29.2", - Version of Percy SDK you’re using:
- If needed, a build or snapshot ID: https://percy.io/00aaa841/enterprise-wc/builds/36079897/failed
- OS version: mac/unix
- Type of shell command-line [interface]: bash
Details
Running the tests gives errors and does not complete.
Debug logs
tim.mcconechy@USROMTMCCONEC02 enterprise-wc % export PERCY_GZIP=true && npx percy exec -- npx playwright test --grep "percy"
[percy] Notice: Percy collects CI logs to improve service and enhance your experience. These logs help us debug issues and provide insights on your dashboards, making it easier to optimize the product experience. Logs are stored securely for 30 days. You can opt out anytime with export PERCY_CLIENT_ERROR_LOGS=false, but keeping this enabled helps us offer the best support and features.
[percy] Percy has started!
[percy] Running "npx playwright test --grep percy"
[WebServer] Dev server listening on port 4444
Running 127 tests using 5 workers
[percy] Snapshot taken: ids-app-menu-light
[percy] Snapshot taken: ids-area-chart-light
✓ 2 [chromium] › ids-area-chart/ids-area-chart.spec.ts:44:9 › IdsAreaChart tests › snapshot tests › should match the visual snapshot in percy (2.4s)
✓ 3 [chromium] › ids-app-menu/ids-app-menu.spec.ts:61:9 › IdsAppMenu tests › snapshot tests › should match the visual snapshot in percy (2.4s)
[percy] Snapshot taken: ids-alert-light
[percy] [] Failed with reason: TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
[percy] [] Failed with reason: TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
[percy] Encountered an error uploading snapshot: ids-app-menu-light
[percy] TypeError: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
node:buffer:319
throw new ERR_INVALID_ARG_TYPE(
^
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
at Function.from (node:buffer:319:9)
at base64encode (file:///Users/tim.mcconechy/Dev/enterprise-wc/node_modules/@percy/client/dist/utils.js:25:17)
at PercyClient.uploadResource (file:///Users/tim.mcconechy/Dev/enterprise-wc/node_modules/@percy/client/dist/client.js:331:26)
at PercyClient.<anonymous> (file:///Users/tim.mcconechy/Dev/enterprise-wc/node_modules/@percy/client/dist/client.js:351:20)
at Generator.next (<anonymous>)
at proceed (file:///Users/tim.mcconechy/Dev/enterprise-wc/node_modules/@percy/client/dist/utils.js:58:22)
at file:///Users/tim.mcconechy/Dev/enterprise-wc/node_modules/@percy/client/dist/utils.js:73:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ERR_INVALID_ARG_TYPE'
}
Code to reproduce issue
- go to branch fix-tests as can be seen on this pr https://github.com/infor-design/enterprise-wc/pull/2766
-
nvm use && npm i -
npx percy exec -- npx playwright test --grep "percy"
Hi, Is this issue still reproducible? - we see that in the recent builds the failing snapshot is being captured (example - https://percy.io/00aaa841/enterprise-wc/builds/36211830/changed/1980008650?browser=chrome&browser_ids=59&group_snapshots_by=similar_diff&subcategories=approved&viewLayout=overlay&viewMode=new&width=1280&widths=375%2C1280)
We are not able to reproduce the issue with the said steps + cli version - the only issue faced was
If the issue still exists,
- Kindly share the cli verbose logs
- Please share the node version you have been using
This issue is stale because it has been open for more than 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.
Closed as stale