mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 09:16:03 +03:00
[GH-ISSUE #3675] [bug]: PARSING_ERROR Unable to parse variables inside request body #1266
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#1266
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yvz5 on GitHub (Dec 19, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3675
Originally assigned to: @jamesgeorge007 on GitHub.
Is there an existing issue for this?
Current behavior
When I use a variable inside the request body I get the following error:
my env.json is
the part where the collection has the variable:
Steps to reproduce
1- create an env variable
2- create a request
3- add this env variable into the body
4- run
hopp test -e env.json collection.jsonEnvironment
Production
Version
Local
@jamesgeorge007 commented on GitHub (Dec 20, 2023):
Hi, please share a sample collection and environment (if different from above) export that can be used to reproduce the issue.
@yvz5 commented on GitHub (Dec 21, 2023):
The problem I have is to use variables for the url to send and also put those variables inside the body. the following example shows the error:
a simplified version of the collection:
env.json
@jamesgeorge007 commented on GitHub (Dec 21, 2023):
Thanks for the sample exports. I reproduced the issue and have raised a fix.
This happened since the single environment export format only considered the first variable entry and the resolution step failed to find a match for other entries ending up in the
ENV_EXPAND_LOOPstate.github.com/hoppscotch/hoppscotch@7db7b9b068/packages/hoppscotch-cli/src/options/test/env.ts (L39-L42)github.com/hoppscotch/hoppscotch@7db7b9b068/packages/hoppscotch-data/src/environment/index.ts (L34-L55)@yvz5 commented on GitHub (Dec 21, 2023):
thanks for fixing it. when can I expect it to be released ?
@jamesgeorge007 commented on GitHub (Dec 21, 2023):
This will be part of the
v2023.12.1release that will most probably happen tomorrow.@jamesgeorge007 commented on GitHub (Dec 26, 2023):
This is fixed in CLI v0.5.1.