Activity log for bug #1955088

Date Who What changed Old value New value Message
2021-12-17 01:35:58 Pierre Equoy bug added bug
2021-12-17 01:36:46 Pierre Equoy tags easy
2021-12-17 01:36:50 Pierre Equoy qabro: importance Undecided Low
2021-12-17 01:40:41 Pierre Equoy description In some cases, trying to create an issue on Staging Launchpad fails with an error such as "XXX launchpad project not found". This is not the right error (it's the one currently implemented when trying to retrieve the project on Launchpad[1]). The actual exception raised is the following (and that should probably be added to either the qabro.log file, either to the UI screen): ---------- HTTP Error 401: Unauthorized Response headers: --- content-length: 55 content-type: text/plain;charset=utf-8 date: Thu, 16 Dec 2021 09:05:17 GMT server: gunicorn/19.8.1 status: 401 x-lazr-oopsid: OOPS-d28904b1b4a104810f4b151193167512 x-powered-by: Zope (www.zope.org), Python (www.python.org) x-request-id: bb7be462-cc4e-47ae-9627-193730f0af2c x-vcs-revision: 81e0895a331628041b6b472870508fda789d6973 --- Response body: --- b'Unknown consumer (System-wide: Ubuntu Core (coltrane)).' --- ---------- Launchpad engineers said: “Your tool passes credentials_file to Launchpad.login_with (https://git.launchpad.net/qabro/tree/qabro/bug_assistant.py#n59), and the path it uses for that doesn't take the Launchpad instance into account. So if you've used this tool previously with production, then you're probably sending production credentials to staging, which it doesn't recognize. You should probably make the credentials file path instance-sensitive in some way.” [1] https://git.launchpad.net/qabro/tree/qabro/bug_assistant.py?h=v0.16&id=1ee375bcc61ee84de65e875b4503d5a9503dceab#n94 Summary ======= In some cases, trying to create an issue on Staging Launchpad (`APPORT_LAUNCHPAD_INSTANCE=staging qabro`) fails with an error such as "XXX launchpad project not found". This is not the right error (it's the one currently implemented when trying to retrieve the project on Launchpad[1]). The actual exception raised is the following (and that should probably be added to either the qabro.log file, either to the UI screen): ---------- HTTP Error 401: Unauthorized Response headers: --- content-length: 55 content-type: text/plain;charset=utf-8 date: Thu, 16 Dec 2021 09:05:17 GMT server: gunicorn/19.8.1 status: 401 x-lazr-oopsid: OOPS-d28904b1b4a104810f4b151193167512 x-powered-by: Zope (www.zope.org), Python (www.python.org) x-request-id: bb7be462-cc4e-47ae-9627-193730f0af2c x-vcs-revision: 81e0895a331628041b6b472870508fda789d6973 --- Response body: --- b'Unknown consumer (System-wide: Ubuntu Core (coltrane)).' --- ---------- Root cause ========== Launchpad engineers said: “Your tool passes credentials_file to Launchpad.login_with (https://git.launchpad.net/qabro/tree/qabro/bug_assistant.py#n59), and the path it uses for that doesn't take the Launchpad instance into account. So if you've used this tool previously with production, then you're probably sending production credentials to staging, which it doesn't recognize. You should probably make the credentials file path instance-sensitive in some way.” Workaround ========== $ snap run --shell qabro (inside the snap) $ rm ~/.launchpadlib/qabro (inside the snap) $ exit Then you should be able to file a bug in any instance. [1] https://git.launchpad.net/qabro/tree/qabro/bug_assistant.py?h=v0.16&id=1ee375bcc61ee84de65e875b4503d5a9503dceab#n94