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

Bug with selenium instrumentation #4329

Closed
garrettheel opened this issue May 19, 2024 · 3 comments · Fixed by #4330
Closed

Bug with selenium instrumentation #4329

garrettheel opened this issue May 19, 2024 · 3 comments · Fixed by #4330
Assignees
Labels
bug Something isn't working ci-app

Comments

@garrettheel
Copy link

There is a bug here introduced by #4241

When the plugin is disabled or there is no span available, we end up calling addCookie({value: undefined}) which causes the following error in chromedriver: invalid argument: missing 'value'

We should guard the addCookie in an undefined check.

I'm observing this error on 5.14.0 but it should be present on all versions since 5.11.0 and pretty easy to reproduce if you use selenium.

I can't find any way to workaround this. DD_TRACE_SELENIUM_ENABLED=false doesn't work because the instrumentation still tries to call addCookie.

cc @juan-fernandez

@juan-fernandez
Copy link
Collaborator

hey @garrettheel ! Thanks for reporting the issue. Under what circumstances does this happen? How are you running your selenium tests? Would you mind providing a small reproducible case?

@juan-fernandez
Copy link
Collaborator

I think your issue should be fixed with #4330

@garrettheel
Copy link
Author

That looks like it should fix it, thank you @juan-fernandez!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci-app
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants