profiling-node icon indicating copy to clipboard operation
profiling-node copied to clipboard

Unable to install inside AppWrite

Open troykelly opened this issue 2 years ago • 7 comments

Is there an existing issue for this?

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

How do you use Sentry?

Self-hosted/on-premise

SDK Version

0.3.0

Link to Sentry event

No response

What environment is your node script running in?

Running inside AppWrite

How is your code deployed and bundled?

Daployed using AppWrite's deploy

Steps to Reproduce

  1. Add @sentry/profiling-node to package.json
  2. Deploy

Expected Result

Deployment completes, code runs, profiling happiness ensues

Actual Result

Unable to deploy:

Docker Error: npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
npm notice 
npm notice New major version of npm available! 7.10.0 -> 9.6.2
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.6.2>
npm notice Run `npm install -g [email protected]` to update!
npm notice 
npm ERR! code 1
npm ERR! path /usr/builds/node_modules/@sentry/profiling-node
npm ERR! command failed
npm ERR! command sh -c node scripts/check-build.js
npm ERR! @sentry/profiling-node: Precompiled binary found, attempting to load...
npm ERR! /usr/builds/node_modules/@sentry/profiling-node/scripts/check-build.js:51
npm ERR!   throw e;
npm ERR!   ^
npm ERR! 
npm ERR! Error: Error relocating /usr/builds/node_modules/@sentry/profiling-node/binaries/sentry_cpu_profiler-v93-linux-x64-musl.node: _ZSt28__throw_bad_array_new_lengthv: symbol not found
npm ERR!     at Object.Module._extensions..node (node:internal/modules/cjs/loader:1167:18)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:988:32)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:828:14)
npm ERR!     at Module.require (node:internal/modules/cjs/loader:1012:19)
npm ERR!     at require (node:internal/modules/cjs/helpers:93:18)
npm ERR!     at Object.<anonymous> (/usr/builds/node_modules/@sentry/profiling-node/scripts/check-build.js:24:3)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1108:14)
npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:988:32)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:828:14) {
npm ERR!   code: 'ERR_DLOPEN_FAILED'
npm ERR! }

troykelly avatar Mar 22 '23 20:03 troykelly

@troykelly this smells like a libstd issue, any chance you can try upgrading that? I am not familiar with AppWrite, but I suspect it runs your application in some sort of container env.

I cant tell from the issue you linked, but what version of node are you running?

JonasBa avatar Mar 23 '23 14:03 JonasBa

It's Node-16. I might have to raise this with the AppWrite team instead?

troykelly avatar Mar 23 '23 22:03 troykelly

@troykelly do you know how AppWrite runs your code? If we can create a reproducible env, I'd be happy to investigate this

JonasBa avatar Mar 27 '23 13:03 JonasBa

AppWrite isn't super difficult to set up, it's just time/resourcing consuming (it's easiest on a clean VM, running their online installer) If you have an AppWrite environment, just trying to publish a function that has the library in the package.json will cause the failure.

troykelly avatar Mar 27 '23 20:03 troykelly

@troykelly any chance you could send us the output of running npm install --verbose --foreground-scripts @sentry/profiling-node inside appwrite?

JonasBa avatar Apr 07 '23 15:04 JonasBa

@troykelly seems like appwrite is in private beta so we cant actually deploy functions without access. Let me know if you are able to provide us with the logs of npm install --verbose --foreground-scripts

JonasBa avatar Apr 07 '23 17:04 JonasBa

@JonasBa AppWrite cloud is a private beta. I'm running AppWrite locally - I can't see a way to capture the npm install during build.

troykelly avatar Apr 08 '23 00:04 troykelly