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

Build seems to be stuck on Netlify #8

Closed
thbar opened this issue May 16, 2020 · 15 comments · Fixed by #9
Closed

Build seems to be stuck on Netlify #8

thbar opened this issue May 16, 2020 · 15 comments · Fixed by #9

Comments

@thbar
Copy link

thbar commented May 16, 2020

Hello!

Thanks for your gem. I was trying to use the latest version (0.3.0) on netlify, but apparently the build never returns.

If I remove the gem completely (from both Gemfile and Jekyll config), the build works fine.

I wonder if this is related to the changes in v0.3.0 (tcp server) which may be forbidden there.

I will investigate further (and will try older version), but wanted to report that.

@mhanberg
Copy link
Owner

Thanks for the bug report!

I think the tcp server should be fine, but I’ll give it a look. I haven’t deployed my blog yet with this update, so maybe that’s why it slipped through.

@thbar
Copy link
Author

thbar commented May 16, 2020

Thanks for the quick reply! Reverting to previous version seems to work, if I'm not mistaken and fwiw!

@mhanberg
Copy link
Owner

Do you mind sharing

  • the tail of the log where it’s blocked
  • ruby version
  • node version
  • jekyll version
  • build command

Thanks! @thbar

@thbar
Copy link
Author

thbar commented May 16, 2020

The tail of the log looks like this:

6:31:04 PM: Verify run directory
6:31:04 PM: Executing user command: bundle exec jekyll build
6:31:04 PM: Configuration file: /opt/build/repo/_config.yml
6:34:31 PM: Canceling deploy

(Canceling is triggered by me). This must be compared to this when a full build works (with previous version:

6:50:19 PM: Verify run directory
6:50:19 PM: Executing user command: bundle exec jekyll build
6:50:20 PM: Configuration file: /opt/build/repo/_config.yml
6:50:20 PM:             Source: /opt/build/repo/src
6:50:20 PM:        Destination: /opt/build/repo/_site
6:50:20 PM:  Incremental build: disabled. Enable with --incremental
6:50:20 PM:       Generating...
6:50:26 PM:                     done in 5.996 seconds.
6:50:26 PM:  Auto-regeneration: disabled. Use --watch to enable.

Ruby version: 2.6.2 (to accelerate build on Netlify, where it is apparently the default, but 2.6.6 will achieve the same result)

Node version: v12.16.1

Jekyll: 4.0.1

Build: bundle exec jekyll build

Hope this helps!

@mhanberg
Copy link
Owner

Thanks, I've confirmed this with my own blog.

My hypotheses are there is some path shenanigans going on, or some Node.js sandboxing of which I am unaware.

I've opened a topic on the Netlify discourse: https://community.netlify.com/t/deploy-is-hanging/14822

@thbar
Copy link
Author

thbar commented May 16, 2020

I would be surprised if Netlify doesn't block TCP socket opening, or at least restrict it:

v0.2.2...v0.3.0#diff-b7eb3592a63ae055d731d361a948afbfR17-R24

I would probably add a log in that silent rescue ;-)

Good luck chasing that, I'll comment back if I find something!

@thbar
Copy link
Author

thbar commented May 16, 2020

Link correction:

@postcss = nil
while @postcss.nil?
begin
@postcss = TCPSocket.open("localhost", 8124)
rescue StandardError
nil # Suppressing exceptions
end
end

@mhanberg
Copy link
Owner

mhanberg commented May 16, 2020

If I add a log there, it will print out about 5000 lines haha.

The server is misty a dev convenience. In production it might be easier to just run it directly.

@thbar
Copy link
Author

thbar commented May 16, 2020

Ahh! I see, indeed. Maybe add a little delay, and a limit to the loop? An explanation could be that the code never leaves that loop!

@thbar
Copy link
Author

thbar commented May 16, 2020

In all cases, thanks for your gems & also starter kits, because I migrated my little website (at https://www.kiba-etl.org) from raw pages with tailwind to Jekyll, and it was helpful!

@mhanberg
Copy link
Owner

mhanberg commented May 17, 2020

The fixed has been released with v0.3.1!

@thbar
Copy link
Author

thbar commented May 17, 2020

@mhanberg thanks for the quick turn-around. I've tested and indeed it works for me. Many thanks!

@steveoh
Copy link

steveoh commented May 22, 2020

I think this needs to be more stressed. I figured the reason you mentioned it is that you're using the env variable in the postcss config on your demo repo only. I didn't realize it would hang in netlify and y local docker env.

@mhanberg
Copy link
Owner

@steveoh I will update the README to further highlight the requirement to set the JEKYLL_ENV on your build server, but I will note that it currently states that your build might fail if you don't set it.

@steveoh
Copy link

steveoh commented May 22, 2020

failing and hanging are a little different. I thought it might be taking a while to process since we have 500 pages. but you are right, you did mention that.

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

Successfully merging a pull request may close this issue.

3 participants