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

PhantomJS error compile on Ubuntu 14.04.6 with build_tools #139

Closed
GrifKies opened this issue Sep 8, 2020 · 9 comments
Closed

PhantomJS error compile on Ubuntu 14.04.6 with build_tools #139

GrifKies opened this issue Sep 8, 2020 · 9 comments

Comments

@GrifKies
Copy link

GrifKies commented Sep 8, 2020

Do you want to request a feature or report a bug?
bug
What is the current behavior? Here is an output from npm when building webapps:

2024 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
2024 verbose stack     at EventEmitter.emit (events.js:182:13)
2024 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
2024 verbose stack     at ChildProcess.emit (events.js:182:13)
2024 verbose stack     at maybeClose (internal/child_process.js:962:16)
2024 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
2025 verbose pkgid phantomjs-prebuilt@2.1.16
2026 verbose cwd /root/build_tools/tools/linux
2027 verbose Linux 4.4.0-142-generic
2028 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "phantomjs-prebuilt@2.1.16"
2029 verbose node v10.14.0
2030 verbose npm  v6.14.8
2031 error code ELIFECYCLE
2032 error errno 1
2033 error phantomjs-prebuilt@2.1.16 install: `node install.js`
2033 error Exit status 1
2034 error Failed at the phantomjs-prebuilt@2.1.16 install script.
2034 error This is probably not a problem with npm. There is likely additional logging output above.
2035 verbose exit [ 1, true ]

While running the build_tools automate.py server command, I get the following output:
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
get a blank version of ubuntu 18.04, clone the build_tools repo, and run the automate.py server command as root. (Only modifications were done to server constants.js file, and that shouldn't (I think) affect this.
What is the expected behavior?
It should compile with no problems.
Did this work in previous versions of DocumentServer?
Yes, as seen from previous issues in this repo.
DocumentServer version:
The most current version, as of 9/7/2020.
Operating System:
Ubuntu 14.04, Ubuntu 18.04
Browser version:
N/A

@ShockwaveNN ShockwaveNN transferred this issue from ONLYOFFICE/DocumentServer Sep 8, 2020
@ShockwaveNN
Copy link
Contributor

Moved this issue to build_tools repo, since it's compilation issue

Am I right, that you tryed to compile it on ubuntu 14.04 as well? Current variant will not work on 18.04

Also could you specify exact commands, which you run or better provide some Dockerfile to reproduce.
I've compiled product according to default Dockerfile yesterday and everything was fine

@GrifKies
Copy link
Author

GrifKies commented Sep 8, 2020

Yes, I did this on Ubuntu 14.04 as well.
For the commands, all below was run as root:
git clone https://github.com/ONLYOFFICE/build_tools.git
cd build_tools/tools/linux
python automate.py server
(wait until download of server module in onlyoffice/DocumentServer.git to edit server/Common/sources/constants.js)
Wait for it to start compiling webapps...
Fails with ELIFECYCLE ERROR on phantomjs as seen above. I am using npm 10, as this is what is default installed. Could I have the wrong version of npm or gcc?

Thank you!

@ShockwaveNN
Copy link
Contributor

Could you attach your build log

Or compare with mine, which finished without any errors?

build.log.zip

@hnk73
Copy link

hnk73 commented Nov 14, 2020

Got the same issue under Ubuntu 14.04, 16.04 or 18.04!!!!!

Here´s the output from the shell:

> phantomjs-prebuilt@2.1.16 install /home/hnk/web-apps/build/node_modules/phantomjs-prebuilt
> node install.js

PhantomJS not found on PATH
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Receiving...
  [=========================---------------] 63%
Received 22866K total.
Extracting tar contents (via spawned process)
Removing /home/hnk/web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1605302592645/phantomjs-2.1.1-linux-x86_64 -> /home/hnk/web-apps/build/node                                                                                                              _modules/phantomjs-prebuilt/lib/phantom
Phantom installation failed { [Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1605302592645/phantomjs-2.1.1                                                                                                              -linux-x86_64' -> '/home/hnk/web-apps/build/node_modules/phantomjs-prebuilt/lib/                                                                                                              phantom']
  errno: -13,
  code: 'EACCES',
  syscall: 'link',
  path:
   '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1605302592645/phantomjs-2.1.1-linux-x86_64',
  dest:
   '/home/hnk/web-apps/build/node_modules/phantomjs-prebuilt/lib/phantom' } Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.                                                                                                              tar.bz2-extract-1605302592645/phantomjs-2.1.1-linux-x86_64' -> '/home/hnk/web-ap                                                                                                              ps/build/node_modules/phantomjs-prebuilt/lib/phantom'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/hnk/.npm/_logs/2020-11-13T21_23_14_885Z-debug.log
Error (npm): 1
Error (./make.py): 1

**Here´s the content form the debug.log:**
21783 verbose stack Error: phantomjs-prebuilt@2.1.16 install: `node install.js`
21783 verbose stack Exit status 1
21783 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
21783 verbose stack     at EventEmitter.emit (events.js:198:13)
21783 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
21783 verbose stack     at ChildProcess.emit (events.js:198:13)
21783 verbose stack     at maybeClose (internal/child_process.js:982:16)
21783 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
21784 verbose pkgid phantomjs-prebuilt@2.1.16
21785 verbose cwd /home/hnk/web-apps/build
21786 verbose Linux 4.15.0-123-generic
21787 verbose argv "/usr/bin/node" "/usr/bin/npm" "install"
21788 verbose node v10.23.0
21789 verbose npm  v6.14.8
21790 error code ELIFECYCLE
21791 error errno 1
21792 error phantomjs-prebuilt@2.1.16 install: `node install.js`
21792 error Exit status 1
21793 error Failed at the phantomjs-prebuilt@2.1.16 install script.
21793 error This is probably not a problem with npm. There is likely additional logging output above.
21794 verbose exit [ 1, true ]

@ShockwaveNN
Copy link
Contributor

I think you got another error, try to run from sudo, seems phantomjs cannot be installed because of permission issues

Phantom installation failed { [Error: EACCES: permission denied, link '/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1605302592645/phantomjs-2.1.1 -linux-x86_64' -> '/home/hnk/web-apps/build/node_modules/phantomjs-prebuilt/lib/ phantom']

@hnk73
Copy link

hnk73 commented Nov 14, 2020

Unfortunately not, i ran the script from sudo (sudo automate.py server).

@ShockwaveNN
Copy link
Contributor

ShockwaveNN commented Nov 14, 2020

@hnk73 I'm not 100% sure, but you can try to change this code to include sudo
https://github.com/ONLYOFFICE/build_tools/blob/master/scripts/build_js.py#L70

If this not help - try to create temp VM or docker and run build script from root (I know this is not very safe, so advice to use docker or VM)

I've only checked this code with root user inside container

@hnk73
Copy link

hnk73 commented Nov 15, 2020

Oh yes, running as root worked properly. Thanks!!!

@ShockwaveNN
Copy link
Contributor

Closing this issue since seems running with root worked

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