atom/ci

(CircleCI) sh: 117: Syntax error: end of file unexpected (expecting "fi")

viddo opened this issue · 8 comments

viddo commented

Failing build: https://circleci.com/gh/viddo/atom-textual-velocity/3

atom/ci/build-package.sh#L117 is the eslint clause, but can't see any obvious error there., just to rule that out also tried to removed all eslint-related stuff, but it still fails with same error output, see https://circleci.com/gh/viddo/atom-textual-velocity/5

Tried to rebuild using SSH enabled, so I could retry manually on the machine, but didn't manage to reproduce it. First time it stops due to not finding the specs:

ubuntu@box158:~$ curl -s https://raw.githubusercontent.com/atom/ci/master/build-package.sh | sh
…
Installing modules ✓
Missing spec folder! Please consider adding a test suite in './spec'

So cd into the dir that contains the source, re-running the build script there the specs run:

# cd to the existing dir which seems to contain the checked out code and rerun the build script there the tests work…:
ubuntu@box158:~$ cd atom-textual-velocity/
ubuntu@box158:~/atom-textual-velocity$ ls
appveyor.yml  atom-amd64.deb  CHANGELOG.md  circle.yml  CONTRIBUTING.md  decls  docs  keymaps  lib  LICENSE.md  node_modules  package.json  README.md  spec  styles
ubuntu@box158:~/atom-textual-velocity$ curl -s https://raw.githubusercontent.com/atom/ci/master/build-package.sh | sh
Downloading latest Atom release...
…
Installing modules ✓
Running specs...
[23239:0920/104912:ERROR:browser_main_loop.cc(217)] Running without the SUID sandbox! See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the sandbox on.
Xlib:  extension "RANDR" missing on display ":99".
Xlib:  extension "RANDR" missing on display ":99".
[23239:0920/104919:INFO:CONSOLE(52)] "Window load time: 5960ms", source: file:///usr/share/atom/resources/app.asar/static/index.js (52)
......

Any ideas of what might be wrong or suggestions on how to troubleshoot this further?

Interesting, your build environment looks entirely different from the builds I see (like this).

Seeing if I can spot what went wrong in there from the logs. I find it very interesting that it starts printing out the script in the middle of the dependency resolution on your build 😕.

Ah, my builds are on their 12.04 based infrastructure, while that's on the 14.04 infrastructure.

Starting a build on that to see if I can reproduce this.

I'm seeing the same thing as well it looks like, attempting to debug.

@viddo in your project settings you can change to their 12.04 build image and things should be working perfectly until we can figure out what is wrong with the 14.04 build image.

viddo commented

Ok, will do!
Thanks for attending this issue so promptly!

@viddo So just as an FYI, for some bizarre reason halfway through executing the script, it was dumping the rest to stdout (the "script in the middle of dependency installation"), and then continuing to execute... with that part missing.

I'm working on a PR to write the script to a file, and then execute that, which worked perfectly in all of my testing. We also found a bug with running the linters on CircleCI while testing this, which will be fixed in that as well 😉.

@viddo Update your script to the current master and it should work 😉.

viddo commented

Great, thanks! 🎉 🙇