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

Unable to configure timeout on commands #175

Open
ccapitalKW opened this issue Sep 11, 2023 · 3 comments
Open

Unable to configure timeout on commands #175

ccapitalKW opened this issue Sep 11, 2023 · 3 comments
Labels
good first issue Good for newcomers

Comments

@ccapitalKW
Copy link

Hello,

I am attempting to use this library to trigger a heap snapshot in chrome. There is a hardcoded timeout of 30 seconds built in to the library, which gets exceeded by the heap snapshot command if the tab being snapshot-ed is too large (in the order of 10s of millions of heap objects). I don't see any way to configure the timeout for a command in the API provided by this crate, I am currently working around it by bumping the limit in a fork of the repo. Is there a better way to do this?

Thank you in advance.

@mattsse
Copy link
Owner

mattsse commented Sep 11, 2023

supportive of making this configurable, happy to accept a pr for that

@mattsse mattsse added the good first issue Good for newcomers label Sep 11, 2023
@ccapitalKW
Copy link
Author

ccapitalKW commented Sep 13, 2023

I guess this is already partially solved by 379d9c7, since it adds an (undocumented) method to create a browser connection using a specified timeout. I think it doesn't cover newly launched instances though.

Edit: Nvm, I just tried configuring it using that and it still times out. I guess there must be some other timeout it's using?

@chirok11
Copy link
Contributor

@ccapitalKW
You may try src/handler/commandfuture.rs and modifying L50.
If it helps, then need PR to implement ability to configure command timeout and pass to commandfuture.

Yes, mentioned commit adds an method to create browser and provide custom timeout (in past it was fixed to 60s), but it relates only to request timeout (when waiting till page load).

But it does not relate to command's.

You have to try to modify mentioned file and tell if it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants