Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing Nexus Config - Ext.JSON.decode(): You're trying to decode an invalid JSON String:

Tags:

nexus

extjs

Using Sonatype Nexus, I'm receiving this error message ONLY when accessing the /nexus/#admin/support/status.

Ext.JSON.decode(): You're trying to decode an invalid JSON String: Nexus Repository Manager (new Image).src="http://localhost/nexus/static/rapture/resources/favicon.ico?_v=3.17.0-01&_e=OSS"</script> function progressMessage(msg) { if (console && console.log) { console.log(msg); } document.getElementById('loading-msg').innerHTML=msg; } Loading ... progressMessage('Loading baseapp-prod.js'); progressMessage('Loading extdirect-prod.js'); progressMessage('Loading bootstrap.js'); progressMessage('Loading d3.v4.min.js'); progressMessage('Loading nexus-rapture-prod.js'); progressMessage('Loading nexus-blobstore-s3-prod.js'); progressMessage('Loading nexus-rutauth-plugin-prod.js'); progressMessage('Loading nexus-coreui-plugin-prod.js'); progressMessage('Loading nexus-proui-plugin-prod.js'); progressMessage('Loading nexus-repository-pypi-prod.js'); progressMessage('Loading nexus-repository-maven-prod.js'); progressMessage('Loading nexus-repository-npm-prod.js'); progressMessage('Loading nexus-onboarding-plugin-prod.js'); progressMessage('Loading nexus-repository-nuget-prod.js'); progressMessage('Loading nexus-repository-rubygems-prod.js'); progressMessage('Loading nexus-repository-docker-prod.js'); progressMessage('Loading app.js'); progressMessage('Initializing ...');

I'm using a reverse-proxy (nginx) to assign a RUT-header for authorization, looking something like this:

server { 
    listen 80; server_name localhost;

    location /auth { 
        proxy_set_header Host $host; 
        proxy_pass_request_body off; 
        proxy_set_header Content-Length ""; 
        proxy_pass http://nexus-proxy:8080; 
    }

    location /nexus { 
        auth_request /auth; 
        auth_request_set $user $upstream_http_x_forwarded_user;

        proxy_set_header Host $host; 
        proxy_set_header X-Real-IP $remote_addr; 
        proxy_set_header X-Forwarded-For $remote_addr; 
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-User $user; 
        proxy_pass http://nexus:8081; 
    }
}

And on successful auth, a 200 responsecode and X-Forwarded-User is sent to header and an empty JSON-object in the body (otherwise nexus complained in the main page).

I'm wondering if this empty JSON-object could be the reason why I get this message on the nexus status page, and what I could do to avoid it. Is there a predefined format that the JSON-response-body must follow for Nexus Ext js?

like image 732
Jesper Avatar asked Jul 09 '19 13:07

Jesper


1 Answers

Late answer in case it may help someone.

I find out that my adblocker caused this issue as well enter image description here

I had to disable my add blocker uBlock origin in my case, to fix it

like image 191
Anthony Raymond Avatar answered Nov 15 '22 23:11

Anthony Raymond