-
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: Cannot read property 'userTags' of undefined #2418
Comments
I have seen something similar if the "Feed Import Owner" wasn't set at all: https://github.com/greenbone/gvmd/blob/v20.8.0/INSTALL.md#set-the-feed-import-owner or the migration of the feed objects/data has failed (e.g. due to permission issues or similar). #2367 had improved the logging for me and had shown the correct message but this might be a separate case here. |
I've already set the "Feed Import Owner" as stated in the release/upgrade notes for 20.08 and I did so again now just to be sure, it doesn't change anything for me. I also tried the latest code of the gsa-20.08 branch (8fad03c) which includes #2367 that you mentioned, but I still get the same error in the web interface and the logs like in my initial report. Is the already mentioned |
Same happens for me if I try to access a report. I get the error described here: #2389 if I just try to access the reports page. Reports downloaded via gmv-cli are OK. |
This issue is about a crash at the report details page (a single report) right? In this case there must be something wrong with the returned XML by gvmd. Therefore we need the XML output of |
Here is the output: <get_reports_response status="200" status_text="OK">admin2020-08-27T10:57:19Z<creation_time>2020-08-27T10:57:19Z</creation_time><modification_time>2020-08-27T11:11:54Z</modification_time>0<in_use>0</in_use>Immediate scan of IP 172.17.9.62<report_format id="a994b278-1f62-11e1-96ac-406186ea4fc5">XML</report_format>apply_overrides=0 min_qod=70 first=1 rows=10 sort=nameapply_overrides=0min_qod=70first=1rows=10sort=namenameascending<report_count>211</report_count></get_reports_response> |
that's all? nothing else? Is the XML report format available at the report formats list? Oh I did a mistake in the XML requests. It should be <get_reports report_id="..." details="1"/> |
There isn't much more... am I doing something wrong then? <get_reports_response status="200" status_text="OK">admin2020-08-27T10:57:19Z<creation_time>2020-08-27T10:57:19Z</creation_time><modification_time>2020-08-27T11:11:54Z</modification_time>0<in_use>0</in_use>Immediate scan of IP 172.17.9.62<report_format id="a994b278-1f62-11e1-96ac-406186ea4fc5">XML</report_format>apply_overrides=0 min_qod=70 first=1 rows=10 sort=nameapply_overrides=0min_qod=70first=1rows=10sort=namenameascending<report_count>211</report_count></get_reports_response> |
It's missing the whole report. Personally I think it is because the XML report format isn't migrated correctly but I am not sure about that. |
I see the real results in the database. So I first have to isolate the xml problem I guess |
Guess you're few steps further already, I'm still trying to battle with gvm-cli. In the browser via I get
I didn't have success with gvm-cli yet: but since it seems to work for @stefanost67 and in the browser I'm probably just quoting something wrong(?). I also do have real results in the database and I can also view them via the |
Yes, I guess the quotes are wrong. |
The backslashes are hidden in the comment. I guess you'll see them in the e-mail |
Btw. gvm-cli has a --pretty option to format the XML response. |
Still no luck for me with gvm-cli sorry, still getting |
In order to show the correct escaping I have to copy the string as a code: |
My report looks like this:
When using details="1", I get "Remote closed the connection" |
@stefanost67 thanks a lot, my bad sorry. Now I get output as well, with the mentioned
so it's also missing to include the actual report for me and is identical to the one I get via the browser tools. |
so, is this a bug in gvmd or are we doing something wrong? |
Personally I can't answer this question at the moment. It will take some time to do further investigation. |
hello, I do not know what happened, I rebuilt my docker image on a new VM, ran my docker-compose on it and now reports are working. |
Are you using a different user as the feed owner and for accessing the report? |
Hello, I am not sure I understand what happened, but now I can correctly see and download reports on two different, twin systems. |
report retrieval works both via gvm-tools and via gsa. |
Do you use the released versions or the git branches? Did you migrate existing data? |
For me, no, I currently only have a single user in my setup. That one is admin and this is the one I set as the |
I use the 20.08 git branch
no, I build everything from scratch |
So since noone gave my question regarding the actual error that I have in my log |
Sounds like
to me |
Are you able to see report formats, regardless of whether you are using multiple users or not? |
@bjoernricks I'm pretty sure I followed the upgrade notes and copied over the old ones, however even if not, it should't just search in the root path instead of any uuid subdirectory or am I missing something? @timopollmeier in gsad it looks good I think edit: output of
|
On a new installation it should definitely not be neccessary to "keep" files from another version... Now I rebuilt everything using the git branches, new DB as always and I see this in the log:
Also copied "generate" and "report_format.xml" from
to
but still not working :-/ |
This path is not correct. gvmd should always be looking for "generate" in a dir with a UUID. I'm not sure why the UUID is missing, will look closer.
Sounds like you've just masked the error, and the other report formats won't work. |
Oh, this happens when the report format has no owner, which means your report formats have not been migrated. You can see in the GSA image the little sunglass icon, which means that the user does not own the report format. I guess something is going wrong when you set the Feed Import Owner. Any logs when you do that? Are you using the right UUID? |
runs without any error (would be great if this could be fixed to fail if there's an error or at least show some error). The logs however show the actual problem:
That makes perfect sense, files in |
@Virsacer I'm not sure you're seeing the same thing.
For a fresh install it is not required. But be sure to remove any old files if you are trying a fresh install.
Sounds good.
Please don't do this, it's just going to cause confusion.
You don't give details. I think you should even create a new issue. |
@mattmundell Actually I did: #2389 |
Yes, good idea. Done in greenbone/gvmd#1286. EDIT: corrected PR |
OK, I see. But it's a different issue, because you get a successful
This looks like a problem. Check your log when you give details="1". Something is probably failing there. |
Well this is strange:
|
Correct PR seems to be greenbone/gvmd#1286. After applying the changes I was able to successfully run the migration this time and at least for me the initial report seems to be fixed with that. Thanks to everyone involved! |
The means Postgres can't find the gvmd server-side library. Best solution is probably to add This serve-side library is a pain but there's not an easy way for us to get rid of it. |
Closing because @tgurr confirmed it working. |
@mattmundell, is there a way to re-generate the report_formats folder? I had removed my /opt/gvm folder and retained my database, and then did a new build of 20.08. Now I get the |
I got them back from backup and run the Feed owner ship. Now it's working again. |
Expected behavior
Display the report.
Actual behavior
When trying to access a report, e.g. https://greenbone.local/report/3c7cc9bb-7133-4362-be24-6f6a112d058c
is displayed.
Additionally I also run into another similiar issue which is already reported: #2389
Steps to reproduce
Note that it tries to search for a non-existing
in the logs.
GVM versions
gsa: (gsad --version)
Greenbone Security Assistant 20.08.0
gvm: (gvmd --version)
Greenbone Vulnerability Manager 20.08.0
Manager DB revision 233
openvas-scanner: (openvassd --version)
OpenVAS 20.8.0
gvm-libs:
20.8.0
Environment
Operating system:
Linux exherbo 5.6.14 #1 SMP Fri May 22 11:12:32 CEST 2020 x86_64 GNU/Linux
Installation method / source: (packages, source installation)
packages (but source based distribution)
Logfiles
The text was updated successfully, but these errors were encountered: