-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Various Panics using stable k6/browser #4085
Comments
Any chance you could send us a full test script that exhibits this issue when working with |
k6 version 0.55.0 |
Hi, I couldn't create a simple test case to reproduce the issue, but I believe I have identified where it occurs: In func promise(ctx context.Context, fn PromisifiedFunc) *sobek.Promise {
p, resolve, reject := promises.New(GetVU(ctx))
go func() {
v, err := fn()
if err != nil {
reject(err)
return
}
resolve(v)
}()
return p
} There is a race condition where the parent goroutine and its child share the same Attached file is an example from one of my run with the |
Hi, after more looking into this I think I've found at least one possible reason for this to happen. I have opened #4522 it will be really nice if we can get someone to test it with whatever script you have that panics 🙇 . |
Hi @mstoykov, Looks like it's working. Using v0.56.0 tag I was able to get a panic message under 3m systematically, but using the latest commit it is now stable since 20m and I don't have any goroutine race messages as well. Great work! Thanks a lot! |
Very good! thank you for the fix @mstoykov |
Brief summary
k6-browser is throwing various non-repeating errors using the non-experimental k6/browser usually seen within calls to page.evaluate
k6 version
0.55.0
OS
macOS 15.1.1
Docker version and image (if applicable)
docker.desktop 4.35.1 (173168)
Steps to reproduce the problem
Here is an excerpt of our sendSocketChatMsg function that works as expected with the k6/experimental/browser but inevitably panics in different ways within the evaluated callback when using the stable k6/browser. I will post some of the panics I am seeing in the Actual Behavior section
Expected behaviour
This works as expected with the old k6/experimental/browser the call to studentSocketConnectionInstance.sendChatMessage is successful.
Actual behaviour
The text was updated successfully, but these errors were encountered: