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

TypeError: Invalid value used as weak map key during destroy() #14512

Closed
Turbo87 opened this issue Oct 24, 2016 · 14 comments
Closed

TypeError: Invalid value used as weak map key during destroy() #14512

Turbo87 opened this issue Oct 24, 2016 · 14 comments

Comments

@Turbo87
Copy link
Member

Turbo87 commented Oct 24, 2016

I've just been reported the following error running v2.10.0-beta.1:

TypeError: Invalid value used as weak map key
  at peekMeta(bower_components/ember/ember.prod.js:17979:0)
  at destroy(bower_components/ember/ember.prod.js:17632:0)
  at deleteMeta(bower_components/ember/ember.prod.js:18017:0)
  at destroy(bower_components/ember/ember.prod.js:21348:0)
  at apply(bower_components/ember/ember.prod.js:33980:0)
  at invoke(bower_components/ember/ember.prod.js:335:0)
  at flush(bower_components/ember/ember.prod.js:396:0)
  at flush(bower_components/ember/ember.prod.js:520:0)
  at end(bower_components/ember/ember.prod.js:590:0)
  at apply(bower_components/ember/ember.prod.js:704:0)
  at join(bower_components/ember/ember.prod.js:735:0)
  at arg1(bower_components/ember/ember.prod.js:10514:0)
  at _trigger(bower_components/ember/ember.prod.js:625:0)
  at end(bower_components/ember/ember.prod.js:601:0)
  at apply(bower_components/ember/ember.prod.js:704:0)
  at apply(bower_components/ember/ember.prod.js:735:0)
  at join(bower_components/ember/ember.prod.js:20303:0)
  at callback(bower_components/ember/ember.prod.js:38386:0)
  at flaggedInstrument(bower_components/ember/ember.prod.js:16560:0)
  at handleEvent(bower_components/ember/ember.prod.js:38385:0)
  at handleEvent(bower_components/ember/ember.prod.js:37281:0)
  at _bubbleEvent(bower_components/ember/ember.prod.js:37839:0)
  at apply(bower_components/ember/ember.prod.js:37761:0)
  at elem(bower_components/jquery/jquery.js:5095:0)
  at elem(bower_components/jquery/jquery.js:4766:0)

Stack trace without source maps

TypeError: Invalid value used as weak map key
  at e.peekMeta.O(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:9:2391)
  at s.destroy(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:9:287)
  at Object.p [as deleteMeta](/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:8:31574)
  at Object.u [as destroy](/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:9:24575)
  at p.PrototypeMixin.n.Mixin.create.s._scheduledDestroy(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:12:12474)
  at a.invokeWithOnError(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:4:12300)
  at Object.a.flush(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:4:12756)
  at Object.l.flush(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:4:13526)
  at Object.h.end(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:4:13871)
  at Object.h.run(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:4:14943)
  at Object.h.join(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:4:15067)
  at Array.p(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:6:23101)
  at Object.h._trigger(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:4:14130)
  at Object.h.end(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:4:14006)
  at Object.h.run(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:4:14943)
  at Object.h.join(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:4:15067)
  at Function.u.join(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:9:19837)
  at ? (/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:13:13972)
  at Object.e.flaggedInstrument.d [as flaggedInstrument](/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:8:24792)
  at Object.t.assign.handleEvent(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:13:13896)
  at e.default.n.Mixin.create.l.handleEvent(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:13:4511)
  at e.default.r.Object.extend._bubbleEvent(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:13:7102)
  at HTMLAnchorElement.<anonymous>(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:13:6336)
  at HTMLBodyElement.ce.event.dispatch(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:3:1695)
  at HTMLBodyElement.v.handle(/assets/vendor-6d4f9fce143a0a7254965d0f2c73d4b2.js:2:30415)

This was reported from a production build with source maps, so don't trust the stack trace too much... according to sentry.io the browser that hit this was Chrome Mobile 38 on Android 6.0.

@backspace reported a similar issue in #dev-ember (feel free to paste your call stack here as well)

@Serabe
Copy link
Member

Serabe commented Oct 24, 2016

Is this with an empty app?

@backspace
Copy link

backspace commented Oct 24, 2016

Yes, travis-web has a similar error in Chrome 53 and 56 (canary). Most things don’t render, presumably because of it?

Uncaught TypeError: Invalid value used as weak map key
    at WeakMap.set (native)
    at WeakMap_setMeta (http://localhost:4200/assets/vendor.js:34224:19)
    at Object.meta (http://localhost:4200/assets/vendor.js:34325:5)
    at Object.watchKey (http://localhost:4200/assets/vendor.js:37418:37)
    at new RootPropertyReference (http://localhost:4200/assets/vendor.js:29345:21)
    at RootReference.get (http://localhost:4200/assets/vendor.js:29251:44)
    at Object.referenceFromParts (http://localhost:4200/assets/vendor.js:59176:35)
    at CompiledPositionalArgs.evaluate (http://localhost:4200/assets/vendor.js:61120:43)
    at CompiledArgs.evaluate (http://localhost:4200/assets/vendor.js:60593:57)
    at VM.evaluateArgs (http://localhost:4200/assets/vendor.js:68278:54)

Let me know if I can provide debugging help somehow. I’m not sure where to look since I don’t see any application code in the stacktrace.

@Turbo87
Copy link
Member Author

Turbo87 commented Oct 24, 2016

@Serabe nope, this was from one of my production apps

@Serabe
Copy link
Member

Serabe commented Oct 24, 2016

Can any of you try to provide a reproduction? I'll try to take a look at travis-web later this week otherwise

@Turbo87
Copy link
Member Author

Turbo87 commented Oct 24, 2016

unfortunately I haven't been able to reproduce this yet

@backspace
Copy link

While I get the error with every load on a local travis-web server, I can’t get it to happen in a deployed production build, sorry. I do get other mysterious errors that you can see here, but I don’t know if they’re related.

@rwjblue
Copy link
Member

rwjblue commented Oct 24, 2016

Seems related to #14499, but I'd need to dig in a bit more.

@backspace
Copy link

I added a conditional breakpoint to look more into it, but I’m too unfamiliar to have much insight. Here’s a screenshot of one of the levels of the stacktrace:

image

If a deeper entry would be more helpful, let me know!

@krisselden
Copy link
Contributor

The common error message here does not make these all the same issue. We need stack traces in each case like @Turbo87 and @Serabe added, those are separate issues.

@rwjblue #14499 is about node 0.12 in which get() with a non object key fails. This does seem to match the stack that @Turbo87 gave and is fixed in #14499 but is not the same issue as @Serabe

@Turbo87 can you confirm if your error is when running in an old v8?

@Turbo87
Copy link
Member Author

Turbo87 commented Oct 24, 2016

@krisselden I haven't been able to trigger it with the current Chrome versions that are installed on my MacBook and mobile devices. The only user that was able to trigger it was reportedly using Chrome 38 as stated above.

@backspace
Copy link

If I understand you correctly, @krisselden, are you suggesting that I open another issue? Is there more detail I can give apart from pasting the stacktraces and including the browser versions?

@krisselden
Copy link
Contributor

@backspace yes, the issue that @Turbo87 reported is fixed with #14499 please don't open issues with just a TypeError. It should say TypeError during some operation, the error with old v8 and destroy() has been fixed. The error with ref get() bailing out is a different.

@krisselden krisselden changed the title TypeError: Invalid value used as weak map key TypeError: Invalid value used as weak map key during destroy() Oct 28, 2016
@backspace
Copy link

I’ll open a separate issue, sorry for my lack of understand. Can you see that it’s difficult for someone not familiar with the internals to know what portion of the stacktrace is important and should be extracted? You’re saying the destroy was the important part for this issue but that get is the important one from travis-web. Without this discussion here, I don’t see how I could know that 😞

@krisselden
Copy link
Contributor

@backspace I'm sorry.

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

5 participants