-
Notifications
You must be signed in to change notification settings - Fork 95
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
TypeError: can't access property "scan_run_status", s is undefined #2389
Comments
Hi @Virsacer, |
After I saw the error the task was still "queued", but after it was "finished" the error did still occur. Thank you for trying to reproduce it. |
I rebuilt everything from source, repeated the other steps and I get the same error... Tried to pull the report with gvm-cli and this looks ok:
A reportformat with id a994b278-1f62-11e1-96ac-406186ea4fc5 is also listed on the reportformats-page... |
Continuing from #2418
@mattmundell Ok, I had used "ldconfig /gvm/lib" but apparently this was not enough...
But there should be a "Greenbone Security Assistant (GSA) Default Credentials" in the report...
Do you have any idea what could be wrong? |
Not sure. Might help to post the full GMP command you used. Perhaps your scan has no results. Perhaps try in GSA and see what GMP it uses. |
Same problem |
Picking up this issue. The error in GSA is caused by You need to look at the |
I even switched from ubuntu to debian, but it is still not working...
|
Same issue on my site after upgrade to 20.08.00. |
Same error. |
This is reproduced on our side as well. |
Current status is, that I still can't reproduce it in GSA, but obviously it's a real bug somewhere. The ticket concerning this issue is active! |
Same issue here after the update to version 20.08. |
Same issue. GSA version: 20.08.0~git --------------------------- Error detail -------------------- |
Okay, glad I'm not the only one getting this issue. Even tried gsa-21.04 branch with no luck. |
I'm wondering, what @swaterkamp is doing differently so that he does not get the error... |
We can't reproduce the issue at all. Neither any developer nor any of our customers has this issue. Therefore it is very very likely an issue with the setup. Would be nice to get a detailed step by step guide on how to reproduce the issue reliably when installing our software from sources (at best from the 20.08 release branches. |
I have a good example then. This container setup is done according to the official documentation. You may build the container, or pull it from Docker Hub. You can reproduce the error there and perhaps troubleshoot if you have the time and interest. |
Here are my steps to reproduce:
Now login to GSA and wait until all SecInfo is present. |
I can see that both, the docker image https://github.com/AquaL1te/gvm linked by @AquaL1te as well as the instructions provided by @Virsacer are using the latest available release 20.08.0 of GSA from the initial release of GVM-20.08 in August 2020. This might explain why @greenbone/gsa-dev can't reproduce this as the changes are high it was already fixed in one of the 136 commits done to the Instead of using the v20.08.0 release: https://github.com/greenbone/gsa/archive/v20.8.0.tar.gz you might want to give the 20.08 stable / release branch a try which contains quite a lot fixes: https://github.com/greenbone/gsa/archive/gsa-20.08.zip |
Well I have also tried it with the git versions in the past but with the same results... You can change the download urls (and the directory names) - the rest of the instructions still applies |
I've just build all components from scratch (using all 20.08 release branches) again and I am still not able to reproduce the error. Differences on my side:
So could somebody else please verify that the issue still occurs with using the release branches? |
Ok, that's it! |
I too am having this problem and I have been able to drill down into its cause, to a point. I regenerated the main.*.chunk.js JavaScript code without it being minified and the issue is originating in "gsa-20.8.0/gsa/src/web/pages/reports/row.js". I installed from the version 20.8 tar ball on Debian 10 but I checked the latest version of row.js and it has not changed. Lines 94-103 of row.js looks like this:
The code is expecting "entity" to contain an element named "report" but when you run the system in a web browser, "entity" is the report and does not contain an element called "report". This is the main.*.chunk.js code:
However, the "entity" structure as seen in the JavaScript debugger looks like this:
The variable "report" is undefined because "entity" does not contain an element named "report" -- it is the report. The code would work if "var report = entity" instead of "var report = entity.report" but the larger cause seems to be how React is parsing the response from the gsa server. This is a snippet of the XML being returned by "get_reports" command:
Based on the comments by the Greenbone staff not being able to reproduce the error I suspect the React parser is working differently for Greenbone than those of us having this issue. I would expect that that I am using a different Debian package for some component of the build that works differently from how it works on the Greenbone development machines. Alternately, is gsad supposed to return a <report> element within the <report id="..."> element? I am not fluent in React and yarnpkg, so the solution may be obvious to someone who is. Oddly, as others have pointed out, everything else is working (I can click on the Results menu item and see the results of the scans). Any thoughts would be appreciated. Thanks. |
SOLVED: There is a permission problem on the following directory:
The missing <report> elements within the outer <report id="..."> are created by the report formatting scripts. These scripts could not run because the above directory has no read or execute permissions for anyone but the directory owner. The scripts are run as "nobody" in "nogroup". Solution: Run the following command:
You do not need to restart any Greenbone components. The fix will take effect immediately. |
Nice! ...and when you change the permission back to 700 the error apears again :-D GVMD probably should set the permission upon creation to prevent further users from running into this pitfall... |
https://community.greenbone.net/t/fix-for-reports-not-displaying-in-gvm-20-8-due-to-javascript-errors/7905 for a summary of this issue. |
Thanks all for your patience. Because the root cause has been found I am closing this issue. We are going to add some patches to |
Great timing on this fix, was hoping to make a presentation at work on GSA soon, but couldn't figure this one out. Thanks @gmottram |
Reference to the related improvements on |
Side note for others, also make sure the disk is not mounted with e.g. |
Expected behavior
Display the Reports-page
Actual behavior
As soon as there are Reports, the Reports-page displays this error:
Steps to reproduce
build from official release https://community.greenbone.net/t/gvm-20-08-stable-initial-release-2020-08-12/6312
new DB
new user
set import-owner
rebuild-scap
rebuild nvt
create first task
run first task
go to Reports-page
GVM versions
gsa: (gsad --version)
Greenbone Security Assistant 20.08.0~git
gvm: (gvmd --version)
Greenbone Vulnerability Manager 20.08.0
Manager DB revision 233
openvas-scanner: (openvassd --version)
bash: openvassd: command not found
gvm-libs:
20.8
Environment
Ubuntu 20.04
Installation method / source: (packages, source installation)
https://community.greenbone.net/t/gvm-20-08-stable-initial-release-2020-08-12/6312
Logfiles
The text was updated successfully, but these errors were encountered: