Bug 1553266 - Oops! in subscription-manager-cockpit TypeError: f.GetStatus is not a function
Summary: Oops! in subscription-manager-cockpit TypeError: f.GetStatus is not a function
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: subscription-manager
Version: 27
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
Assignee: Nikos Moumoulidis
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-08 15:28 UTC by Stef Walter
Modified: 2018-11-15 03:14 UTC (History)
7 users (show)

Fixed In Version: subscription-manager-1.24.2-1.fc27 subscription-manager-1.24.2-1.fc28 subscription-manager-1.24.2-1.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-15 02:12:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1836 0 None None None 2018-06-12 16:48:00 UTC

Description Stef Walter 2018-03-08 15:28:17 UTC
Description of problem:

When I try to access the "Subscriptions" page in Cockpit implemented by the subscription-manager-cockpit package I see the following in my Javascript console and an "Ooops!" in Cockpit

TypeError: f.GetStatus is not a function
[Learn More]
index.js:6767:13
g.getSubscriptionStatus/<
http://localhost:9090/cockpit/$eb4f5852d1b00a9fff605fa4200d449f45b9f7af/subscriptions/index.js:6767:13
P
http://localhost:9090/cockpit/$eb4f5852d1b00a9fff605fa4200d449f45b9f7af/base1/cockpit.js:874:31
T/<
http://localhost:9090/cockpit/$eb4f5852d1b00a9fff605fa4200d449f45b9f7af/base1/cockpit.js:886:17
j
http://localhost:9090/cockpit/$eb4f5852d1b00a9fff605fa4200d449f45b9f7af/base1/cockpit.js:803:17


Version-Release number of selected component (if applicable):

cockpit-162-1.fc27.x86_64
subscription-manager-cockpit-1.21.1-1.fc27.noarch
subscription-manager-1.21.1-1.fc27.x86_64

How reproducible:

Every time.

Steps to Reproduce:
1. yum install cockpit subscription-manager-cockpit
2. Log into Cockpit
3. Click on 'Subscriptions'

Actual results:

Oops! shown

Expected results:

Show the subscription status, even if blank in Fedora.

Comment 1 Kevin Howell 2018-03-12 14:47:11 UTC
If I recall correctly, can be worked around by refreshing the page.

Comment 2 Martin Pitt 2018-03-14 15:10:52 UTC
I just filed 1555384 about the D-Bus interface being broken (trivial fix). This might be the root cause for this failure, but of course the UI shoudl also react better to an absent subscription-manager than oopsing.

Comment 3 Nikos Moumoulidis 2018-06-07 16:17:14 UTC
I validate that

Comment 4 Nikos Moumoulidis 2018-06-08 12:55:56 UTC
I don't believe that 1555384 is the root cause for this failure. My testing shows that even if the d-bus interfaces are fixed and work normally, this error still persists.

The following busctl calls are successful:

$ busctl call com.redhat.RHSM1 /com/redhat/RHSM1/Entitlement com.redhat.RHSM1.Entitlement GetStatus ss '' en-USs 

"{\"status\": \"Current\", \"reasons\": {}, \"valid\": true}"

$ busctl call  com.redhat.RHSM1 /com/redhat/RHSM1/Config com.redhat.RHSM1.Config GetAll s en-US

a{sv} 4 "server" a{ss} 11 "proxy_password" "" "server_timeout" "180" "proxy_user" "" "port" "443" "insecure" "0" "prefix" "/subscription" "proxy_hostname" "" "proxy_port" "" "ssl_verify_depth" "3" "hostname" "subscription.rhsm.redhat.com" "no_proxy" "" "rhsm" a{ss} 14 "inotify" "1" "auto_enable_yum_plugins" "1" "repomd_gpg_url" "" "ca_cert_dir" "/etc/rhsm/ca/" "repo_ca_cert" "/etc/rhsm/ca/redhat-uep.pem" "full_refresh_on_yum" "0" "plugindir" "/usr/share/rhsm-plugins" "entitlementcertdir" "/etc/pki/entitlement" "consumercertdir" "/etc/pki/consumer" "pluginconfdir" "/etc/rhsm/pluginconf.d" "manage_repos" "1" "productcertdir" "/etc/pki/product" "baseurl" "https://cdn.redhat.com" "report_package_profile" "1" "rhsmcertd" a{ss} 3 "autoattachinterval" "1440" "splay" "1" "certcheckinterval" "240" "logging" a{ss} 1 "default_log_level" "INFO"

$ busctl call  com.redhat.SubscriptionManager /EntitlementStatus com.redhat.SubscriptionManager.EntitlementStatus check_status
i 0


But the cockpit addon still cannot access them, with the following errors:

subscriptions-client.js:452 Uncaught TypeError: configService.GetAll is not a function
    at Function.<anonymous> (subscriptions-client.js:452)
    at P (cockpit.js:877)
    at cockpit.js:889
    at j (cockpit.js:806)

subscriptions-client.js:431 Uncaught TypeError: entitlementService.GetStatus is not a function
    at Function.<anonymous> (subscriptions-client.js:431)
    at P (cockpit.js:877)
    at cockpit.js:889
    at j (cockpit.js:806)

Comment 5 Nikos Moumoulidis 2018-06-11 17:57:58 UTC
As it turns out, this error's root cause can be either of these:
* The rhsm service is not running. (reloading the page should force it to run)
* The user did not check the checkbox "Reuse my password for privileged tasks" on the login page.

Comment 6 Fedora Update System 2018-11-05 22:55:09 UTC
subscription-manager-1.24.2-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-075821dc8f

Comment 7 Fedora Update System 2018-11-05 22:55:48 UTC
subscription-manager-1.24.2-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-a675aa39fc

Comment 8 Fedora Update System 2018-11-05 22:56:30 UTC
subscription-manager-1.24.2-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-91ba32a0ff

Comment 9 Fedora Update System 2018-11-06 22:01:44 UTC
subscription-manager-1.24.2-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-075821dc8f

Comment 10 Fedora Update System 2018-11-06 22:45:37 UTC
subscription-manager-1.24.2-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-91ba32a0ff

Comment 11 Fedora Update System 2018-11-06 23:28:12 UTC
subscription-manager-1.24.2-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-a675aa39fc

Comment 12 Fedora Update System 2018-11-15 02:12:05 UTC
subscription-manager-1.24.2-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2018-11-15 02:28:35 UTC
subscription-manager-1.24.2-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2018-11-15 03:14:10 UTC
subscription-manager-1.24.2-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.