Ember.js: how to parse a bug in vendor.js

I have deployed my ember-cli app in a stage environment to let my teammates test the app. In an application I have implemented Ember.onerror

to email me errors that occur in stage and in production.

Ember.onerror = function(data) {
    Ember.$.ajax({
      type: "POST",
      url: url + "/error",
      dataType: 'json',
      contentType: 'application/json',
      data: JSON.stringify({message: data.message, stacktrace: data.stack}),
      beforeSend: function (xhr, settings) {
        xhr.setRequestHeader('Accept', settings.accepts.json);
      }
    });
  }

      

I am having difficulty parsing the stacktrace because it only references vendor.js and I can't figure out where the problem really is.

For example, I received the following message:

Message: Nothing handled the action 'back'. If you did handle the action, this error can be caused by returning true from an action handler in a controller, causing the action to bubble.

and stacktrace:

EmberError@http://example.com/assets/vendor-952b195e45ab9682c02f1fabba312c19.js:25705:26 
triggerEvent@http://example.com/assets/vendor-952b195e45ab9682c02f1fabba312c19.js:38985:44 
trigger@http://example.com/assets/vendor-952b195e45ab9682c02f1fabba312c19.js:64971:26 
trigger@http://example.com/assets/vendor-952b195e45ab9682c02f1fabba312c19.js:63740:21 
send@http://example.com/assets/vendor-952b195e45ab9682c02f1fabba312c19.js:38468:45 
send@http://example.com/assets/vendor-952b195e45ab9682c02f1fabba312c19.js:42710:26 
runRegisteredAction@http://example.com/assets/vendor-952b195e45ab9682c02f1fabba312c19.js:33277:30 
run@http://example.com/assets/vendor-952b195e45ab9682c02f1fabba312c19.js:10765:30 
run@http://example.com/assets/vendor-952b195e45ab9682c02f1fabba312c19.js:30030:32 
handler@http://example.com/assets/vendor-952b195e45ab9682c02f1fabba312c19.js:33269:39 
http://example.com/assets/vendor-952b195e45ab9682c02f1fabba312c19.js:55210:34 
dispatch@http://example.com/assets/vendor-952b195e45ab9682c02f1fabba312c19.js:4872:14 
handle@http://example.com/assets/vendor-952b195e45ab9682c02f1fabba312c19.js:4540:33

      

The meaning of the error message is clear, but I'm wondering if there is a way to easily find out where this action is back

not being processed.

+4


source to share


1 answer


You can see the js library file in use by pause on exceptions in the chromium debugger and checking which library the fault line is in. After that, you can change the library reference in ember-cli-build.js from libraryx.js to libraryx.src.js or equivalent for a specific library.



0


source







All Articles