Help get this topic noticed by sharing it on Twitter, Facebook, or email.
I’m amused

No Execution in New Tab on Chrome ("No tab with id")

Race condition: Crossrider extensions do not run on cached sites, in new tabs on Chrome.

- Tested in OS X Mountain Lion & Windows 8.
- Affects ALL Crossrider extensions.
- Does not effect Firefox or Safari.

Videos describing the issue:
https://www.youtube.com/watch?v=exLyo...
https://www.youtube.com/watch?v=8hXRL...

When the user types a URL into the Chrome address bar, Chrome gets smart and starts pre-fetching the page. If the site returns 304 Not Modified, Chrome will load the page from the cache before the user has finished typing the URL, and Crossrider will then try and inject the extension script for that tab. However, Chrome will not start a new tab process for the page until the user hits enter. So Crossrider attempts to execute code on tab that does not yet exist and fails with the following error code in the background.html console:

___START___
tabs.get: No tab with id: 354.
at Object.Crossrider.addUserScripts (chrome-extension://geiodgjbfgibbmimohdnafognnibklfo/js/background.js:1:21678)
at Object.Crossrider._onRequest (chrome-extension://geiodgjbfgibbmimohdnafognnibklfo/js/background.js:1:19860) lastError:29
set
___END___

Disabling the Chrome setting: "Settings > Privacy > Predict Network Actions" prevents Chrome's pre-fetching behavior. Once disabled, this race-condition disappears.

Note: the pre-fetching behavior only happens when the user does not press enter to load the new page within 1 second.

May relate to: https://getsatisfaction.com/crossride...

Please could you let me know if there is a known work-around, or a fix in the pipeline for this? This issue will determine whether we decide to use Crossrider to deliver our extension.

Thanks for your time.

Alistair

7 people have
this problem
+1
Reply