Closed Bug 1545793 Opened 6 months ago Closed 6 months ago

Update download started from standard or admin user is no longer performed via BITS if the user logs out and triggers the update download from a Guest account as well

Categories

(Toolkit :: Application Update, defect, P1)

68 Branch
All
Windows 7
defect

Tracking

()

VERIFIED FIXED
mozilla68
Tracking Status
firefox-esr60 --- unaffected
firefox66 --- unaffected
firefox67 --- unaffected
firefox68 --- verified

People

(Reporter: emilghitta, Assigned: bytesized)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Affected versions

  • Firefox 68.0a1 (BuildId:20190327175114)

Unaffected versions

  • Firefox 67.0b12
  • Firefox 66.0.3
  • Firefox 60.6.1 esr

Affected platforms

  • Windows 7 32bit

Unaffected platforms

  • Ubuntu 18.04 64bit
  • macOS 10.12.6

Preconditions

  • Create and enable a Guest account.
  • Set app.update.BITS.enabled and app.update.log to true

Steps to reproduce

  1. Start the update download via BITS from an admin or standard account.
  2. Log out of the current in use account while Firefox is still performing the update download.
  3. Log in to the Guest account.
  4. Launch Firefox and verify the browser console.
  5. Log out from the Guest account while Firefox is still performing the update download.
  6. Log in to the standard or admin user (where the update download was initially initiated ).
  7. Launch Firefox and verify the browser console.

Expected result
4. AUS:SVC Downloader:downloadUpdate - Failed to connect to existing BITS job. It is likely owned by another user.
7. AUS:SVC Downloader:downloadUpdate - Connecting to in-progress download. BITS ID:...
AUS:SVC Downloader:downloadUpdate - BITS download running. BITS ID….

Actual result
4. AUS:SVC Downloader:downloadUpdate - Connecting to in-progress download. BITS ID…
AUS:SVC Downloader:downloadUpdate - Failed to start to BITS job. Error: BitsError: BitsError {type: 18, action: 4, stage: 5, codeType: string, code: "CoCreateInstance error: HRESULT 0x80070005"}
7. AUS:SVC Downloader:_canUseBits - not using BITS because it was already tried
AUS:SVC Downloader:downloadUpdate - Starting nsIIncrementalDownload with url…..

Regression range

  • I don’t think that this is a regression.

Additional Information

  • Please note that the update download is not performed via BITS if the update is started from the Guest user. The following message is being thrown inside the browser console:
    AUS:SVC Downloader:_canUseBits - not using BITS because it was already tried
    AUS:SVC Downloader:downloadUpdate - Starting nsIIncrementalDownload with url…..

Hmm. The guest account does not seem to be a thing in Windows 10. I guess I need to get a copy of Windows 7 that I can use.

I have nearly reproduced this, but I am getting a slightly different error:

{type: 18, action: 4, stage: 5, codeType: string, code: "CoCreateInstance error: HRESULT 0x80070005"}

compared to the one you are reporting:

{type8,action4,stage,5,codeType: string, code: “CoCreateInstance error: HRESULT 0x80070005”}

An error message of the format that you reported shouldn't actually be possible. Maybe some characters ended up getting dropped somehow?

Can you verify for me whether this is the error message you are getting?

Flags: needinfo?(emil.ghitta)

Indeed, the info may have been cut off by mistake while logging this issue.

The correct error (the one that I encountered as well) is the one you mentioned:

{type: 18, action: 4, stage: 5, codeType: string, code: "CoCreateInstance error: HRESULT 0x80070005"}

Flags: needinfo?(emil.ghitta)
Assignee: nobody → ksteuber

This patch should prevent a guest user from putting a non-guest user's (existing) BITS download in a failure state. If, however, the guest user is the first user to try BITS, it will fail and will still put BITS in an error state, falling back to nsIIncrementalDownload.

Depends on D28257

Pushed by ksteuber@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dddeb70e81e7
Add a specific error code for when we cannot connect to the background copy manager r=agashlin
https://hg.mozilla.org/integration/autoland/rev/6e95f85fb09f
Propogate new BITS client error through the async XPCOM layer r=lina
https://hg.mozilla.org/integration/autoland/rev/27c8b8f5b3c8
Don't put a BITS update in a failure state if the user doesn't have permission to access BITS r=rstrong
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68

This issue is verified fixed on Windows 7 32bit. Tested while updating Firefox 68.0a1 (BuildId:20190423221610).

Status: RESOLVED → VERIFIED
Blocks: 1556999
You need to log in before you can comment on or make changes to this bug.