You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A "crash" seems to be caused when using setEnvVar to set an environment variable to a response value which is not a string. This only seems to happen when setting equal to a value from the response. If using setEnvVar("value", 123456789) directly it works fine, but if 123456789 is part of the response-object it seems to not handle it correctly.
Example
Given the following response from an API:
{
"value": 123456789,
}
The following script will cause a crash when clicking to configure environment:
@bjornevik Usually strings are expected to be store in thesetEnvVar.
We should be able to fix this by doing a JSON.stringify() before saving and JSON.parse() before fetching
I need to think about this to see if there will be any effects.
Meanwhile, Can you use bru.setVar('key', val) and bru.getVar('name')
This allows storing full objects as well as exploring them in the Variable Viewer
Version: 1.0.0
A "crash" seems to be caused when using
setEnvVar
to set an environment variable to a response value which is not a string. This only seems to happen when setting equal to a value from the response. If usingsetEnvVar("value", 123456789)
directly it works fine, but if123456789
is part of the response-object it seems to not handle it correctly.Example
Given the following response from an API:
The following script will cause a crash when clicking to configure environment:
The following script will fill in the value as expected:
Screenshots
With following postscript:
![CleanShot 2023-11-01 at 13 14 08](https://private-user-images.githubusercontent.com/5864000/279670614-05db2e24-17d7-4217-9b88-02409c137e81.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NDk2NDMsIm5iZiI6MTczOTQ0OTM0MywicGF0aCI6Ii81ODY0MDAwLzI3OTY3MDYxNC0wNWRiMmUyNC0xN2Q3LTQyMTctOWI4OC0wMjQwOWMxMzdlODEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTNUMTIyMjIzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MGFhOWYxZmYyZmJjMGJkZGY1YzdmOWFmNzA3ZTYyMDkyZDM2NGQ2NWYwYmE5OTkwYWRiM2RiYzkwZWUwYTQ2NCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.3c7H9IMCXjAtESF0c98uLUaRIZAYAZ9LCH0QcaG1il0)
After running query:
![CleanShot 2023-11-01 at 13 18 28](https://private-user-images.githubusercontent.com/5864000/279671462-f23e9109-97a5-4e0e-8914-7f5cf82ede05.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NDk2NDMsIm5iZiI6MTczOTQ0OTM0MywicGF0aCI6Ii81ODY0MDAwLzI3OTY3MTQ2Mi1mMjNlOTEwOS05N2E1LTRlMGUtODkxNC03ZjVjZjgyZWRlMDUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTNUMTIyMjIzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjVhMmVlNDdjMjgwMjc0OTQwNzY1MWNlMWMzNGExZmU1MmMyOGI5ZTlmZjcyY2Y4YTRkZmQyZDg5ZmYzZGY5NyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.lrCNKVuetMTyd9Jx1e7S994wLjqaMcpGt13QGNB5gPY)
Results in:
![CleanShot 2023-11-01 at 13 15 11](https://private-user-images.githubusercontent.com/5864000/279670685-3ea53476-b74e-4d3f-ada0-c0d662ab4d98.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NDk2NDMsIm5iZiI6MTczOTQ0OTM0MywicGF0aCI6Ii81ODY0MDAwLzI3OTY3MDY4NS0zZWE1MzQ3Ni1iNzRlLTRkM2YtYWRhMC1jMGQ2NjJhYjRkOTgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTNUMTIyMjIzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjhlYjkzZGQ4N2Q1NjUzNDAzYjMzOTQxODI5MmZjYTRiOGIxNWFkYzE3ZjkyN2ZkNDJiMjFlNzQ4NTc0ZjI4ZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.NYkzno7Zs0zhtCTZY0SnOVe5S24B47LNeameO_UuLZw)
The text was updated successfully, but these errors were encountered: