Bug 2076914

Summary: Untranslated error messages from exceptions in D-Bus calls
Product: Red Hat Enterprise Linux 9 Reporter: Lijun Li <lijli>
Component: subscription-managerAssignee: Pino Toscano <ptoscano>
Status: NEW --- QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.0CC: jhnidek, nmoumoul, ptoscano, qe-i18n-bugs, redakkan
Target Milestone: rcKeywords: i18n, Reopened, Translation, Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-31 07:28:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lijun Li 2022-04-20 08:19:33 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1. Open RHSM Cockpit Client via click Applications - System Tools - Red Hat Subscription Manager on the top menu bar from desktop.
2. Click Register button in Subscriptions dialog box, and check the pop-up Register System dialog box.
3. Select Custom URL and input stage env URL.
4. Check/uncheck 'Use proxy server', 'Attach automatically' or 'Connect this system to Red Hat Insights' checkbox.
5. Select Account or Activation Keys for Method, check the Login validation, and then input the correct Username and Password.
6. Click Register button.

Actual results:
[ALL LANG][RHSM Cockpit Client][RHSM Cockpit] Unlocalized warning messages in Register System dialog box:
Unable to connect to: test:3128 [Errno -2] 
Error: 'Organization' is required when using activation keys...
Invalid credentials.


Expected results:
They should be localized.

Additional info:
Please see the attached screen-shot.

Comment 2 Pino Toscano 2022-04-20 12:54:39 UTC
Regarding the three error messages:
1) "Unable to connect to: test:3128 [Errno -2]"
2) "Error: 'Organization' is required when using activation keys..."
3) "Invalid credentials."

(1) seems to be a raw ProxyException string in sub-man, apparently something is missing to handle it properly (and provide a better user explanation).

(2) seems to be an untranslated error string in the cockpit plugin itself (subscriptions-client.js).

(3) seems to be a raw NotAuthorizedException in Candlepin itself.

Comment 3 Pino Toscano 2022-05-26 12:18:35 UTC
The cockpit parts (In reply to Pino Toscano from comment #2)
> (2) seems to be an untranslated error string in the cockpit plugin itself
> (subscriptions-client.js).

This will be hopefully fixed with
https://github.com/candlepin/subscription-manager-cockpit/pull/23

Comment 5 Pino Toscano 2022-07-08 07:27:45 UTC
To recap the situation a bit after changes here and there:

(In reply to Pino Toscano from comment #2)
> 1) "Unable to connect to: test:3128 [Errno -2]"
>
> (1) seems to be a raw ProxyException string in sub-man, apparently something
> is missing to handle it properly (and provide a better user explanation).

This still needs to be addressed in subscription-manager; most likely it will need the fixes for bug 1971995 to be effective.

(In reply to Pino Toscano from comment #2)
> 2) "Error: 'Organization' is required when using activation keys..."
>
> (2) seems to be an untranslated error string in the cockpit plugin itself
> (subscriptions-client.js).

This was already fixed in subscription-mananger-cockpit;
in particular, subscription-mananger-cockpit-2-1 (in RHEL 9.1 nightlies) already has this fix.

(In reply to Pino Toscano from comment #2)
> 3) "Invalid credentials."
> 
> (3) seems to be a raw NotAuthorizedException in Candlepin itself.

This was fixed in upstream Candlepin already.
IIRC a new version of Candlepin should be rolled in production pretty soon, and thus should also bring the "Invalid credentials" message translated at least into fr, ja, ko, uk, zh_CH.

=====

Because of this, I'm keeping this bug open for subscription-manager, giving it a slightly more clear title on what's left to do, and moving it back to NEW (since it is not currently being worked on).

Comment 6 Lijun Li 2022-09-19 02:04:30 UTC
It's reproduced in latest RHEL9.1 build as well.

Comment 8 Lijun Li 2023-04-25 06:52:49 UTC
Reproduced on latest RHEL9.2 build.

Comment 9 Lijun Li 2023-04-25 07:00:55 UTC
Unlocalized messages:
Proxy error at test:3128: [Errno -2] 
Invalid credentials.

Comment 10 Pino Toscano 2023-04-25 07:15:59 UTC
(In reply to Lijun Li from comment #9)
> Invalid credentials.

This message existed in Candlepin before version 4.2.3, and subscription.rhsm.redhat.com currently runs 4.2.15 which has "Invalid Credentials" (different casing, no period at the end). "Invalid Credentials" existed for a long time, and it was already translated in Japanese and Chinese (and some other languages).
So:
- which registration server are you trying to register against?
- are you really sure the message you get is "Invalid credentials." and not "Invalid Credentials"?
- can you please add an extra screenshot (not the whole screen, only the registration popup in cockpit is enough) of the issue?

Thanks!

Comment 11 Lijun Li 2023-04-25 08:00:29 UTC
(In reply to Pino Toscano from comment #10)
> (In reply to Lijun Li from comment #9)
> > Invalid credentials.
> 
> This message existed in Candlepin before version 4.2.3, and
> subscription.rhsm.redhat.com currently runs 4.2.15 which has "Invalid
> Credentials" (different casing, no period at the end). "Invalid Credentials"
> existed for a long time, and it was already translated in Japanese and
> Chinese (and some other languages).
> So:
> - which registration server are you trying to register against?
Stage server: subscription.rhsm.stage.redhat.com

> - are you really sure the message you get is "Invalid credentials." and not
> "Invalid Credentials"?
It's "Invalid Credentials".

> - can you please add an extra screenshot (not the whole screen, only the
> registration popup in cockpit is enough) of the issue?
Please see the attached screenshot.

> 
> Thanks!

Comment 13 Pino Toscano 2023-04-25 08:39:51 UTC
(In reply to Lijun Li from comment #11)
> (In reply to Pino Toscano from comment #10)
> > (In reply to Lijun Li from comment #9)
> > > Invalid credentials.
> > 
> > This message existed in Candlepin before version 4.2.3, and
> > subscription.rhsm.redhat.com currently runs 4.2.15 which has "Invalid
> > Credentials" (different casing, no period at the end). "Invalid Credentials"
> > existed for a long time, and it was already translated in Japanese and
> > Chinese (and some other languages).
> > So:
> > - which registration server are you trying to register against?
> Stage server: subscription.rhsm.stage.redhat.com
> 
> > - are you really sure the message you get is "Invalid credentials." and not
> > "Invalid Credentials"?
> It's "Invalid Credentials".
> 
> > - can you please add an extra screenshot (not the whole screen, only the
> > registration popup in cockpit is enough) of the issue?
> Please see the attached screenshot.

Do you get the same issue when trying to register to the same server and same wrong credentials on console using `subscription-manager`?

Comment 14 Lijun Li 2023-04-25 08:55:09 UTC
(In reply to Pino Toscano from comment #13)
> (In reply to Lijun Li from comment #11)
> > (In reply to Pino Toscano from comment #10)
> > > (In reply to Lijun Li from comment #9)
> > > > Invalid credentials.
> > > 
> > > This message existed in Candlepin before version 4.2.3, and
> > > subscription.rhsm.redhat.com currently runs 4.2.15 which has "Invalid
> > > Credentials" (different casing, no period at the end). "Invalid Credentials"
> > > existed for a long time, and it was already translated in Japanese and
> > > Chinese (and some other languages).
> > > So:
> > > - which registration server are you trying to register against?
> > Stage server: subscription.rhsm.stage.redhat.com
> > 
> > > - are you really sure the message you get is "Invalid credentials." and not
> > > "Invalid Credentials"?
> > It's "Invalid Credentials".
> > 
> > > - can you please add an extra screenshot (not the whole screen, only the
> > > registration popup in cockpit is enough) of the issue?
> > Please see the attached screenshot.
> 
> Do you get the same issue when trying to register to the same server and
> same wrong credentials on console using `subscription-manager`?

Yes, but the message not the same on CLI console, please see as below.

# subscription-manager register 
登録中: subscription.rhsm.stage.redhat.com:443/subscription
ユーザー名: test
パスワード: 
Invalid username or password. To create a login, please visit https://www.redhat.com/wapps/ugc/register.html (HTTP エラーコード 401: Unauthorized)
^^^^^^^^^^^^^^^^^^^^^^^ Not "Invalid Credentials"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Comment 15 Pino Toscano 2023-04-26 08:18:52 UTC
(In reply to Lijun Li from comment #11)
> > - can you please add an extra screenshot (not the whole screen, only the
> > registration popup in cockpit is enough) of the issue?
> Please see the attached screenshot.

From the screenshot, it looks like both username and password were empty - is that correct?
If so, I'd try to use the same invalid credentials you used in CLI (comment 14).

Comment 16 Lijun Li 2023-04-26 08:26:28 UTC
(In reply to Pino Toscano from comment #15)
> (In reply to Lijun Li from comment #11)
> > > - can you please add an extra screenshot (not the whole screen, only the
> > > registration popup in cockpit is enough) of the issue?
> > Please see the attached screenshot.
> 
> From the screenshot, it looks like both username and password were empty -
> is that correct?
> If so, I'd try to use the same invalid credentials you used in CLI (comment
> 14).

Yes correct, they were just empty.

Comment 17 RHEL Program Management 2023-05-31 07:28:14 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.