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

ignore protocol error from closing tab after Chrome has been killed #1592

Merged
merged 1 commit into from
Feb 1, 2017

Conversation

brendankenny
Copy link
Member

fixes #1583

@patrickhulce
Copy link
Collaborator

This seems to just ignore logging is there not an underlying issue to resolve?
Also won't this not log the scenario Eric was describing in that issue too which seems legitimate, no? Or maybe I'm just totally misunderstanding what the goal is here, haha.

@brendankenny
Copy link
Member Author

This seems to just ignore logging is there not an underlying issue to resolve?

Eric's error is actually "Unable to load the page. Please verify the url you are trying to review." Everything above it is actually just the log statement (since it's logging the error object (including stack) on master, not e.message).

The problem comes from the exception bubbling up and doing chromeLauncher.kill() faster than the close/${pageid} command can be sent, so the protocol ends up trying to close a tab in a Chrome that isn't there anymore.

So, the error is right, the logging is just confusing things in this case.

@patrickhulce
Copy link
Collaborator

Ah, so the only issue was logging it!

@brendankenny
Copy link
Member Author

yeah, it's a little weird because GatherRunner.disposeDriver() is purposefully outside the promise chain so we aren't blocking while the driver disconnects. We thought we should add some logging in #1543 so we'd still notice bad things, but I think this is arguably not a bad thing.

We could get trickier and not exit until we've disconnected or not disconnect if we're going to exit, but if we've already exited Chrome I personally think we just don't care if the close tab command was issued before Chrome closed but too late to do anything.

@ebidel
Copy link
Contributor

ebidel commented Feb 1, 2017

Hilarious. So this does actually does fix the error? It does appear it's just not logging a message. Maybe you can add comment?

Can a test check this?

@brendankenny
Copy link
Member Author

I did add a comment :) More of a comment?

I'm not sure we need a test. It's just suppressing the log when closing the tab in a browser that's already been closed. In a sense, it was already successful :)

@ebidel
Copy link
Contributor

ebidel commented Feb 1, 2017

Maybe just link to #1583? It has all the details.

@brendankenny
Copy link
Member Author

Maybe just link to #1583? It also all the details.

done

@ebidel ebidel merged commit ded6e42 into master Feb 1, 2017
@ebidel ebidel deleted the quiet500 branch February 1, 2017 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

driver.disconnect/Protocol JSON API error
3 participants