Skip to content

Running sentry with Ember embroider and fastboot breaks build #3174

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

Closed
4 of 9 tasks
oscarni opened this issue Jan 14, 2021 · 4 comments · Fixed by #3181
Closed
4 of 9 tasks

Running sentry with Ember embroider and fastboot breaks build #3174

oscarni opened this issue Jan 14, 2021 · 4 comments · Fixed by #3181
Assignees

Comments

@oscarni
Copy link

oscarni commented Jan 14, 2021

Package + Version

  • @sentry/browser
  • @sentry/node
  • raven-js
  • raven-node (raven for node)
  • other: @sentry/ember

Version:

5.30.0

Description

My ember app is running embroider 0.35.1 in fastboot. It works fine without Sentry or when fastboot is not enabled. But as soon as I add Sentry according to your latest official ember docs (adding InitSentryForEmber() in app.js) the build says:

Error: Assertion Failed: Missing configuration

Sentry is using ember-get-config. But it looks like the config is empty from where the sentry import is done.

const config = environmentConfig['@sentry/ember'];

Not sure if it's an embroider issue or if it's fixable here in the sentry repo. It looks like the config is not accessible from within fastboot when sentry is trying to access it. I also created an issue in the embroider repo embroider-build/embroider#642

@dashed
Copy link
Member

dashed commented Jan 15, 2021

@k-fish would you be able to respond to this?

@k-fish
Copy link
Member

k-fish commented Jan 15, 2021

Hey there 👋 , I would expect that it might have something to do with the config being available in fastboot, embroider should be fine. Can you try with fastboot disabled?

@oscarni
Copy link
Author

oscarni commented Jan 18, 2021

Hi, ok so sentry is not supported if I run fastboot?

As mentioned earlier it does work when run without fastboot. Eg visiting http://localhost:4200/?fastboot=false.

It also worked before updating to building with embroider.
I created a repo reproducing the issue https://github.com/oscarni/sentry-missing-config

@k-fish
Copy link
Member

k-fish commented Jan 18, 2021

@oscarni sorry about that I missed the part about fastboot in your original post. The addon would work with Embroider and Fastboot separately, it just seemed to be an issue with ember-get-config creating a new file via broccoli likely causing a problem. I've removed ember-get-config and switched to using embroider macros, so it should work once #3181 is in. I'll close this once the new version is out.

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

Successfully merging a pull request may close this issue.

3 participants