sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

@sentry/ember breaks ember-cli build when used with ember-data >= 4.6.1

Open pichfl opened this issue 2 years ago • 4 comments

Is there an existing issue for this?

  • [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
  • [X] I have reviewed the documentation https://docs.sentry.io/
  • [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/ember

SDK Version

7.12.1

Framework Version

7.12.1

Link to Sentry event

No response

Steps to Reproduce

  1. Install @sentry/ember using npm install --save-dev @sentry/ember
  2. Run project using npm start (which in turn runs ember serve)

Expected Result

Build completes successfully and ember-cli serves the project.

Actual Result

[broccoli-persistent-filter:Babel > [Babel: @ember-data/model]: Babel: @ember-data/model] was configured to `throwUnlessParallelizable` and was unable to parallelize a plugin.
plugins:
1: name: unknown, location: unknown

Please see: https://github.com/babel/broccoli-babel-transpiler#parallel-transpilation for more details


Stack Trace and Error Report: /var/folders/cq/l1v54dyd5qb_3p7pky5mf7f00000gn/T/error.dump.6c9d0a1e610cb2506c50b0bea57c3547.log
error.dump.6c9d0a1e610cb2506c50b0bea57c3547.log
=================================================================================

ENV Summary:

  TIME: Tue Sep 06 2022 23:35:03 GMT+0200 (Central European Summer Time)
  TITLE: ember
  ARGV:
  - /Users/pichfl/.volta/tools/image/node/16.17.0/8.15.0/bin/node
  - /Users/pichfl/Source/#PROJECTNAME/packages/tix-ui/node_modules/.bin/ember
  - serve
  - --ssl
  - --host=local.staging.tix.vlb.de
  EXEC_PATH: /Users/pichfl/.volta/tools/image/node/16.17.0/8.15.0/bin/node
  TMPDIR: /var/folders/cq/l1v54dyd5qb_3p7pky5mf7f00000gn/T
  SHELL: /usr/local/bin/fish
  PATH:
  - /Users/pichfl/Source/#PROJECTNAME/packages/tix-ui/node_modules/.bin
  - /Users/pichfl/.volta/tools/image/packages/pnpm/7.9.5/dist/node-gyp-bin
  - /Users/pichfl/Source/#PROJECTNAME/node_modules/.bin
  - /Users/pichfl/.volta/tools/image/node/16.17.0/8.15.0/bin
  - /Users/pichfl/.volta/tools/image/yarn/1.22.15/bin
  - /Users/pichfl/Library/pnpm
  - /usr/local/sbin
  - /Users/pichfl/.cargo/bin
  - /Users/pichfl/.fig/bin
  - /usr/local/bin
  - /usr/bin
  - /bin
  - /usr/sbin
  - /sbin
  - /Library/Apple/usr/bin
  PLATFORM: darwin x64
  FREEMEM: 724672512
  TOTALMEM: 17179869184
  UPTIME: 1289362
  LOADAVG: 14.45458984375,9.05224609375,7.27001953125
  CPUS:
  - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz - 2600
  - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz - 2600
  - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz - 2600
  - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz - 2600
  - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz - 2600
  - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz - 2600
  - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz - 2600
  - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz - 2600
  - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz - 2600
  - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz - 2600
  - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz - 2600
  - Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz - 2600
  ENDIANNESS: LE
  VERSIONS:
  - ares: 1.18.1
  - brotli: 1.0.9
  - cldr: 41.0
  - icu: 71.1
  - llhttp: 6.0.7
  - modules: 93
  - napi: 8
  - nghttp2: 1.47.0
  - nghttp3: 0.1.0-DEV
  - ngtcp2: 0.1.0-DEV
  - node: 16.17.0
  - openssl: 1.1.1q+quic
  - tz: 2022a
  - unicode: 14.0
  - uv: 1.43.0
  - v8: 9.4.146.26-node.22
  - zlib: 1.2.11

ERROR Summary:

  - broccoliBuilderErrorStack: [undefined]
  - code: [undefined]
  - codeFrame: [undefined]
  - errorMessage: [broccoli-persistent-filter:Babel > [Babel: @ember-data/model]: Babel: @ember-data/model] was configured to `throwUnlessParallelizable` and was unable to parallelize a plugin. 
plugins:
1: name: unknown, location: unknown

Please see: https://github.com/babel/broccoli-babel-transpiler#parallel-transpilation for more details
  - errorType: [undefined]
  - location:
    - column: [undefined]
    - file: [undefined]
    - line: [undefined]
  - message: [broccoli-persistent-filter:Babel > [Babel: @ember-data/model]: Babel: @ember-data/model] was configured to `throwUnlessParallelizable` and was unable to parallelize a plugin. 
plugins:
1: name: unknown, location: unknown

Please see: https://github.com/babel/broccoli-babel-transpiler#parallel-transpilation for more details
  - name: Error
  - nodeAnnotation: [undefined]
  - nodeName: [undefined]
  - originalErrorMessage: [undefined]
  - stack: Error: [broccoli-persistent-filter:Babel > [Babel: @ember-data/model]: Babel: @ember-data/model] was configured to `throwUnlessParallelizable` and was unable to parallelize a plugin. 
plugins:
1: name: unknown, location: unknown

Please see: https://github.com/babel/broccoli-babel-transpiler#parallel-transpilation for more details
    at new Babel (/Users/pichfl/Source/#PROJECTNAME/node_modules/.pnpm/[email protected]/node_modules/broccoli-babel-transpiler/index.js:90:11)
    at Class.transpileTree (/Users/pichfl/Source/#PROJECTNAME/node_modules/.pnpm/[email protected]/node_modules/ember-cli-babel/index.js:170:16)
    at rollupPrivateModule (/Users/pichfl/Source/#PROJECTNAME/node_modules/.pnpm/@[email protected]/node_modules/@ember-data/private-build-infra/src/utilities/rollup-private-module.js:59:35)
    at Class.treeForAddon (/Users/pichfl/Source/#PROJECTNAME/node_modules/.pnpm/@[email protected]/node_modules/@ember-data/private-build-infra/src/addon-build-config-for-data-package.js:182:25)
    at Class.superWrapper [as treeForAddon] (/Users/pichfl/Source/#PROJECTNAME/node_modules/.pnpm/[email protected]/node_modules/core-object/lib/assign-properties.js:34:20)
    at Class._treeFor (/Users/pichfl/Source/#PROJECTNAME/node_modules/.pnpm/[email protected]/node_modules/ember-cli/lib/models/addon.js:668:33)
    at Class.treeFor (/Users/pichfl/Source/#PROJECTNAME/node_modules/.pnpm/[email protected]/node_modules/ember-cli/lib/models/addon.js:628:21)
    at /Users/pichfl/Source/#PROJECTNAME/node_modules/.pnpm/[email protected]/node_modules/ember-cli/lib/models/addon.js:497:26
    at Array.reduce (<anonymous>)
    at Class.eachAddonInvoke (/Users/pichfl/Source/#PROJECTNAME/node_modules/.pnpm/[email protected]/node_modules/ember-cli/lib/models/addon.js:494:24)

=================================================================================

Sadly the log above isn't helpful at all as it doesn't even reference the sentry plugin. But I can confirm that the project runs fine without it.

pichfl avatar Sep 06 '22 21:09 pichfl

Citing @runspired on the Ember Discord

Older versions of macros were not parallelizable Might be worth forcing a resolution on macros to latest

Trying this now.

pichfl avatar Sep 07 '22 07:09 pichfl

@pichfl any updates with this - or any clarification you need on our end? The error seems super mysterious, but maybe it's due to the versions of the ember deps we use, or something going on with embroider.

AbhiPrasad avatar Sep 08 '22 07:09 AbhiPrasad

Update from my experiments by pinning dependencies of this addon.

  1. @embroider/macros to the most current release - No luck so far
  2. ember-auto-import - No change
  3. ember-cli-babel dito
  4. ember-cli-htmlbars dito
  5. ember-cli-typescript neither.

I didn't pin the @sentry/* packages as they do not seem relevant given that they are no ember addons.

I'm honestly lost here. I haven't worked with Babel transforms in addons in years, so I'm afraid I'm not much of a help here.

pichfl avatar Sep 08 '22 11:09 pichfl

I'm having the same issue.

When I add a resolution for "@embroider/macros": "1.8.3" I get the following error:

non serializable item found in config: /^\//
[Embroider:MacrosConfig] the given config from '/Users/groeger/devel/mppfrontend/frontend/node_modules/@sentry/ember' for packageName 'undefined' is not JSON serializable.

removing the sentry packages fixes my build. Downgrading ember-data to 4.0.2 also fixes my build.

dagroe avatar Sep 16 '22 09:09 dagroe

This upgrade fixed this issue. However I still get the error mentioned above non serializable item found in config: /^\//. if someone comes across this, I created an issue here #5903

dagroe avatar Oct 06 '22 12:10 dagroe

As another hint: I came across the the error in this issue again while running tests (ember serve was fine):

[broccoli-persistent-filter:Babel > [Babel: @ember-data/model]: Babel: @ember-data/model] was configured to `throwUnlessParallelizable` and was unable to parallelize a plugin. 
plugins:
1: name: unknown, location: unknown

Please see: https://github.com/babel/broccoli-babel-transpiler#parallel-transpilation for more details

Turns out my test config was setting sentry.dsn to undefined in my config/environment.js, which caused the error. Setting null or '' solved the issue for me.

dagroe avatar Oct 07 '22 07:10 dagroe

Hi, I got the same error when adding @sentry/ember to my project.

[broccoli-persistent-filter:Babel > [Babel: @ember-data/adapter]: Babel: @ember-data/adapter] was configured to `throwUnlessParallelizable` and was unable to parallelize a plugin.
plugins:
1: name: unknown, location: unknown

Please see: https://github.com/babel/broccoli-babel-transpiler#parallel-transpilation for more details


Stack Trace and Error Report: /var/folders/pm/ygg73cqd5497l3g9wwp3sn680000gn/T/error.dump.8c6a4e444174caa4ef8d5693973ca1e1.log

Downgrading ember-data to version 4.6.4 or 4.5.* doesn't work.

tdwesten avatar Nov 23 '22 09:11 tdwesten

Hi, I got the same error when adding @sentry/ember to my project.

[broccoli-persistent-filter:Babel > [Babel: @ember-data/adapter]: Babel: @ember-data/adapter] was configured to `throwUnlessParallelizable` and was unable to parallelize a plugin.
plugins:
1: name: unknown, location: unknown

Please see: https://github.com/babel/broccoli-babel-transpiler#parallel-transpilation for more details


Stack Trace and Error Report: /var/folders/pm/ygg73cqd5497l3g9wwp3sn680000gn/T/error.dump.8c6a4e444174caa4ef8d5693973ca1e1.log

Downgrading ember-data to version 4.6.4 or 4.5.* doesn't work.

For me that was cause by old versions of @embroider/macros, so I'd check what versions of @embroider/macros are used in all dependencies, e.g. yarn why @embroider/macros.

dagroe avatar Nov 23 '22 10:11 dagroe