Getting error in evaluating the pre request script

while sending a request i’m getting:

There was an error in evaluating the Pre-request Script:TypeError: Cannot read properties of undefined (reading 'sigBytes')

the pre request script is empty
what can cause this error?

Details (like screenshots):

it just happens on every request i try to send

I’ve already tried: creating a new request, and it happens again

Hi @payload-meteorologis,

Welcome to the community :wave:

First verify if the request is saved. Next, as the error still points towards the pre-request scripts, I suspect this could be due to the collection level “Pre-request” scripts entered. Can you click on the collection and see if there is any script added there, if yes clear them next and let me know if that helps.

1 Like

Hi! Thank you for the fast response.
When i save the the request, the error still points towards the pre request script even though there is no pre request script right now.
there is also no script on the collection level.
it is very strange.
when i open a new request, first it doesn’t happen, but after i add the script, i can’t undo it.
if i remove the script, i still get errors fro the pre request script
EDIT: Oh sh**, i found a sub folder that has pre request script

1 Like

Hello, I have the same problem! Did you find any solution?

Hey @emploi :wave:

Welcome to the Postman Community! :postman:

Can you explain in more detail, your issue please? This original issue has been solved and your context might not be the same.

Hello thanks for the answer :slight_smile: I try to execute a request (which is already saved: its in a workspace) and i have the same error There was an error in evaluating the Pre-request Script:Error: "undefined" is not valid JSON but Pre-request script is empty. An other collegue using the same workspace has no problem.

Do you have a script at another level which isn’t saved?

Pre-request scripts could be added at the Collection and Folder level.

in the same workspace? no i don’t think but its hard to check

In the Collection that you’re using. That error wouldn’t be coming from the Workspace.

Collection pre-request:

Folder pre-request:

Request pre-request:

thank you for your help found it!

1 Like