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

no method '_bindRoutes' in Chrome 22.0.1201.0 dev #1479

Closed
chuangbo opened this issue Jul 11, 2012 · 6 comments
Closed

no method '_bindRoutes' in Chrome 22.0.1201.0 dev #1479

chuangbo opened this issue Jul 11, 2012 · 6 comments

Comments

@chuangbo
Copy link

In the lastest chrome dev 22.0.1201.0, Backbone test suite have a global failure.

Backbone.Events: global failure (1, 0, 1) Rerun

Uncaught TypeError: Object function (attributes, options) {
    var defaults;
    attributes || (attributes = {});
    if (options && options.parse) attributes = this.parse(attributes);
    if (defaults = getValue(this, 'defaults')) {
      attributes = _.extend({}, defaults, attributes);
    }
    if (options && options.collection) this.collection = options.collection;
    this.attributes = {};
    this._escapedAttributes = {};
    this.cid = _.uniqueId('c');
    this.changed = {};
    this._silent = {};
    this._pending = {};
    this.set(attributes, {silent: true});
    // Reset change tracking.
    this.changed = {};
    this._silent = {};
    this._pending = {};
    this._previousAttributes = _.clone(this.attributes);
    this.initialize.apply(this, arguments);
  } has no method '_bindRoutes', http://documentcloud.github.com/backbone/backbone.js:871

Is it a bug of Chrome?

@chuangbo
Copy link
Author

After update 22.0.1201.0, many site on Backbone is down :(

@braddunbar
Copy link
Collaborator

Hey @chuangbo! I'm fairly certain that this is an issue with the latest Chrome. #1475 has more details, including the Chromium bug, which seems to have been fixed already.

@chuangbo
Copy link
Author

Many thanks @braddunbar !

@adambom
Copy link

adambom commented Nov 8, 2013

Seeing this in Android and mobile safari, too...

Here are the user agent strings of the offending browsers I've noticed:

Mozilla/5.0 (Linux; U; Android 4.1.1; hr-hr; Build/JRO03C) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30
Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; PMP5580C Build/IMM76I) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30
Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 Safari/531.21.10

Is there any fix for these users?

@j03w
Copy link
Contributor

j03w commented Nov 9, 2013

@adambom do you get the same exact error? I tried my apps with a few Android device and haven't had any issue so far. Would you mind paste the stack trace here?

@adambom
Copy link

adambom commented Nov 9, 2013

Yeah basically. I'm not personally seeing this, but it's being recorded and sent to a log using window.onerror. I'm also seeing it for Chrome 22.0.1201.0. I guess some people are still running that version.

My backbone version is 1.0.0.

Unfortunately, window.onerror doesn't capture stack traces, but here's the error (sorry for the minified code):

TypeError: Object function (a,b){var c,d=a||{};b||(b={});this.cid=i.uniqueId("c");this.attributes={};i.extend(this,i.pick(b,p));b.parse&&
(d=this.parse(d,b)||{});if(c=i.result(this,"defaults"))d=i.defaults({},d,c);this.set(d,b);this.changed={};this.initialize.apply(this,arguments)} has no method '_bindRoutes'
  File "http://chat.messageme.com/app.min.js", line 294

And here is the beautified version:

function (a, b) {
    var c, d = a || {};
    b || (b = {});
    this.cid = i.uniqueId("c");
    this.attributes = {};
    i.extend(this, i.pick(b, p));
    b.parse &&
        (d = this.parse(d, b) || {});
    if (c = i.result(this, "defaults")) d = i.defaults({}, d, c);
    this.set(d, b);
    this.changed = {};
    this.initialize.apply(this, arguments)
}

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

No branches or pull requests

4 participants