Comments (8)
Hi @0erty,
Are you using the Response Body
tag from another request or do you store the value in the environment?
The second option is not supported (related Issue)
Otherwise you might want to check if the Trigger behavior
in the Response Body
tag's settings is not set to Never
as this could run fine in Insomnia because you have a previous response but not on the cli
from insomnia.
Hi @gatzjames, I tried it in both options and it doesn't work. We can see that it works in desktop but not in CLI. And I use "Always" setting in Trigger behaviour.
from insomnia.
Could you run the CLI with the --verbose flag?
This will provide more context into what is happening
from insomnia.
@gatzjames fyi
Collection
[plugin] Loading
[response tag] Resending dependency
Error rendering template Template render error: (unknown path) [Line 1, Column 1]
attempted to output null or undefined value
at Object._prettifyError (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js)
at /snapshot/insomnia/packages/insomnia-send-request/dist/index.js
at Template2.root [as rootRenderFunc] (eval at _compile (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js), <anonymous>:18:3)
at Template2.render3 [as render] (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js)
at Environment4.renderString (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js)
at /snapshot/insomnia/packages/insomnia-send-request/dist/index.js
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Failed to render element url {{ _.base_url }}/client-api/v1/auth/login
Error rendering template Template render error: (unknown path)
Error: attempted to output null or undefined value
at Object._prettifyError (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js)
at /snapshot/insomnia/packages/insomnia-send-request/dist/index.js
at eval (eval at _compile (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js), <anonymous>:11:11)
at /snapshot/insomnia/packages/insomnia-send-request/dist/index.js
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Failed to render element Environment cookie1={% response 'body', 'req_9a7e36ca9dc54432b5253d61fad75936', 'b64::JC5tb25vbGl0aC5jb29raWU=::46b', 'always', 60 %}; Expires=Tue, 19 Jan 2038 03:14:07 GMT; Domain=appfollow.io; Path=/
[response tag] Resending dependency
Error rendering template Template render error: (unknown path) [Line 1, Column 1]
attempted to output null or undefined value
at Object._prettifyError (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js)
at /snapshot/insomnia/packages/insomnia-send-request/dist/index.js
at Template2.root [as rootRenderFunc] (eval at _compile (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js), <anonymous>:18:3)
at Template2.render3 [as render] (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js)
at Environment4.renderString (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js)
at /snapshot/insomnia/packages/insomnia-send-request/dist/index.js
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Failed to render element url {{ _.base_url }}/client-api/v1/auth/login
Error rendering template Template render error: (unknown path)
Error: attempted to output null or undefined value
at Object._prettifyError (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js)
at /snapshot/insomnia/packages/insomnia-send-request/dist/index.js
at eval (eval at _compile (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js), <anonymous>:11:11)
at /snapshot/insomnia/packages/insomnia-send-request/dist/index.js
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Failed to render element Environment cookie2={% response 'body', 'req_9a7e36ca9dc54432b5253d61fad75936', 'b64::JC5jbGllbnRfYXBpLmFjY2Vzc190b2tlbg==::46b', 'always', 60 %}; Expires=Tue, 19 Jan 2038 03:14:07 GMT; Domain=appfollow.io; Path=/
[response tag] Resending dependency
Error rendering template Template render error: (unknown path) [Line 1, Column 1]
attempted to output null or undefined value
at Object._prettifyError (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js)
at /snapshot/insomnia/packages/insomnia-send-request/dist/index.js
at Template2.root [as rootRenderFunc] (eval at _compile (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js), <anonymous>:18:3)
at Template2.render3 [as render] (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js)
at Environment4.renderString (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js)
at /snapshot/insomnia/packages/insomnia-send-request/dist/index.js
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Failed to render element url {{ _.base_url }}/client-api/v1/auth/login
Error rendering template Template render error: (unknown path)
Error: attempted to output null or undefined value
at Object._prettifyError (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js)
at /snapshot/insomnia/packages/insomnia-send-request/dist/index.js
at eval (eval at _compile (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js), <anonymous>:11:11)
at /snapshot/insomnia/packages/insomnia-send-request/dist/index.js
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Failed to render element headers[0].value cookie1={% response 'body', 'req_9a7e36ca9dc54432b5253d61fad75936', 'b64::JC5tb25vbGl0aC5jb29raWU=::46b', 'always', 60 %};cookie2={% response 'body', 'req_9a7e36ca9dc54432b5253d61fad75936', 'b64::JC5jbGllbnRfYXBpLmFjY2Vzc190b2tlbg==::46b', 'always', 60 %}
1) Check collection
0 passing (25ms)
1 failing
1) Collection
Check collection:
Error: attempted to output null or undefined value
at /snapshot/insomnia/packages/insomnia-send-request/dist/index.js
at /snapshot/insomnia/packages/insomnia-send-request/dist/index.js
at RawTask.call (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js)
at flush (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js)
at Timeout.handleTimer (/snapshot/insomnia/packages/insomnia-send-request/dist/index.js)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7)
from insomnia.
@0erty from the logs it looks like there might be a missing variable in the selected environment?
[response tag] Resending dependency
Request chaining seems to work since inso is trying to send the request but fails to find an env variable?
from insomnia.
@gatzjames This variable is in the environment, but it seems that Insomnia does not write the received value from the previous request to it. I downgraded to version 3.8, everything works fine there
from insomnia.
Yep storing a chained request result to the environment is not supported by inso since it would need to recursively evaluate the environment. In that version I think we did a double pass but that led to other substantial issues and was removed.
I'd suggest using the response tag directly in the places you want to use the response instead of the environment.
We are also working on pre-request/after-response scripts atm so once these are available in inso you will be able to manipulate the env from there.
from insomnia.
Closing this since saving responses on environment data is not supported and will be possible later when pre-request/after-response scripts become available in Inso-CLI.
from insomnia.
Related Issues (20)
- Cookies do not get saved when there is any After-Response script HOT 2
- Low contrast ratio of GET and DELETE labels HOT 5
- Failed to query createProject: ERROR: insert or update on table "projects" violates foreign key constraint "projects_team_project_id_fkey" (SQLSTATE 23503) HOT 10
- Collapse-all json keybind in response preview stalls program on very large json response HOT 1
- The memory leak issue is still present in version 9.3.3 HOT 3
- Insomnia failed save enviroment variable using after-response script HOT 3
- Allow custom oauth_signature with PLAINTEXT method.
- Remove Older Versions of the Application After Update on Windows HOT 1
- When pasting CURL request into url input and importing the request, insomnia creates new request, and keeps old one with corupted imput from CURL HOT 3
- Where did folder environments go in 9.3.3? HOT 2
- Insomnia in Ubuntu Focal fresh install raises an error: GLIBC_2.32
- Disabling Automatically encode special characters in URL does not work for param key
- Cookies are still not being set if there is any after-request script HOT 1
- Requests don't pick up new OAuth 2.0 token HOT 6
- Cannot import OpenAPI spec (fio bank) HOT 8
- Typo on Settings/Account page https://app.insomnia.rest/app/settings/account
- Cookie not getting set when using post response script HOT 1
- Requests are gone after an update HOT 2
- Can't show response example like postman
- inso lint does not load custom .spectral.yml when linting API specs using --exportFile flag
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from insomnia.