Giter Site home page Giter Site logo

Comments (8)

gatzjames avatar gatzjames commented on September 28, 2024

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.

0erty avatar 0erty commented on September 28, 2024

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.
image

from insomnia.

gatzjames avatar gatzjames commented on September 28, 2024

Could you run the CLI with the --verbose flag?
This will provide more context into what is happening

from insomnia.

0erty avatar 0erty commented on September 28, 2024

@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.

gatzjames avatar gatzjames commented on September 28, 2024

@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.

0erty avatar 0erty commented on September 28, 2024

@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.

gatzjames avatar gatzjames commented on September 28, 2024

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.

gatzjames avatar gatzjames commented on September 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.