Skip to content
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

GoError string contains faulty URL #2537

Closed
Pej0815 opened this issue May 13, 2022 · 1 comment · Fixed by #2524
Closed

GoError string contains faulty URL #2537

Pej0815 opened this issue May 13, 2022 · 1 comment · Fixed by #2524
Assignees
Labels
Milestone

Comments

@Pej0815
Copy link

Pej0815 commented May 13, 2022

Brief summary

The go error message for requests which tiemout contains a faulty URL.
The follwing characters will be rendered false
%2F -> %!F(MISSING)
%2C -> %!C(MISSING)
%3A -> %!A(MISSING)

Copy&Past such an URL from the message into a browser can end up in different problems than expected.

K6 version 0.35 does not show this behaviour. 0.37 and 0.38 will show faulty URL. Not tested with 0.36.
Only GoError seems to be faulty. console.log and influxdb show correct URL.

k6 version

37, 38

OS

Windows 10, Ubuntu LTS 20.04

Docker version and image (if applicable)

No response

Steps to reproduce the problem

Setup a test with request containing %2F, %2C and %3A in the query parameter
Let the server timeout this request

Behaviour is output of this script test_Faulty.zip
Server way python with time.sleep(62).

Expected behaviour shows output of k6 0.35.0 run on windows 10
Actual behaviour shows output of k6 0.37.0 and 0.38.x

Expected behaviour

ERRO[0060] Get "http://localhost:8080/Test?Image%2Fpng&%2C%3A": request timeout
at go.k6.io/k6/js/common.Bind.func1 (native)
at faultyString (file:///D:/GEO/UDP/Test/test_Faulty.js:46:53(5)) executor=ramping-vus scenario=A01 source=stacktrace

Actual behaviour

ERRO[0060] GoError: Get "http://localhost:8080/Test?Image%!F(MISSING)png&%!C(MISSING)%!A(MISSING)": request timeout
at go.k6.io/k6/js/modules/k6/http.(*RootModule).NewModuleInstance.func2 (native)
at faultyString (file:///D:/GEO/UDP/Test/test_Faulty.js:30:4(5))
at native executor=ramping-vus scenario=A01 source=stacktrace

@mstoykov
Copy link
Contributor

Hi, thank you for reporting this @Pej0815 🙇

This was introduced in v0.36.0, with 3bcdabb. It seems like the previous way returning error was always using panics which ... isn't great IMO. But that was circumventing an issue in the upstream JS VM - goja. I have proposed a fix, and hopefully it will be resolved by the next version.

I will keep this open until we update with that fix.

@mstoykov mstoykov added this to the v0.39.0 milestone May 16, 2022
@mstoykov mstoykov self-assigned this May 16, 2022
mstoykov added a commit that referenced this issue May 16, 2022
This adds:
- exponentiation operator (**)
- nullish coalescing operator(??), which  unusable due to babel
- `Array.prototype.at` and co.
- fixes for optional chains which are also unusable due to babel
- fix for #2537

The addition of the exponentiation operator(**) required update to some
js/compiler test that were using it not being supported as a test for
babel. This also means that it is now disabled as a plugin in babel.
@mstoykov mstoykov linked a pull request May 16, 2022 that will close this issue
mstoykov added a commit that referenced this issue May 18, 2022
This adds:
- exponentiation operator (**)
- nullish coalescing operator(??), which  unusable due to babel
- `Array.prototype.at` and co.
- fixes for optional chains which are also unusable due to babel
- fix for #2537

The addition of the exponentiation operator(**) required update to some
js/compiler test that were using it not being supported as a test for
babel. This also means that it is now disabled as a plugin in babel.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants