Sync Status page fails

Problem:
Attempt to access “Sync Status” page fails and results in the dreaded:
We’re sorry, something went wrong.
If you are the application owner check the logs for more information.

Expected outcome:
The page renders correctly

Foreman and Proxy versions:
Foreman and Proxy plugin versions:

ansible-collection-theforeman-foreman-0.4.1-1.el7.noarch
foreman-1.24.3-1.el7.noarch
foreman-cli-1.24.3-1.el7.noarch
foreman-debug-1.24.3-1.el7.noarch
foreman-installer-1.24.3-1.el7.noarch
foreman-installer-katello-1.24.3-1.el7.noarch
foreman-postgresql-1.24.3-1.el7.noarch
foreman-proxy-1.24.3-1.el7.noarch
foreman-release-1.24.3-1.el7.noarch
foreman-selinux-1.24.3-1.el7.noarch
foreman-vmware-1.24.3-1.el7.noarch
katello-3.14.1-1.el7.noarch
katello-agent-3.5.1-2.el7.noarch
katello-ca-consumer-s2-foreman.s2.internal-1.0-14.noarch
katello-certs-tools-2.6.0-1.el7.noarch
katello-client-bootstrap-1.7.4-1.el7.noarch
katello-common-3.14.1-1.el7.noarch
katello-debug-3.14.1-1.el7.noarch
katello-default-ca-1.0-1.noarch
katello-host-tools-3.5.1-2.el7.noarch
katello-host-tools-fact-plugin-3.5.1-2.el7.noarch
katello-host-tools-tracer-3.5.1-2.el7.noarch
katello-selinux-3.1.1-1.el7.noarch
katello-server-ca-1.0-1.noarch
katello-service-3.14.1-1.el7.noarch
pulp-admin-client-2.21.3-1.el7.noarch
pulp-client-1.0-8.noarch
pulp-deb-plugins-1.10.1-1.el7.noarch
pulp-docker-plugins-3.2.6-1.el7.noarch
pulp-katello-1.0.3-1.el7.noarch
pulp-puppet-plugins-2.21.3-1.el7.noarch
pulp-puppet-tools-2.21.3-1.el7.noarch
pulp-rpm-admin-extensions-2.21.3-1.el7.noarch
pulp-rpm-plugins-2.21.3-1.el7.noarch
pulp-selinux-2.21.3-1.el7.noarch
pulp-server-2.21.3-1.el7.noarch
python-pulp-bindings-2.21.3-1.el7.noarch
python-pulp-client-lib-2.21.3-1.el7.noarch
python-pulp-common-2.21.3-1.el7.noarch
python-pulp-deb-common-1.10.1-1.el7.noarch
python-pulp-docker-common-3.2.6-1.el7.noarch
python-pulp-oid_validation-2.21.3-1.el7.noarch
python-pulp-puppet-common-2.21.3-1.el7.noarch
python-pulp-repoauth-2.21.3-1.el7.noarch
python-pulp-rpm-common-2.21.3-1.el7.noarch
python-pulp-streamer-2.21.3-1.el7.noarch
rubygem-foreman_maintain-0.5.4-1.el7.noarch
rubygem-smart_proxy_pulp-1.5.0-1.el7.noarch
s2-foreman.s2.internal-apache-1.0-2.noarch
s2-foreman.s2.internal-foreman-client-1.0-2.noarch
s2-foreman.s2.internal-foreman-proxy-1.0-2.noarch
s2-foreman.s2.internal-foreman-proxy-client-1.0-2.noarch
s2-foreman.s2.internal-puppet-client-1.0-2.noarch
s2-foreman.s2.internal-qpid-broker-1.0-2.noarch
s2-foreman.s2.internal-qpid-client-cert-1.0-2.noarch
s2-foreman.s2.internal-qpid-router-client-1.0-2.noarch
s2-foreman.s2.internal-qpid-router-server-1.0-2.noarch
s2-foreman.s2.internal-tomcat-1.0-2.noarch
tfm-rubygem-foreman_docker-5.0.0-2.fm1_23.el7.noarch
tfm-rubygem-foreman_remote_execution-2.0.8-1.fm1_24.el7.noarch
tfm-rubygem-foreman_remote_execution_core-1.3.0-1.el7.noarch
tfm-rubygem-foreman-tasks-0.17.5-1.fm1_24.el7.noarch
tfm-rubygem-foreman-tasks-core-0.3.3-1.fm1_24.el7.noarch
tfm-rubygem-foreman_templates-7.0.7-1.fm1_24.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.19.6-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_admin-0.0.8-2.el7.noarch
tfm-rubygem-hammer_cli_foreman_admin-doc-0.0.8-2.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.3.0-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-doc-0.3.0-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_discovery-1.0.1-1.fm1_24.el7.noarch
tfm-rubygem-hammer_cli_foreman_discovery-doc-1.0.1-1.fm1_24.el7.noarch
tfm-rubygem-hammer_cli_foreman-doc-0.19.6-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.4-4.el7.noarch
tfm-rubygem-hammer_cli_foreman_openscap-0.1.8-1.fm1_23.el7.noarch
tfm-rubygem-hammer_cli_foreman_openscap-doc-0.1.8-1.fm1_23.el7.noarch
tfm-rubygem-hammer_cli_foreman_remote_execution-0.1.0-2.fm1_23.el7.noarch
tfm-rubygem-hammer_cli_foreman_remote_execution-doc-0.1.0-2.fm1_23.el7.noarch
tfm-rubygem-hammer_cli_foreman_ssh-0.0.2-7.el7.noarch
tfm-rubygem-hammer_cli_foreman_ssh-doc-0.0.2-7.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.13-1.fm1_23.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-doc-0.0.13-1.fm1_23.el7.noarch
tfm-rubygem-hammer_cli_foreman_templates-0.1.2-1.fm1_23.el7.noarch
tfm-rubygem-hammer_cli_foreman_templates-doc-0.1.2-1.fm1_23.el7.noarch
tfm-rubygem-hammer_cli_katello-0.20.2-1.el7.noarch
tfm-rubygem-katello-3.14.1-1.el7.noarch
tfm-rubygem-pulp_2to3_migration_client-0.0.1a1.dev01570560174-1.el7.noarch
tfm-rubygem-pulp_ansible_client-0.2.0b1.dev0.1560866833-1.el7.noarch
tfm-rubygem-pulpcore_client-3.0.0rc2.dev.1557772471-1.el7.noarch
tfm-rubygem-pulp_docker_client-4.0.0b6.dev01562331743-1.el7.noarch
tfm-rubygem-pulp_file_client-0.0.1b10.dev.1557779852-1.el7.noarch
tfm-rubygem-pulp_rpm_client-3.0.0b7.dev01570381057-1.el7.noarch

Distribution and version:
CentOS 7.8

Other relevant data:

/var/log/foreman/production.log

2020-07-27T07:54:04 [I|app|12ef4de1] Started GET "/katello/sync_management" for 10.8.50.101 at 2020-07-27 07:54:04 -0700
2020-07-27T07:54:04 [I|app|12ef4de1] Processing by Katello::SyncManagementController#index as HTML
2020-07-27T07:54:04 [W|app|12ef4de1] Action failed
2020-07-27T07:54:04 [I|app|12ef4de1]   Rendering common/500.html.erb within katello/layouts/katello
2020-07-27T07:54:04 [I|app|12ef4de1]   Rendered common/500.html.erb within katello/layouts/katello (3.7ms)
2020-07-27T07:54:04 [I|app|12ef4de1] Completed 500 Internal Server Error in 59ms (ActiveRecord: 7.2ms)
2020-07-27T07:54:04 [F|app|12ef4de1]
2020-07-27T07:54:04 [F|app|12ef4de1] ActionView::Template::Error (wrong number of arguments (given 1, expected 0)):
2020-07-27T07:54:04 [F|app|12ef4de1]     1: <%= alert :header => _("Oops, we're sorry but something went wrong"), :class => 'alert-danger',
2:   :actions => link_to(_('Back'), main_app.root_path, :class => 'btn btn-default'),
3:   :text => h(exception.message),
4:   :close => false %>
2020-07-27T07:54:04 [F|app|12ef4de1]
2020-07-27T07:54:04 [F|app|12ef4de1] app/views/common/500.html.erb:1:in `_2aba17fdd906de9ee02e1163d62e1d81'
app/controllers/application_controller.rb:325:in `generic_exception'
katello (3.14.1) lib/katello/middleware/event_daemon.rb:10:in `call'
lib/foreman/middleware/telemetry.rb:10:in `call'
lib/foreman/middleware/catch_json_parse_errors.rb:9:in `call'
lib/foreman/middleware/logging_context_session.rb:22:in `call'
lib/foreman/middleware/logging_context_request.rb:11:in `call'
katello (3.14.1) lib/katello/prevent_json_parsing.rb:12:in `call'
2020-07-27T07:54:04 [I|app|322a1e03] Started GET "/katello/sync_management" for 10.8.50.101 at 2020-07-27 07:54:04 -0700
2020-07-27T07:54:04 [I|app|322a1e03] Processing by Katello::SyncManagementController#index as HTML
2020-07-27T07:54:04 [W|app|322a1e03] Action failed
2020-07-27T07:54:04 [I|app|322a1e03]   Rendering common/500.html.erb within katello/layouts/katello
2020-07-27T07:54:04 [I|app|322a1e03]   Rendered common/500.html.erb within katello/layouts/katello (3.6ms)
2020-07-27T07:54:04 [I|app|322a1e03] Completed 500 Internal Server Error in 65ms (ActiveRecord: 5.4ms)
2020-07-27T07:54:04 [F|app|322a1e03]
2020-07-27T07:54:04 [F|app|322a1e03] ActionView::Template::Error (wrong number of arguments (given 1, expected 0)):
2020-07-27T07:54:04 [F|app|322a1e03]     1: <%= alert :header => _("Oops, we're sorry but something went wrong"), :class => 'alert-danger',
2:   :actions => link_to(_('Back'), main_app.root_path, :class => 'btn btn-default'),
3:   :text => h(exception.message),
4:   :close => false %>
2020-07-27T07:54:04 [F|app|322a1e03]
2020-07-27T07:54:04 [F|app|322a1e03] app/views/common/500.html.erb:1:in `_9f3b59b7505ddc06f008d70287068a0b'
app/controllers/application_controller.rb:325:in `generic_exception'
katello (3.14.1) lib/katello/middleware/event_daemon.rb:10:in `call'
lib/foreman/middleware/telemetry.rb:10:in `call'
lib/foreman/middleware/catch_json_parse_errors.rb:9:in `call'
lib/foreman/middleware/logging_context_session.rb:22:in `call'
lib/foreman/middleware/logging_context_request.rb:11:in `call'
katello (3.14.1) lib/katello/prevent_json_parsing.rb:12:in `call'

An unrelated activity changed the foreman user’s gid, blocking access to certain files. Using find/exec, the ownership was reset and all is working. Error messages were generally not helpful.