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

extension: fix 'Couldn't resolve current tab' #5885

Closed
wants to merge 1 commit into from

Conversation

wardpeet
Copy link
Collaborator

Summary

bugfix

it fixes the cannot resolve tab issue in the extension
lighthouse-resolve-tab

Related Issues/PRs

fixes #5668

This fix makes it easier to get this bug #5872

@brendankenny brendankenny changed the title extension(resolve-tab): fix can't resolve extension: fix 'Couldn't resolve current tab' Aug 22, 2018
Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this avoids the issue for the URL (always using the version queried and stored when the popup first opens), but does this solve the issue of not being able to resolve the tab?

runLighthouseInExtension() creates the ExtensionProtocol connection, but it's not until gatherRunner.run() -> driver.connect() -> connection.connect() -> _getCurrentTabId() -> _queryCurrentTab() that it gets the tab ID to attach to. Based on your investigation in #5668 (comment) it seems like that query would fail at that point if the user has lost access to the tab?

@brendankenny
Copy link
Member

Maybe popup.js could also query and save the tab ID and the ExtensionProtocol constructor could take that as an argument, rather than trying to get it itself. We'd have to think through if there are downsides to that rather than letting it take care of itself...

@wardpeet
Copy link
Collaborator Author

wardpeet commented Aug 24, 2018

Not 100% sure what you're referring too. We fail on the first call const url = await connection.getCurrentTabURL(); lighthouse-ext-background.js#L67.

the tabid can still be resolved just fine so that's why I did not add it as a parameter but i'm not against it. We should validate if the tabid is still available that's all, I can't think of a downside atm.

@GodLesZ
Copy link

GodLesZ commented Feb 14, 2019

Any progress on this @brendankenny @wardpeet ?
Just getting the error all the time and a fix would be rly nice

@wardpeet
Copy link
Collaborator Author

@GodLesZ could you tell us which site you're auditing and what extensions you have ?

@GodLesZ
Copy link

GodLesZ commented Feb 18, 2019

@GodLesZ could you tell us which site you're auditing and what extensions you have ?

I'm testing the chrome extension on the latest chrome (already tested on canary & stable) and always get this error.
Maybe this is related to the fact, that the SSL certificate of the (only local accessible) page is not valid?

Currently we're not able to get lighthouse reports of untrusted websites, so I hope this extension is able to generate this?

@brendankenny
Copy link
Member

At this point, I don't think we're going to move on this :)

@brendankenny brendankenny deleted the bug/extension-tab branch May 20, 2019 18:24
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.

☂️bug: Extension Error: Couldn't resolve current tab. Check your URL, reload, and tr
4 participants