Oops, we're sorry but something went wrong No hosts have been specified

Problem:
I want to update puppet-agent on our content host. I go to the content hosts page. I search for " upgradable_rpms = puppet-agent-6.19.0-1.el7.x86_64". I click on the checkbox at the top row of the table to select all hosts. I’ll see the message “All 20 items on this page are selected. Select all 100.” and I click on the “Select all 100” to select all hosts on all pages. It shows “100 results are selected. Deselect all” and says 100 of 100 selected. I choose “Manage packages” from the “Select Action” button menu. I enter “puppet-agent” and click on “Update” and confirm with click on “Yes”.

I end up on the error page saying: “Oops, we’re sorry but something went wrong No hosts have been specified.”

This only happens if I use the “Select all” link. If I only choose hosts on the page and continue with those it works. Verified with Firefox and Safari on macOS.

Foreman and Proxy versions:

katello-3.16.1-1.el7.noarch, foreman 2.1.4

Distribution and version:

CentOS 7.8.2003

Can anybody verified this issue?

@gvde Can you include the production log during the same time period as when this problem occurs?

Don’t you see this issue if you use the “select all” link? I have tested in on various browsers and it’s always there, even on Windows 10 with Edge.

Here is the production log when the error occurs:

2020-11-02T18:25:51 [I|app|5fbc443c] Started POST "/katello/remote_execution" for 1.2.3.4 at 2020-11-02 18:25:51 +0100
2020-11-02T18:25:51 [I|app|5fbc443c] Processing by Katello::RemoteExecutionController#create as HTML
2020-11-02T18:25:51 [I|app|5fbc443c]   Parameters: {"name"=>"ansible", "remote_action"=>"package_update", "host_ids"=>"", "authenticity_token"=>"xxxx==", "customize"=>""}
2020-11-02T18:25:51 [W|app|5fbc443c] Action failed
2020-11-02T18:25:51 [I|app|5fbc443c]   Rendering common/500.html.erb within layouts/application
2020-11-02T18:25:51 [I|app|5fbc443c]   Rendered common/500.html.erb within layouts/application (Duration: 2.7ms | Allocations: 828)
2020-11-02T18:25:51 [I|app|5fbc443c]   Rendered layouts/_application_content.html.erb (Duration: 5.0ms | Allocations: 7015)
2020-11-02T18:25:51 [I|app|5fbc443c]   Rendering layouts/base.html.erb
2020-11-02T18:25:51 [I|app|5fbc443c]   Rendered layouts/base.html.erb (Duration: 4.9ms | Allocations: 8144)
2020-11-02T18:25:51 [I|app|5fbc443c] Completed 500 Internal Server Error in 53ms (Views: 45.4ms | ActiveRecord: 1.2ms | Allocations: 28306)

It’s the only non-info message.

This appears to be the same issue as seen in Bug #30350: Oops page when trying perform action on all systems from content host page - Katello - Foreman

The good news is that it is fixed in Katello 3.17.

You are right. Looks the same. As 3.17 is not too far away, I don’t patch my installation but rather wait for the 3.17 release.

@gvde glad we could help out.