-
Notifications
You must be signed in to change notification settings - Fork 849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to visualize response after update latest update #13391
Comments
@aksevenli thanks for bringing this to our attention. I was able to reproduce this bug and we are currently investigating the cause. I'll let you know when we have released a fix. I was able to get the script working on the web app. Would you be able to use this as a workaround until we have a fix? |
For some reason I cannot use the web app, because our domain is not public, but currently I can still work with a older version of the desktop app. |
I installed Postman desktop agent to be able to use the web app, the script works, when using the web app. But it does not work on the Desktop App. |
Hi! I have the same problem with v11.27.4 version |
@aksevenli we have released a fix for the issue you mentioned in the latest desktop release would you be able to update your app and confirm if it is working for you? @thamyrisSoares @avechuche would y'all be able to try testing on the latest release? If you're still having issues could you share the request, script, and/or curl for the requests that aren't working for you? |
@jonathanhaviv Hello! Thanks for the news. The latest version (11.28.2) works perfectly |
@jonathanhaviv Thanks, it is working again! |
Great I'm going to close this, but let us know if you have any other issues! |
Is there an existing issue for this?
Describe the Issue
After updating to the latest version of Postman (v11.27.3), I am encountering an issue with the Visualizer feature in the “post-response” in the Scripts tab. Specifically, the pm object, which is essential for Postman-specific scripting, is throwing a ReferenceError: pm is not defined. This error occurs when trying to execute a script for a custom visualization of API responses.
My response has a unique structure, so I can’t directly use post-bot to generate visualization.
This is my script for the visualization, which worked for the older version:
`
<style> .fill, body, html { height: 100%; } table, td, th { border: 1px solid gray; } /* Additions for table cell and header styling */ .my-table th, .my-table td { max-width: 120px; padding: 5px; border: 1px solid #ddd; text-align: left; vertical-align: top; } /* Specific styling for table headers */ .my-table th, .my-table td { white-space: normal; word-wrap: break-word; } /* Reduce the font size for all table content */ .my-table, .my-table th, .my-table td { font-size: 0.8em; } .my-table th { position: sticky; top: 0; background-color: #f0f0f0; z-index: 1; } table { table-layout: fixed; width: 100%; } /* Alternate row coloring */ .my-table tr:nth-child(odd) { background-color: #f9f9f9; /* Light grey for odd rows */ } .my-table tr:nth-child(even) { background-color: #ffffff; /* White for even rows */ } *, html { font-family: Verdana, Arial, Helvetica, sans-serif; } form, h1, h2, h3, h4, h5, li, p, ul { margin: 0; padding: 0; } .container { width: 100%; max-width: none !important; } /* Additional CSS for key-value pairs */ .key-value-pair { background-color: #e8e8e8; /* Light gray background */ border: 1px solid #ccc; /* Light border for distinction */ border-radius: 4px; /* Rounded corners */ padding: 5px; /* Some padding around the text */ margin: 5px 0; /* Margin for spacing between pairs */ font-family: monospace; /* Monospaced font for better readability */ } /* Style adjustments for better spacing and alignment */ .key-value-pair::before { display: inline-block; margin-right: 5px; color: #333; } </style>var template =
// Change to use the entire JSON response
let tableProps = {
json: pm.response.json(),
};
pm.visualizer.set(template, tableProps);
`
Could you confirm if there have been changes in the latest Postman update that affect the pm object or the Visualizer feature? If so, could you provide guidance on how to adapt the script for compatibility with the updated version?
Thank you for your assistance!
Steps To Reproduce
Screenshots or Videos
No response
Operating System
Windows
Postman Version
11.27.3
Postman Platform
Postman App
User Account Type
Signed In User
Additional Context?
No response
The text was updated successfully, but these errors were encountered: