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

Internal Server Error #9

Closed
judewang opened this issue Aug 1, 2014 · 20 comments
Closed

Internal Server Error #9

judewang opened this issue Aug 1, 2014 · 20 comments
Assignees

Comments

@judewang
Copy link

judewang commented Aug 1, 2014

Hi, my name is Jude.

I found that using Middleman v3.3.3 with middleman-autoprefixer v2.1.0 will an issue that make browser failing to load stylesheet after refreshing the page. It sent a message said "Failed to load resource: the server responded with a status of 500 (Internal Server Error) " to browser's console window. I have tested this with middleman-autoprefixer v2.0.1 and it was OK. I think the issue will be produce only when using v2.1.0.

Thanks.

@porada
Copy link
Contributor

porada commented Aug 1, 2014

Can you paste the contents of the stylesheet before Middleman tries to process it?

@porada
Copy link
Contributor

porada commented Aug 3, 2014

@judewang, I think I might know what’s responsible for causing this, but I’d still need your stylesheet to test it out.

@thenathanjones
Copy link

@porada, I'm having a similar issue I thought I'd chime in with as my behaviour isn't described exactly. I get the same 500 error (still happening with v2.1.1), although on a subsequent refresh it works fine, i.e. if I keep refreshing the page, every second time it works. I haven't had a chance to make a sample stylesheet for you as it's quite a large application and the stylesheet is spread across many files. I thought the information may be useful to you regardless.

Cheers,
Nathan

@pedropereira
Copy link

I'm also having this issue exactly as described by @thenathanjones, @porada could you perhaps tell us your suspicions?

@porada porada closed this as completed in d069ad7 Aug 18, 2014
@porada
Copy link
Contributor

porada commented Aug 18, 2014

Pushed the possible fix for this issue.

@pedropereira, @thenathanjones, and @judewang: could you test your stylesheets against the current master?

gem 'middleman-autoprefixer', github: 'porada/middleman-autoprefixer'

If this fixes the problem, I’m going to release the next version right away.

@pedropereira
Copy link

Awesome, that definitely did it for me. Thanks for the fix 👍

@porada
Copy link
Contributor

porada commented Aug 18, 2014

Great. Enjoy the v2.1.2. 😀

@cekerholic
Copy link

I'm still experiencing this issue. middleman server —verbose shows me the error:

[2014-08-19 14:47:57] ERROR Rack::Lint::LintError: Content-Length header found in 304 response, not allowed
    /Users/arisfm/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/lint.rb:20:in `assert'
    /Users/arisfm/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/lint.rb:617:in `block in check_content_length'
    /Users/arisfm/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/lint.rb:613:in `each'
    /Users/arisfm/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/lint.rb:613:in `check_content_length'
    /Users/arisfm/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/lint.rb:59:in `_call'
    /Users/arisfm/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/lint.rb:37:in `call'
    /Users/arisfm/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:138:in `call'
    /Users/arisfm/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
    /Users/arisfm/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service'
    /Users/arisfm/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run'
    /Users/arisfm/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'

@porada
Copy link
Contributor

porada commented Aug 19, 2014

@cekerholic, could you paste the stylesheet that causes this?

@cekerholic
Copy link

@porada porada reopened this Aug 19, 2014
@porada
Copy link
Contributor

porada commented Aug 22, 2014

Does v2.2.0 fix anything for you, guys?

@stephen-puiszis
Copy link

It took me a while to find this but I'm having the exact same issue @thenathanjones described with every other page refresh not loading my css. Every other request displayed this console error:
GET http://localhost:4567/stylesheets/screen.css?body=1 500 (Internal Server Error). I'm having the same issues with v2.1.2 and v2.2. Removing autoprefixer fixes the refresh problem.

@roytomeij
Copy link

Same here, on 2.2.0 with Middleman 3.3.5 on Ruby 2.1.2.

@porada
Copy link
Contributor

porada commented Aug 25, 2014

@tdreyno, could you look at this? This bug must have been introduced together with your Rack magic (#6)—every second request fails with a 500. Tried this line:

headers.delete('Content-Length') if status == 304

Doesn’t seem to help, though.

@tdreyno
Copy link
Member

tdreyno commented Aug 25, 2014

@porada Will track this down today. Does this only happen with Sprockets involved? ?body=1 makes me think so.

@tdreyno
Copy link
Member

tdreyno commented Aug 25, 2014

This was a "bug" in middleman-sprockets. Sprockets now wants to be as fast as possible and returns 304 statuses instead of the full file content (even in dev mode). Downstream middleware needs the full content to rewrite so this doesn't work. Hard-coded this HTTP caching off in the latest middleman-sprockets which is v3.3.9. Please bundle update middleman-sprockets.

@tdreyno tdreyno closed this as completed Aug 25, 2014
@porada
Copy link
Contributor

porada commented Aug 25, 2014

Thank you. 🍻

@judewang
Copy link
Author

judewang commented Sep 4, 2014

@tdreyno, using middleman-sprockets v3.3.9 solved the issue, but I found it will create images from the bower_components folder to build folder. I found the issue will happen since v3.3.7, and we can not use middleman-autoprefixer v2.2.0 with midddleman-sprockets v3.3.6 without internal server error. Could you look at this? Thanks.

@tdreyno
Copy link
Member

tdreyno commented Sep 4, 2014

@judewang Yes, this is a known issue with middleman-sprockets v3.3.7. We're looking into it.

@suraj-karale
Copy link

I am new in angular ... getting error
CREATE UserApp/e2e/tsconfig.e2e.json (213 bytes)
npm ERR! code E500
npm ERR! 500 Internal Server Error: autoprefixer@^8.4.1

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\suraj.karale\AppData\Roaming\npm-cache_logs\2018-07-03T06_16_43_259Z-debug.log
Package install failed, see above.

Version Details -

Angular CLI: 6.0.8
Node: 8.11.1
OS: win32 x64
Angular:
...

Package Version

@angular-devkit/architect 0.6.8
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.6.8
@schematics/angular 0.6.8
@schematics/update 0.6.8
rxjs 6.2.0
typescript 2.7.2

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

9 participants