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

Junk errors from missing tabs #410

Closed
SwartzCr opened this issue Jun 2, 2015 · 6 comments
Closed

Junk errors from missing tabs #410

SwartzCr opened this issue Jun 2, 2015 · 6 comments

Comments

@SwartzCr
Copy link
Contributor

SwartzCr commented Jun 2, 2015

see this: http://paste.debian.net/195701/
was 'fixed' in #409 but we're still getting some errors, low priority but we should at least track it

@gunesacar
Copy link
Collaborator

Here's the related Chromium bug: #451320. Apparently, it's an issue with Chromium's Extension API.

@SwartzCr
Copy link
Contributor Author

SwartzCr commented Jun 2, 2015

Interesting, and unfortunate
We can of course check thing by calling chrome.tabs.getAll and iterating through that, but this is obviously poor from a performance standpoint. For now I'd say we should just suck up the fact we're gonna have some junk errors (but less than before!)

@SwartzCr SwartzCr closed this as completed Jun 2, 2015
@SwartzCr
Copy link
Contributor Author

errors like this are still happening
Unchecked runtime.lastError while running browserAction.setBadgeText: No tab with id: 826.
at updateCount (chrome-extension://hlhbomhbpchindedocliaflcfgkmobhj/src/background.js:760:26)

and I think they are causing the whole browser to lag, temporarily preventing the user from having control of their computer, reopening this so that we can investigate

@gunesacar
Copy link
Collaborator

I think these errors are due to tabs used for prerendering/prefetching. When I turn off prefetching ("Prefetch resources to load pages more quickly”) I stop getting the errors, which I commonly get when I search something on a new tab (likely to use prefetching). Also see, https://hg.adblockplus.org/adblockpluschrome/file/078e444afa92/chrome/ext/background.js#l195 (Chrome throws an error when you try to get a prerendering tab)

The PR adds a bgTab flag to prerendering tabs and won't call the setBadge functions until the tab becomes visible (with onTabReplaced). I avoided calling chrome.tabs.get too often (e.g. with every request.)

When you make a Google search and click the first link, you should see that the badge is updated almost immediately.

Let me know if you see any problem with this approach.

@SwartzCr
Copy link
Contributor Author

Nice! I like the sound of this approach, I'll test it later today and merge if it seems to be working.

SwartzCr added a commit that referenced this issue Jun 23, 2015
Don't call setBadge functions for prerendered tabs (issue #410).
@SwartzCr
Copy link
Contributor Author

solved in #438

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants