Hello, I have a problem with the Runner. I have a POST request with several variables defined in the POST request. This POST request uses an OPTIONS request that contains signature information.
I have added my .PEM key in Postman as a variable. When I execute the POST request alone with the variables, it works; however, when I run the runner, it returns an error.
How are you storing the variable?
Perhaps include a screenshot to provide more context.
And what error is being returned?
i have error → Error: Invalid PEM formatted message.
My variable :
I specify that I can run it outside of the unit runner.
I think there must be a connection with the OPTIONS request used to generate the signature for the POST request.
How are you storing the variables?
Local, Collection or Environment.
Using variables | Postman Learning Center
Check the console logs for the failing requests. You should be able to see the headers and requests. See what is different from a working request. (If its missing any variables or not).
Thanks for your help.
I have already looked into all of that. I feel like my POST request is not loading the OPTIONS request script with the runner. Everything is correct regarding the variables…
In the request itself, I have some variables, but these are present in the file I pass to the runner. However, the rest is in the collection.
So where are the “options” set for the working request.
Are they not stored as a variable?
Do you have a screenshot of the working request?
is Here for my request OPT:
And POST :
Console log your variables, as I suspect its a scoping thing.
The collection runner keeps everything to itself. It’s fairly self contained when it runs.
Therefore I’m not sure the global variable will be available for that run.
However, console log it to prove this either way.
It might need moving to a collection or environment variable. (Do you really need forgeJS available to every collection within Postman?)
I’m assuming that at the end of that pre-request script, it sets a variable of some sort? (Start with console logging that and work backwords through your variables if its not being set correctly).