-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Line 86 in d132977
| const { uploaded } = JSON.parse(body); // body is json |
For the line above the API (/build/upload/snapshot) responded with a non-JSON answer.
My HTML snapshot was 1.530.769 bytes large, because the CSS was inserted inline.
Error
SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at Client.uploadSnapshot (/home/jaller94/Git/kiprotect/kiprotect-app/node_modules/@getbasset/node-client/lib/client.js:87:31)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at Basset.uploadSnapshotFile (/home/jaller94/Git/kiprotect/kiprotect-app/node_modules/@getbasset/node-client/lib/basset.js:71:5)
Code submitting the snapshots
export BASSET_APP_URL=https://app.basset.io
export BASSET_TOKEN=*REDACTED*
My upload code is copied from this file:
https://github.com/basset/basset/blob/200088fe30353c0eeedfb1e824c9ac8a38e92aa2/express/tests/selenium/config/snapshots.js#L68-L88
Actual network response
With the HTTP code 413 I got the following response:
<html>
<head><title>413 Request Entity Too Large</title></head>
<body>
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>openresty/1.15.8.2</center>
</body>
</html>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels