When i load a site with the debugbar enabled chrome complains about the following
GET http://bptm:8000/_debugbar/assets/stylesheets?1420463185 net::ERR_INCOMPLETE_CHUNKED_ENCODING
GET http://localhost/_debugbar/assets/javascript?1420463185 net::ERR_INCOMPLETE_CHUNKED_ENCODING
My versions are the following
laravel/framework v4.2.16
barryvdh/laravel-debugbar v1.8.5
maximebf/debugbar v1.10.2
Curiously sometimes it works and shows no bugs at all on the exact same page that bugged out one minute ago. Unfortunately I couldn't see any pattern in it working and failing. Furthermore other times the stylesheet works but the javascript still fails with net::ERR_INCOMPLETE_CHUNKED_ENCODING
This is not a Debugbar error.
This error is about your webserver or your PHP installation.
If you are using Linux, check if libapache2-mod-php is installed.
Um I am using nginx as my webserver, does that package still apply then? Can explain or link the issue?
@EloProf I had the same issue on my job. For some reason, Apache was not sending headers correctly. After package installed, the bug was fixed.
I do not know if this package fix nginx, as the package is for apache.
Try to look for something about 'chunked encoding nginx'.
(sorry about my english)
:)
Hmm well, i did some research into the topic:
I am using nginx 1.6.2 which, according to this documentation supports chunked requests http://wiki.nginx.org/HttpChunkinModule . By default nginx has a configuration parameter for this called chunked_transfer_encoding which is enabled by default, see http://nginx.org/en/docs/http/ngx_http_core_module.html#chunked_transfer_encoding . To make sure I enabled it in my config but unfortunately it didn't help at all.
Would it be possible to just disable the chunking?
Actually it turns out that the problem was something completely different. I found the following in the error logs of nginx:
2015/02/13 21:36:11 [crit] 5619#0: *12 open() "/var/lib/nginx/fastcgi/3/00/0000000003" failed (13: Permission denied) while reading upstream, client: 10.0.2.2, server: {...}, request: "GET /_debugbar/assets/javascript?1423168295 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "{...}", referrer: "{...}"
Turns out that for some reason the owner of the folder /var/lib/nginx/* was not www-data which actually runs nginx and php5-fpm but the primary user of the machine which lead to permission problems. So after a quick:
sudo chown -R www-data:www-data /var/lib/nginx
Everything works as intended and I didn't notice any more problems. This issue can probably be closed.
Wow, thank you. Sudo chown command helped me as well! I think it happened after I upgrated the system.
我遇到问题的前提,是我修改了nginx 运行身份,以前是nobody 修改后是 www
nginx 上面错误信息是:
2017/07/12 18:20:34 [crit] 2438#0: *379 open() "/usr/local/nginx/fastcgi_temp/6/07/0000000076" failed (13: Permission denied) while reading upstream, client: 192.168.137.1, server: fei.com, request: "GET /_debugbar/assets/stylesheets?v=1499852738 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "fei.com", referrer: "http://fei.com/admin/index
发现laravel-debugbar 会读取nginx安装目录下的文件
然后我把nginx的相关目录的所有者修改为 www 就好了.
Most helpful comment
Actually it turns out that the problem was something completely different. I found the following in the error logs of nginx:
Turns out that for some reason the owner of the folder
/var/lib/nginx/*was notwww-datawhich actually runsnginxandphp5-fpmbut the primary user of the machine which lead to permission problems. So after a quick:Everything works as intended and I didn't notice any more problems. This issue can probably be closed.