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

Ember.onerror validation fails #129

Closed
jeffjewiss opened this issue Mar 12, 2018 · 7 comments
Closed

Ember.onerror validation fails #129

jeffjewiss opened this issue Mar 12, 2018 · 7 comments

Comments

@jeffjewiss
Copy link

When adding this to an Ember 3.0 project it causes it to fail the ember-qunit: Ember.onerror validation test, which links to emberjs/ember-qunit#304

Would adding:

if (Ember.testing) {
  throw error;
}

to https://github.com/damiencaselli/ember-cli-sentry/blob/master/addon/services/raven.js#L178 fix the issue?

@Turbo87
Copy link
Collaborator

Turbo87 commented Mar 12, 2018

I'm surprised, because AFAICT https://github.com/damiencaselli/ember-cli-sentry/blob/master/addon/services/raven.js#L185-L187 should already take care of this 🤔

We've been using the 3.0.0-beta.3 in production for quite some time and haven't had any issues with it so far.

@jeffjewiss
Copy link
Author

Hmm, fair enough.

I have an app that was already updated to Ember 3 and I went to install install this addon, which was the only change, and I ran into the qunit validation error I mentioned above.

For now I've added:

Ember.onerror = function (error) {
  if (Ember.testing) {
    throw error
  }
}

to the app.js so I could get Sentry working without broken tests, but I'm not sure what else could be causing the issue. 🤷‍♂️

@Turbo87
Copy link
Collaborator

Turbo87 commented Mar 12, 2018

can you reproduce this issue in a fresh ember new app?

@jeffjewiss
Copy link
Author

I'll see if I can reproduce it on a fresh app.

I've had this happen on two personal Ember apps. One is private and one is public.

On the public one you can see that adding v3.0 of this addon breaks the build: commit - build status and then adding the onError handler mentioned above fixes it: commit - build status.

@nickschot
Copy link

I also see this, but it doesn't seem to happen on every test run. I do not remember seeing it in the last beta.

@geoffreyd
Copy link

Adding this fixes the tests.

if (environment === 'test') {
  ENV.sentry.development = true;
}

@jeffjewiss
Copy link
Author

@geoffreyd thanks for this!

The above seems like a good solution to the problem.

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