-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
Description
Brief summary
import http from 'k6/http'
export default function () {
let response = http.get(`https://test.k6.i`)
response.headers["key"] = "value"
}k6 version
v1.3.0
OS
linux
Docker version and image (if applicable)
No response
Steps to reproduce the problem
run
import http from 'k6/http'
export default function () {
let response = http.get(`https://test.k6.i`)
response.headers["key"] = "value"
}Expected behaviour
Exception
Actual behaviour
Panic
github.com/grafana/sobek.(*Runtime).runWrapped.func1()
github.com/grafana/[email protected]/runtime.go:2521 +0xe5
panic({0x1afd440?, 0x319b910?})
runtime/panic.go:783 +0x132
github.com/grafana/sobek.(*vm).handleThrow(0xc0001b18c0, {0x1afd440, 0x319b910})
github.com/grafana/[email protected]/vm.go:847 +0x425
github.com/grafana/sobek.(*vm).try.func1()
github.com/grafana/[email protected]/vm.go:866 +0x3f
panic({0x1afd440?, 0x319b910?})
runtime/panic.go:783 +0x132
github.com/grafana/sobek.(*vm).handleThrow(0xc0001b18c0, {0x1afd440, 0x319b910})
github.com/grafana/[email protected]/vm.go:847 +0x425
github.com/grafana/sobek.(*vm).runTryInner.func1()
github.com/grafana/[email protected]/vm.go:889 +0x3f
panic({0x1afd440?, 0x319b910?})
runtime/panic.go:783 +0x132
reflect.mapassign_faststr0(0x1b3f320, 0xc00089b278?, {0xc0000108e0?, 0xc0004e0750?}, 0xc0004e0750)
runtime/map_swiss.go:264 +0x25
reflect.mapassign_faststr(0x1a42020?, 0xc0004e0750?, {0xc0000108e0, 0x3}, 0x19?)
reflect/value.go:3686 +0xa5
reflect.Value.SetMapIndex({0x1b3f320?, 0xc0005c0910?, 0xc000483f10?}, {0x1a42020, 0xc0004e0730, 0x98}, {0x1a42020, 0xc0004e0750, 0x198})
reflect/map_swiss.go:427 +0x225
github.com/grafana/sobek.(*objectGoMapReflect)._put(0xc000262a00, {0x1a42020, 0xc0004e0730, 0x98}, {0x2197cc0?, 0xc000483f10?}, 0x1)
github.com/grafana/[email protected]/object_gomap_reflect.go:116 +0x131
github.com/grafana/sobek.(*objectGoMapReflect).setOwnStr(0xc000262a00, {0xc0000108e0, 0x3}, {0x2197cc0, 0xc000483f10}, 0x1)
github.com/grafana/[email protected]/object_gomap_reflect.go:147 +0x25c
github.com/grafana/sobek.setPropStrictP.exec({0xc0000108e0?, 0xc000483f10?}, 0xc0001b18c0)
github.com/grafana/[email protected]/vm.go:2400 +0x8a
github.com/grafana/sobek.(*vm).run(0xc0001b18c0)
github.com/grafana/[email protected]/vm.go:642 +0x5b
github.com/grafana/sobek.(*vm).runTryInner(0xc0001b18c0?)
github.com/grafana/[email protected]/vm.go:893 +0x52
github.com/grafana/sobek.(*baseJsFuncObject).__call(0xc00038f8c0, {0xc0007041a0?, 0x1, 0x1cb84a0?}, {0x0, 0x0}, {0x2197f20?, 0x3207b40?})
github.com/grafana/[email protected]/func.go:434 +0x711
github.com/grafana/sobek.(*baseJsFuncObject)._call(...)
github.com/grafana/[email protected]/func.go:450
github.com/grafana/sobek.(*baseJsFuncObject).call(0x7f1f60caa3e8?, {{0x2197f20, 0x3207b40}, {0xc0007041a0, 0x1, 0x1}}, {0x0?, 0x0?})
github.com/grafana/[email protected]/func.go:458 +0x6d
github.com/grafana/sobek.(*baseJsFuncObject).Call(...)
github.com/grafana/[email protected]/func.go:390
github.com/grafana/sobek.AssertFunction.func1.1()
github.com/grafana/[email protected]/runtime.go:2481 +0x56
github.com/grafana/sobek.(*vm).try(0xc0001b18c0, 0xc000909908)
github.com/grafana/[email protected]/vm.go:870 +0x234
github.com/grafana/sobek.(*Runtime).runWrapped(0xc00037b408, 0x47e585?)
github.com/grafana/[email protected]/runtime.go:2525 +0x5f
github.com/grafana/sobek.AssertFunction.func1({0x2197f20?, 0x3207b40?}, {0xc0007041a0?, 0x1?, 0x1?})
github.com/grafana/[email protected]/runtime.go:2480 +0x8c
go.k6.io/k6/internal/js.(*VU).runFn.func2()
go.k6.io/k6/internal/js/runner.go:922 +0x3e
go.k6.io/k6/internal/js/eventloop.(*EventLoop).Start(0xc000030050, 0xc00090a3c0)
go.k6.io/k6/internal/js/eventloop/eventloop.go:179 +0x197
go.k6.io/k6/internal/js.(*VU).runFn(0xc00058dd60, {0x217ff68, 0xc0009140f0}, 0x1, 0xc000918060, 0xc000704180, {0xc0007041a0, 0x1, 0x1})
go.k6.io/k6/internal/js/runner.go:921 +0x269
go.k6.io/k6/internal/js.(*ActiveVU).RunOnce(0xc00044e040)
go.k6.io/k6/internal/js/runner.go:854 +0x487
go.k6.io/k6/lib/executor.PerVUIterations.Run.getIterationRunner.func7({0x217ff30, 0xc00090a180}, {0x216de80?, 0xc00044e040?})
go.k6.io/k6/lib/executor/helpers.go:108 +0x4a
go.k6.io/k6/lib/executor.PerVUIterations.Run.func5({0x21775a8, 0xc00058dd60})
go.k6.io/k6/lib/executor/per_vu_iterations.go:228 +0x39a
created by go.k6.io/k6/lib/executor.PerVUIterations.Run in goroutine 67
go.k6.io/k6/lib/executor/per_vu_iterations.go:241 +0xb85