Asking question doesn't work (no output, expired token handling and/or JSON problems)
Categories
(Core :: Machine Learning: Frontend, defect)
Tracking
()
People
(Reporter: Gijs, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [genai][chat])
STR:
- update and restart nightly after a week off
- open an arbitrary webpage
- ask a "Why" question in the sidebar and hit enter
ER:
message gets posted, response comes in
AR:
neither my question nor the response appear.
The browser console has 2 relevant errors:
MLEngine.worker.mjs had an unhandled error. Error: 401 status code (no body)
BackendError chrome://global/content/ml/backends/Pipeline.mjs:92
BackendErrorWithName chrome://global/content/ml/backends/Pipeline.mjs:65
run chrome://global/content/ml/backends/OpenAIPipeline.mjs:379
(twice)
followed by (1ms later):
LLM request returned a 401 - revoking our token and retrying
followed by (~500ms later):
SyntaxError: JSON.parse: expected double-quoted property name at line 1 column 153 of the JSON data
(but that last one without a stack, so unclear if it is truly related)
Updated•8 months ago
|
| Reporter | ||
Comment 1•8 months ago
•
|
||
Repeating the question did work.
This is all on 150.0a1, 20260223210545
Comment 2•8 months ago
|
||
i believe this profile might have had a token from before bug 2015671 but presumably bug 2015116 or bug 2015981 should have fixed it by retrying as the log shows in comment 0 but failed to actually retry successfully??
Comment 3•8 months ago
|
||
but failed to actually retry successfully??
It may be true that the profile had a token without expiry, which would account for the initial 401. However, it remains important that the code successfully handle a 401 regardless. It looks like bug 2015981 implemented the retry, so if that didn't work in this scenario it would appear there is a bug in that?
If it helps to reproduce, you can invalidate a cached token from the browser toolbox with await fxAccounts._internal.destroyOAuthToken({token: await fxAccounts.getOAuthToken({scope: "https://identity.mozilla.com/apps/smartwindow"})}) - that should keep the token cached but will be a 401 next time it is used. I tried to quickly test but I was getting 401s even with apparently valid and just fetched tokens, so I'm not sure what's going on there.
Comment 4•8 months ago
|
||
I tried to quickly test but I was getting 401s even with apparently valid and just fetched tokens, so I'm not sure what's going on there.
@markh are you on latest Nightly, any error in console?
Comment 5•8 months ago
|
||
AR:
neither my question nor the response appear.The browser console has 2 relevant errors:
MLEngine.worker.mjs had an unhandled error. Error: 401 status code (no body) BackendError chrome://global/content/ml/backends/Pipeline.mjs:92 BackendErrorWithName chrome://global/content/ml/backends/Pipeline.mjs:65 run chrome://global/content/ml/backends/OpenAIPipeline.mjs:379(twice)
followed by (1ms later):
LLM request returned a 401 - revoking our token and retryingfollowed by (~500ms later):
SyntaxError: JSON.parse: expected double-quoted property name at line 1 column 153 of the JSON data(but that last one without a stack, so unclear if it is truly related)
LLM request returned a 401 - revoking our token and retrying is coming from here when an invalid or expired token is found triggering a retry; that looks like went through successfully as there is no retry fail log in console Retry LLM request still returned a 401 - revoking our token and failing and repeating the question worked
In AR - 'neither my question nor the response appear' makes me think if there is any other underlying issue as only response should be missing
Comment 6•8 months ago
|
||
Tested with build from Feb 23rd using test steps from patch here to simulate expired token . Failed to replicate 'neither my question nor the response appear' scenario and response were generated after successful token revoke and retry.
Closing bug for now, please feel free to reopen if this issue is seen again. Thanks
Description
•