Ember.js: how to analyze error in vendor.js

扶醉桌前 提交于 2019-12-21 18:02:03

问题


I've deployed my ember-cli app in stage environment to let teammates test the app. In the app I have implemented Ember.onerror to email me errors that occur in stage and in production environment.

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'm having difficulties in analyze stacktrace because it references only vendor.js and I can't understand where the problem really is.

For example I've received 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's a way to easily recognize where that back action is not handled.

来源:https://stackoverflow.com/questions/31273979/ember-js-how-to-analyze-error-in-vendor-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!