Copy from Console broken? Only partial output on clipboard

Until v 7.11.0 it was possible to copy the entire output in the Console. However, in v 7.11.0 only a small portion is copied, even if all the output is selected (ctrl-a).

I have tested both the Windows and Mac versions and both only copy a small portion of the console output to the clipboard.

Anyone else have this issue?

1 Like

Hi FlyingHollander,

Could you share a screenshot of what youā€™re seeing? Iā€™m able to copy all contents of the console, but I do have to expand any nested objects to have them included.

We also have a feature request for raw console output on GitHub. If it seems like this would help your usage, feel free to comment / like: https://github.com/postmanlabs/postman-app-support/issues/4557

Here are some screen captures. I ran a collection from the runner with 217 targets from a CSV-file. Even though I selected all output in the Console, it looks like what is copied to the clipboard is limited to the viewport (or window size).

Note:

  • The problem occurs whether I apply a filter or not.
  • After I ā€œselect allā€ content I can scroll down and see that all content is selected. However, only the visible content (plus a few rows) is copied to the clipboard.
  • The taller the window/viewport, the more data is copied to the clipboard.

Ahh, I see what you mean ā€“ thank you for the detailed screenshots. Iā€™m able to reproduce this behavior in my own client on MacOS.

Iā€™ve filed an issue for our team on GitHub:

I recommend subscribing there for updates. In the meantime, if you need to save console logs from Collection runs one alternative would be using Newman with a reporter:

Maybe not ideal, but hopefully that helps for now.

Thanks for filing the bug report. I wonder if this issue was introduced in v 7.10.0 when the Postman Console was updated to a new user interface.

Newman isnā€™t really an option because of my workflow. Iā€™m looking for a log server that accepts RESTful API data pushes. So far, PRTG looks promising. Graylog might support it also.

If only Postman would allow us to write to a local fileā€¦

Darn. Can you tell me a bit more about your use-case for storing logs? Pushing the log contents to a supportive API (as you suggested) is one way to get around this for now. In fact, if you wanted you could do something like the JS below to push the logs asynchronously:

var oldFn = console.log;

console.log = function (msg) {
    newFn(msg); //could use pm.sendRequest here to send msg to a logging API
    oldFn(msg);
};

console.log('logging here');

@john-paul - Thank you for the code snippet - I didnā€™t know that was possible. I was going to store the output in a variable and write it by using separate requestsā€¦

Iā€™m using PM mainly for two purposes:

  1. Generating ad-hoc reports of configuration items and device status of a couple of hundred network appliances. Iā€™ve been using the console log to collect the output.
  2. Updating configurations of network appliances. For change control purposes I need to be able to save all actions and results for each of the devices that are updated.

I realize there are other tools for this (Ansible (Tower), Jenkins, Chef, Puppet), but for ad-hoc efforts PM is working very well.

That will totally work too! Depending on the API youā€™re working with, it may even be more desirable if you need to account for rate limiting.

Makes sense. Maybe you could even use Airtable?

I like the inline option you mentioned. One of the benefits of using PM in my situation is the modular approach. Being able to just drop requests from our library into a collection really cuts down on the effort. If I were to use a separate request there would be another item to insert and keep track of.

Airtable looks like it could do what I need, but Iā€™m restricted to tools I can run on-prem due to security requirements.

Hello,

The added ā€œfeaturesā€ such as forcing the user to click to see the console log are of little use and of near zero value for those who need to copy from the clipboard.

Will this be fixed any time soon?

Also, if you must insist in having sugar such as timings, and things to click, then create an option where the console is all RAW and where everything on the wire is echoed.

THANKS!

This same issue seems to still be happening under Windows 10, does not appear to be fixed in latest version?

Still broken in 7.16.1 (released 23 Jan, 2020), it seems.

Still broken in 7.18.0 (10 Feb, 2020).

In the meantime Iā€™ve come up with an ugly workaround.

In the CSS, change:

.console-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

to

.console-container {
    display: flex;
    flex-direction: column;
    height: 100000px;
}

This oneā€™s easier.

1 Like

You are some sort of genius dude. Have faced this issue of copying from the console today. I have found your fix as well. Thanks for this :grinning:

Pardon the stupid question, but where is this css ? Postman console is an app window; not sure where is this configuration in the screenshot.

Under View at the header section and Show developer tools

for the original error:

After I ā€œselect allā€ content I can scroll down and see that all content is selected. However, only the visible content (plus a few rows) is copied to the clipboard.

The workaround I found that helped was to group my status messages in to fewer console writes. You can add new lines ā€œ\nā€ and then write another line via a single console write statement. This overall reduced the amount of space needed in the console and actually also cleaned things up and made it more readable. And I could copy more data.

You could log things per run, and store to an env variable, and then if you are on the last run, write out the entire contents of the logged strings. (ie count iterations in the call, and if you know youā€™re running 100, on run 100 write out the log - and it could have just one console write statement, and be easy to copy/paste).
HTH

In the version, the console in the Postman app and web view now has a ā€˜Copy Allā€™ button, which should hopefully remove the need for the workaround.

1 Like

This option is not available yet in Mac OS.