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

Error in generation step #24

Closed
harrisonhunter opened this issue Aug 2, 2016 · 11 comments
Closed

Error in generation step #24

harrisonhunter opened this issue Aug 2, 2016 · 11 comments

Comments

@harrisonhunter
Copy link

Hello, I am trying to run this on a digital ocean box and was able to build and start the server after following the instructions. Upon running, I can upload a file and change the theme and caption, but when I click generate, it seems to process regularly for a bit (gets passed audio uploading), then fails.

I get the following error in the browser:
https://www.dropbox.com/s/t3bpz4zfl9wmork/Screenshot%202016-08-01%2022.48.37.png?dl=0

And the following in the server console:

Error: spawn /root/audiogram/node_modules/waveform/build/Release/waveform ENOENT
at exports._errnoException (util.js:1007:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
at onErrorNT (internal/child_process.js:348:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)Error
at /root/audiogram/node_modules/waveform/index.js:33:20
at exithandler (child_process.js:214:5)
at ChildProcess.errorhandler (child_process.js:226:5)
at emitOne (events.js:96:13)
at ChildProcess.emit (events.js:188:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:202:12)
at onErrorNT (internal/child_process.js:348:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

Note I tried this with Ubuntu 14.04 and 16.04, with multiple audio files, with and without the node-gyp step.

Any guidance would be appreciated.

@andybee
Copy link

andybee commented Aug 2, 2016

It looks like the build process for the waveform package isn't being called during installation of audiogram.

If you're in the root of the audiogram project, run install waveform manually and it worked for me after that.

@veltman
Copy link
Contributor

veltman commented Aug 2, 2016

Hmm, interesting, I can't reproduce that. e.g., in a clean Ubuntu 14.04 env, npm install does build it.

What's the full output from an initial npm install in the Audiogram directory?

@veltman
Copy link
Contributor

veltman commented Aug 2, 2016

Also, what's the output of node-gyp -v?

During install you should be seeing something like:

> waveform@3.0.1 install /home/ubuntu/audiogram/node_modules/waveform
> node-gyp rebuild

make: Entering directory `/home/ubuntu/audiogram/node_modules/waveform/build'
  CC(target) Release/obj.target/waveform/waveform.o
  LINK(target) Release/waveform
make: Leaving directory `/home/ubuntu/audiogram/node_modules/waveform/build'

After which the node_modules/waveform/build/Release/waveform binary should exist.

If it's not building, it's possibly because you're missing one of the dependencies?

@andybee
Copy link

andybee commented Aug 2, 2016

Spot on and my bad; I had omitted the bit where, when I installed it again, I spotted libgroove wasn't installed and rectified that. Obviously had I done that upfront, this wouldn't occur.

For me the problem exists between chair and keyboard.

@veltman
Copy link
Contributor

veltman commented Aug 2, 2016

@andybee When you say spotted that it wasn't installed, do you mean that you left that out of the initial installation (e.g. omitted libgroove-dev) and rectified that by installing it later? Or that you had installed it initially but it failed for some reason beyond your control?

@andybee
Copy link

andybee commented Aug 2, 2016

The former, I forgot to include it when installing things via homebrew (I was installing on macOS).

@veltman
Copy link
Contributor

veltman commented Aug 2, 2016

Gotcha 👍

Unfortunately the Homebrew install is still pretty rocky depending on versions/OS. At some point may go the Lambda route (#17) which would eliminate almost all the local dependencies.

@harrisonhunter
Copy link
Author

Running npm install waveform fixed the problem for me!, thanks for the help!

@veltman veltman closed this as completed Aug 2, 2016
@veltman
Copy link
Contributor

veltman commented Aug 3, 2016

@harrisonhunter I finally figured out the problem here. It's a memory issue. I'd previously tested this on an EC2 micro instance (1 GB of memory). On a Digital Ocean micro droplet (512 MB of memory), running npm install with all the packages leads to a memory problem during the build step of npm install, which kills and resumes it (with no helpful error message).

The solution is either:

-Use a larger droplet
-Install clang for better memory efficiency, as described here

@veltman
Copy link
Contributor

veltman commented Aug 3, 2016

Added a note about this in the installation instructions: https://github.com/nypublicradio/audiogram/blob/master/INSTALL.md#linux-troubleshooting

@harrisonhunter
Copy link
Author

Thanks. Nice debugging!

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

3 participants