Welcome! Log In Create A New Profile

Advanced

Error in chunked response

February 10, 2023 07:56AM
Hi.
I'm having a strange issue when proxying a self hosted Sentry [1][2] instance. It works when accessed directly (to the Docker port), but throws Javascript error in console when proxied via nginx.

It doesn't appear an application problem, because as I said it works fine when accessed directly. I raised an issue to Sentry [3], but it appears something related to the proxy.

I tried different browsers and in incognito mode, same behavior.
I failed to find where the problem could be. Any hint is welcome.

Thanks


In JS console I see:
Loading failed for the <script> with source “https://sentry.domain.com/_static/dist/sentry/chunks/app_actionCreators_organization_tsx-app_bootstrap_commonInitialization_tsx-app_bootstrap_init-73196b.1fa346ca59b89f776cae.js”. [issues:1:1](https://sentry.domain.com/organizations/sentry/issues/)
Uncaught (in promise) ChunkLoadError: Loading chunk app_actionCreators_organization_tsx-app_bootstrap_commonInitialization_tsx-app_bootstrap_init-73196b failed.
(error: [https://sentry.domain.com/_static/dist/sentry/chunks/app_ac…zation_tsx-app_bootstrap_init-73196b.1fa346ca59b89f776cae.js](https://sentry.domain.com/_static/dist/sentry/chunks/app_actionCreators_organization_tsx-app_bootstrap_commonInitialization_tsx-app_bootstrap_init-73196b.1fa346ca59b89f776cae.js))
j jsonp chunk loading:27
e ensure chunk:6
e ensure chunk:5
r initializeMain.tsx:14
async* index.tsx:80
async* index.tsx:83
<anonymous> app.js:1
[jsonp chunk loading:27:17](webpack:///webpack/runtime/jsonp%20chunk%20loading)
r initializeMain.tsx:15
AsyncFunctionThrow self-hosted:811
(Async: async)
<anonymous> index.tsx:80
AsyncFunctionNext self-hosted:807
(Async: async)
<anonymous> index.tsx:83
<anonymous> app.js:1

nginx config:
server {
if ($host = sentry.domain.com) {
return 301 https://$host$request_uri;
} # managed by Certbot

listen 80;
listen [::]:80;
server_name sentry.domain.com;
root /dati/www/sentry.domain.com;

access_log /var/log/nginx/sentry.domain.com.access.log;
error_log /var/log/nginx/sentry.domain.com.error.log error;
}

server {
listen 443 ssl;
listen [::]:443 ssl;
server_name sentry.domain.com;
ssl_certificate /etc/letsencrypt/live/sentry.domain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/sentry.domain.com/privkey.pem; # managed by Certbot

keepalive_timeout 0;

gzip off;
proxy_http_version 1.1;
proxy_redirect off;
proxy_buffering off;
proxy_next_upstream error timeout invalid_header http_502 http_503 non_idempotent;
proxy_next_upstream_tries 2;
proxy_set_header Connection '';
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Request-Id $request_id;
proxy_read_timeout 30s;
proxy_send_timeout 5s;

root /dati/www/sentry.domain.com;
index index.html;
access_log /var/log/nginx/sentry.domain.com.access.log;
error_log /var/log/nginx/sentry.domain.com.error.log error;


location / {
proxy_pass http://127.0.0.1:9012;
}
}


# nginx -V
nginx version: nginx/1.22.1
built with OpenSSL 1.1.1f 31 Mar 2020
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fdebug-prefix-map=/build/nginx-CAzFYO/nginx-1.22.1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-compat --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_flv_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_perl_module=dynamic --with-http_random_index_module --with-http_secure_link_module --with-http_sub_module --with-http_xslt_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-stream=dynamic --with-stream_geoip_module=dynamic --with-stream_ssl_module --with-stream_ssl_preread_module --add-dynamic-module=/build/nginx-CAzFYO/nginx-1.22.1/debian/modules/brotli --add-dynamic-module=/build/nginx-CAzFYO/nginx-1.22.1/debian/modules/http-headers-more-filter --add-dynamic-module=/build/nginx-CAzFYO/nginx-1.22.1/debian/modules/http-auth-pam --add-dynamic-module=/build/nginx-CAzFYO/nginx-1.22.1/debian/modules/http-cache-purge --add-dynamic-module=/build/nginx-CAzFYO/nginx-1.22.1/debian/modules/http-dav-ext --add-dynamic-module=/build/nginx-CAzFYO/nginx-1.22.1/debian/modules/http-ndk --add-dynamic-module=/build/nginx-CAzFYO/nginx-1.22.1/debian/modules/http-echo --add-dynamic-module=/build/nginx-CAzFYO/nginx-1.22.1/debian/modules/http-fancyindex --add-dynamic-module=/build/nginx-CAzFYO/nginx-1.22.1/debian/modules/http-geoip2 --add-dynamic-module=/build/nginx-CAzFYO/nginx-1.22.1/debian/modules/nchan --add-dynamic-module=/build/nginx-CAzFYO/nginx-1.22.1/debian/modules/http-lua --add-dynamic-module=/build/nginx-CAzFYO/nginx-1.22.1/debian/modules/rtmp --add-dynamic-module=/build/nginx-CAzFYO/nginx-1.22.1/debian/modules/http-uploadprogress --add-dynamic-module=/build/nginx-CAzFYO/nginx-1.22.1/debian/modules/http-upstream-fair --add-dynamic-module=/build/nginx-CAzFYO/nginx-1.22.1/debian/modules/http-subs-filter --add-dynamic-module=/build/nginx-CAzFYO/nginx-1.22.1/debian/modules/ssl-ct


[1] https://github.com/getsentry/sentry
[2] https://github.com/getsentry/self-hosted/
[3] https://github.com/getsentry/sentry/issues/43830
Subject Author Posted

Error in chunked response

maxxer February 10, 2023 07:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 282
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready