thunder-client-support
thunder-client-support copied to clipboard
When cookie name contains . then the extension throws error
Describe the bug When calling a particular API (private authorised oauth2) I get a 200 response, but the data area is empty. Extension details screen shows this error: "Uncaught error found in extension: Field names cannot contain a ." If I generate powershell script from TC for this call it works fine. Also works fine in Postman.
To Reproduce
- Call this particular API. Get 200 response but no data.
- Check extension details - see a new uncaught exception: Field names cannot contain a .
- Generate Powershell script
- Run Powershell script, get 200 response and lots of data.
Expected behavior The data should be returned & displayed in TC
Platform:
- OS: Windows 11
- vscode version: 1.64.2
- extension version: 1.12.2
Solution:
Hi @jmagnetti thanks for reporting the issue.
are you using the token generated in Oauth2 tab for authentication?
I have an environment setup with variables for oauth2, then going to collection settings to generate the token, then inheriting from the request.
On Mon, 28 Feb 2022 at 17:12, Ranga Vadhineni @.***> wrote:
Hi @jmagnetti https://github.com/jmagnetti thanks for reporting the issue.
are you using the token generated in Oauth2 tab for authentication?
— Reply to this email directly, view it on GitHub https://github.com/rangav/thunder-client-support/issues/483#issuecomment-1053954899, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGHDJ45SON6MY6MV6V47ETU5MN4FANCNFSM5PQFZ6TA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
thanks, let me check if i got it right
- you used collection Settings to generate oauth token
- Then you saved he token in env and used env variable in oauth2 tab token field in col settings view
- Then the requests in collection, are inheriting the auth details
- When executing the request the it is failing right?
Can you test the request by using the auth tab in request view, without the collection Settings? to see if there is bug in collection Settings.
also can you share the error message if possible with hiding any sensitive info.
Hi,
- correct, collection settings to generate oauth token - message comes up saved
- no I did not go to env, this step is not part of the flow
- yes the request is in a collection, and set to inherit the auth details
- the request is successful (200 response) but there is no data returned. The same request when run from the generated powershell script also runs with a 200 response but does return data. An error is displayed in the extension runtime status screen: "Field names cannot contain a ."
The same result happens when I use the auth settings in the request to generate the token there. Also note that another request with the same configuration as the one that fails that calls another api on the same endpoint succeeds. I have checked the json returned from the powershell script and it does not contain a field called "names".
I hope this helps. I am open to recording a screencam or some such to show you if this is not clear. I would just ask to send it to you privately.
Thanks,
Joel.
On Mon, 28 Feb 2022 at 21:12, Ranga Vadhineni @.***> wrote:
thanks, let me check if i got it right
- you used collection Settings to generate oauth token
- Then you saved you saved the token in env and used env variable in oauth2 tab token field
- Then the requests in collection, are inheriting the auth details
- When executing the request the it is failing right?
Can you test the request by using the auth tab in request view, without the collection Settings? to see if there is bug in collection Settings.
also can you share the error message if possible with hiding any sensitive info.
— Reply to this email directly, view it on GitHub https://github.com/rangav/thunder-client-support/issues/483#issuecomment-1054146449, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGHDJ23HTVHHJRUW5Z3DKLU5NKATANCNFSM5PQFZ6TA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
@jmagnetti thanks for reply.
could be issue with response json data, recently I fixed this bug https://github.com/rangav/thunder-client-support/issues/88 with different JSON library for formatting and display.
is it possible to share the response data you got from powershell, remove any sensitive info.
@rangav I am ok to email you the data directly, but I am not comfortable posting publicly due to the nature of the contents. Can I please send to an email address? Thanks.
Could the issue be the ips.username cookie?
Hey mate, I think it has more to do with the cookie having a "." in it than the json payload. What do you think?
Thanks,
Joel.
On Tue, 1 Mar 2022 at 15:38, Ranga Vadhineni @.***> wrote:
My email @.***
Please remove any sensitive info from data
— Reply to this email directly, view it on GitHub https://github.com/rangav/thunder-client-support/issues/483#issuecomment-1055041144, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGHDJ2JQUP2YLQTEXQY4NDU5WULTANCNFSM5PQFZ6TA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
Don't know about the cookie issue, let me verify and get back to you
You said another request to different api is working, what is the difference in response properties or cookies?
The working response does not have the cookie with the period in it. That's the major difference I see.
On Tue, 1 Mar 2022 at 15:47, Ranga Vadhineni @.***> wrote:
You said another request to different api is working, what is the difference in response properties or cookies?
— Reply to this email directly, view it on GitHub https://github.com/rangav/thunder-client-support/issues/483#issuecomment-1055045706, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGHDJ7C2EJUOW53TE5U7ETU5WVP7ANCNFSM5PQFZ6TA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
Yes I can notice the same error when there is . in cookie name, but the response was still displayed.
https://www.thunderclient.com/t/cookie

Interesting, yes I have just replicated this too. I'll email you the response json now.
On Tue, 1 Mar 2022 at 16:33, Ranga Vadhineni @.***> wrote:
Yes i can notice the same error where there is . in cookie name, but the response was still displayed.
https://www.thunderclient.com/t/cookie
[image: Screenshot 2022-03-01 at 06 24 58] https://user-images.githubusercontent.com/8637550/156117245-7993fb38-075c-45c2-a185-7f9f9b962cc1.png
— Reply to this email directly, view it on GitHub https://github.com/rangav/thunder-client-support/issues/483#issuecomment-1055074982, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGHDJ76QFD3SUJKVH6MQPLU5W23VANCNFSM5PQFZ6TA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
the response also seems to work fine
Is it possible for you to remove the cookie ips.username and test the response on your side?
Unfortunately I don't control the API so not sure I can do that just in the client?
On Tue, 1 Mar 2022, 4:58 pm Ranga Vadhineni, @.***> wrote:
the response also seems to work fine
Is it possible for you to remove the cookie ips.username and test the response on your side?
— Reply to this email directly, view it on GitHub https://github.com/rangav/thunder-client-support/issues/483#issuecomment-1055088986, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGHDJ6RV6CLERYFSRDF4K3U5W52XANCNFSM5PQFZ6TA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
ok let me fix the issue Field names cannot contain a . and then you can test again.
if header name has . also throws error.
@jmagnetti I have fixed the error, would like to test?
I can upload the pre-released vsix file, let me know
That'd be great, just let me know how :)
On Tue, 1 Mar 2022 at 20:52, Ranga Vadhineni @.***> wrote:
@jmagnetti https://github.com/jmagnetti i have fix the error, would like to test?
I can upload the pre-released vsix file, let me know
— Reply to this email directly, view it on GitHub https://github.com/rangav/thunder-client-support/issues/483#issuecomment-1055297155, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGHDJ3JX3GLEB7VFALA5Z3U5XZH7ANCNFSM5PQFZ6TA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
un-zip the file and install as shown in below image

I installed the file & reloaded the extension. No errors anymore but also no data still. 200 response, 0 bytes. Powershell generated script from the extension still works fine and returns data.
On Tue, 1 Mar 2022 at 21:21, Ranga Vadhineni @.***> wrote:
vscode-thunder-client-1.12.3.vsix.zip https://github.com/rangav/thunder-client-support/files/8161137/vscode-thunder-client-1.12.3.vsix.zip
un-zip the file and install as shown in below image [image: Screenshot 2022-03-01 at 11 20 11] https://user-images.githubusercontent.com/8637550/156160172-a2472913-b43c-4268-a631-d6cd57c3dcf5.png
— Reply to this email directly, view it on GitHub https://github.com/rangav/thunder-client-support/issues/483#issuecomment-1055324324, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGHDJYPDEIXXXZC76LPB5DU5X4VFANCNFSM5PQFZ6TA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
Note: I do get this warning in the powershell results: WARNING: Resulting JSON is truncated as serialization has exceeded the set depth of 2.
On Tue, 1 Mar 2022 at 21:33, Joel Magnetti @.***> wrote:
I installed the file & reloaded the extension. No errors anymore but also no data still. 200 response, 0 bytes. Powershell generated script from the extension still works fine and returns data.
On Tue, 1 Mar 2022 at 21:21, Ranga Vadhineni @.***> wrote:
vscode-thunder-client-1.12.3.vsix.zip https://github.com/rangav/thunder-client-support/files/8161137/vscode-thunder-client-1.12.3.vsix.zip
un-zip the file and install as shown in below image [image: Screenshot 2022-03-01 at 11 20 11] https://user-images.githubusercontent.com/8637550/156160172-a2472913-b43c-4268-a631-d6cd57c3dcf5.png
— Reply to this email directly, view it on GitHub https://github.com/rangav/thunder-client-support/issues/483#issuecomment-1055324324, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGHDJYPDEIXXXZC76LPB5DU5X4VFANCNFSM5PQFZ6TA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
thanks, issue could be something else then.
can you generate curl command and run it and see you get the result?
also can you see if there are any errors in output window

Only items in the output window are:
Environment Used: blah (Active) Request Url: blah
curl command worked perfectly.
On Tue, 1 Mar 2022 at 21:37, Ranga Vadhineni @.***> wrote:
also can you see if there are any errors in output window [image: Screenshot 2022-03-01 at 11 36 16] https://user-images.githubusercontent.com/8637550/156162390-5b70639f-115e-4c7b-a7ec-c096c2e8fca4.png
— Reply to this email directly, view it on GitHub https://github.com/rangav/thunder-client-support/issues/483#issuecomment-1055336720, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGHDJ3VRJP3QGPEK4EVCXTU5X6PBANCNFSM5PQFZ6TA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
can import that curl command again into thunder client, execute the request.

The exported curl had line breaks. I removed them to run the command in windows terminal. It worked fine & returned results in terminal. I imported the curl from my edited version into the extension. It ran, 200 response, no data. Errors did show up as such: [image: image.png]
On Tue, 1 Mar 2022 at 21:50, Ranga Vadhineni @.***> wrote:
can import that curl command again into thunder client, execute the request.
[image: Screenshot 2022-03-01 at 11 49 38] https://user-images.githubusercontent.com/8637550/156164129-64bc972a-241d-49dc-a49e-4742907a8b29.png
— Reply to this email directly, view it on GitHub https://github.com/rangav/thunder-client-support/issues/483#issuecomment-1055345863, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGHDJ7BO4RCR7MTU4KP5B3U5YAANANCNFSM5PQFZ6TA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
what errors you got, cant see any image in above message?
[{ "resource": "Untitled-2", "owner": "typescript", "code": "1005", "severity": 8, "message": "';' expected.", "source": "ts", "startLineNumber": 1, "startColumn": 9, "endLineNumber": 1, "endColumn": 12 },{ "resource": "Untitled-2", "owner": "typescript", "code": "1005", "severity": 8, "message": "';' expected.", "source": "ts", "startLineNumber": 1, "startColumn": 125, "endLineNumber": 1, "endColumn": 131 },{ "resource": "Untitled-2", "owner": "typescript", "code": "1005", "severity": 8, "message": "';' expected.", "source": "ts", "startLineNumber": 1, "startColumn": 150, "endLineNumber": 1, "endColumn": 156 },{ "resource": "Untitled-2", "owner": "typescript", "code": "1005", "severity": 8, "message": "';' expected.", "source": "ts", "startLineNumber": 1, "startColumn": 221, "endLineNumber": 1, "endColumn": 227 }]
On Tue, 1 Mar 2022 at 22:02, Ranga Vadhineni @.***> wrote:
what errors you got, cant see any image in above message?
— Reply to this email directly, view it on GitHub https://github.com/rangav/thunder-client-support/issues/483#issuecomment-1055363699, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGHDJ2H7TFKW5W6MDU4OLDU5YBL5ANCNFSM5PQFZ6TA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>