Ankur

Results 69 comments of Ankur

I have tried two fixes, but neither of them are suitable: - https://github.com/grafana/xk6-browser/pull/512: This adds a locking mechanism to ensure that the `clearContext` event is worked on before the `createContext`....

In the [sequence diagram](https://mermaid.live/edit#pako:eNrlWDtv2zAQ_iuEpgR1NHbw4KV10Q5JhqBL6wJmxLNCRLpzqZPbIPB_LylFL0uMpTyHGh7M4z3I77476XwfRKQgmAcZ_M4BI_isZWxkukJhP1tpWEd6K5HFN9Tcly7TIekVS4ZNnnyVqBIwfYUvV-d9Ya1dbrmAZ4vFhwNnc5EBF7LsRMn4Xls1cbYQkQEr-0TI8Jdn3WWxn4A0zXZr1bPen5YnOIhsD2PP_YbxbbTDmCcu3MP2BTEIo-MbFrQRPZjO5Z1AACWYhCKRUQpiJxOtJGvCsPQhEy6F5bKKasP2_KFOGqVDaKyBy1dLC5IMhMaWc59jMIbMo67PSt8tRUBV8cRRcJAnHUwfzSgbiZl2sJQgdywH0S7MLqibR4e2xZtQbLTJ7FruHPjymnKeXycSb0N_Yodi-hCz8kujwIBa7gB5iXnqu19tIyN3v0scDNTC2p93D3ixuwFVZ5l0D69rl3OX1weVhqtUXluAi5U1pOlmpzTdyhjCmJhObj-Gmk4bbT9lWun0M9LHmpbxqe9ohWWHNToTfAMiImMgYpE5X91q7FFlONBktoxmzHC8UaSZQJxptzrWjvr8mdosntkwfLnvPBhs8mXZgEtKiw2Zkg65pQM-0CE8wgdP9NcjhCfgSzNi4r2mUKJ-ROX42j3l3ZiFxM9gl0vEU6j1vQJ0BLmeUKfv06FfoEj_p6Y9gKgBzg0Kab_G2FfTTNtp44CzEeWJEtdQALz-QyZRa2uhxDpnnWi-W4fHkfvZ8fnrxSruzTvv27Ref180EOuMm9Y4ojrdkLHs6o5EvbZ8nEW1WlGUOHDKcGSTauyeWGBDJx6dhSOzG1I9ukU3EN0WBVF05OoxFU7LaDUuBbMgBZNKrezMf-8kq8B2shRWwdz-VLCRecKrYIV7qypzpqs7jIL5RlpOzIJ8a6fH6j-CWmqn9x9E1Xr_D3a3cDM) ([png](https://mermaid.ink/img/pako:eNrlWDtv2zAQ_iuEpgR1NHbw4KV10Q5JhqBL6wJmxLNCRLpzqZPbIPB_LylFL0uMpTyHGh7M4z3I77476XwfRKQgmAcZ_M4BI_isZWxkukJhP1tpWEd6K5HFN9Tcly7TIekVS4ZNnnyVqBIwfYUvV-d9Ya1dbrmAZ4vFhwNnc5EBF7LsRMn4Xls1cbYQkQEr-0TI8Jdn3WWxn4A0zXZr1bPen5YnOIhsD2PP_YbxbbTDmCcu3MP2BTEIo-MbFrQRPZjO5Z1AACWYhCKRUQpiJxOtJGvCsPQhEy6F5bKKasP2_KFOGqVDaKyBy1dLC5IMhMaWc59jMIbMo67PSt8tRUBV8cRRcJAnHUwfzSgbiZl2sJQgdywH0S7MLqibR4e2xZtQbLTJ7FruHPjymnKeXycSb0N_Yodi-hCz8kujwIBa7gB5iXnqu19tIyN3v0scDNTC2p93D3ixuwFVZ5l0D69rl3OX1weVhqtUXluAi5U1pOlmpzTdyhjCmJhObj-Gmk4bbT9lWun0M9LHmpbxqe9ohWWHNToTfAMiImMgYpE5X91q7FFlONBktoxmzHC8UaSZQJxptzrWjvr8mdosntkwfLnvPBhs8mXZgEtKiw2Zkg65pQM-0CE8wgdP9NcjhCfgSzNi4r2mUKJ-ROX42j3l3ZiFxM9gl0vEU6j1vQJ0BLmeUKfv06FfoEj_p6Y9gKgBzg0Kab_G2FfTTNtp44CzEeWJEtdQALz-QyZRa2uhxDpnnWi-W4fHkfvZ8fnrxSruzTvv27Ref180EOuMm9Y4ojrdkLHs6o5EvbZ8nEW1WlGUOHDKcGSTauyeWGBDJx6dhSOzG1I9ukU3EN0WBVF05OoxFU7LaDUuBbMgBZNKrezMf-8kq8B2shRWwdz-VLCRecKrYIV7qypzpqs7jIL5RlpOzIJ8a6fH6j-CWmqn9x9E1Xr_D3a3cDM)) I've outlined how the stateful/FSM handler system will intercept and deal with incoming events. Here are the details of the actors: - `Init` is a...

@imiric thanks for reviewing it. Yep, I should have a PR ready soon for you to look at. > The state transition DAG should make a createContext -> createContext transition...

> Intuitively, a simple global channel might do the trick, but we'll need to experiment and see what works best. Sounds like we're talking about different solutions. Let's discuss in...

Ok, WDYT?: To ensure that the event publishing [goroutines](https://github.com/grafana/xk6-browser/blob/ae264530b6fbe0285ac9df9b0f4a907b460bb805/common/event_emitter.go#L183) don't break the ordering of the emitted events, we could get the [emitEvent](https://github.com/grafana/xk6-browser/blob/ae264530b6fbe0285ac9df9b0f4a907b460bb805/common/event_emitter.go#L168) goroutines to synchronise. What I mean by this...

We believe that this has been resolved (for now) with PR #555 (issue #553, which was created due to this and the deadlock issue #496). We have ran several tests...

I was able to reproduce this somewhat easily when stress testing the `locator` api tests: ``` go test -c -race -o ./xk6-browser.test ./tests cd tests gostress -test.run TestLocator/ -test.v -test.timeout...

We think the deadlock issue in the cloud ([#496](https://github.com/grafana/xk6-browser/issues/496)) is the same as issue as the test timeout issue in waitForExecutionContext ([#482](https://github.com/grafana/xk6-browser/issues/482)). [deadlock-cloud-stacktrace.txt](https://github.com/grafana/xk6-browser/files/9375386/deadlock-cloud-stacktrace.txt) The fix and further details will be...

We believe that this has been resolved (for now) with PR #555 (issue #553, which was created due to the deadlock issue). We have ran several tests locally and int...

This works with the default `BrowserContext`, but it doesn't work when a second context is created.