Bug 1636539 Comment 8 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I have a happy (debug) [try build](https://treeherder.mozilla.org/#/jobs?repo=try&searchStr=windows%2C2012%2Cdebug%2Cbuild-win32%2Fdebug%2C%28b%29&revision=ecac709532ece5654e4eba160152341df35c28eb).

Here's how I've tested this locally:

- Install from [try build](https://firefoxci.taskcluster-artifacts.net/DFlW7aK_SrCY_PrhWJxEyA/0/public/build/install/sea/target.installer.exe).  Elevated privileges should not matter, but I tested without them so please test with them.  **DO NOT RUN THE INSTALLED FIREFOX IMMEDIATELY**

- Open a command prompt.  Again, elevated privileges should not matter.  Navigate to the location of `firefox.exe`, and run the default browser agent debug commands:
```
  C:\Users\nalexander\AppData\Local\Firefox Nightly>default-browser-agent.exe debug-remote-disabled
  default-browser-agent: Last remote disabled: 0
  default-browser-agent: Remote service disabled state URL: 'https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff'
  [ERROR defaultagent_static] Using remote settings URL: https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff
  [ERROR defaultagent_static] Error::NetworkError
  default-browser-agent: Error code: 0x7d01
  IsAgentRemoteDisabled: 0
```
Witness the URL, which should fallback to the production URL: `https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff`.  Right now this will fail since we don't have the records in production, only in staging.  But it's important to test that not having the setting in the registry doesn't crash.

- Run the installed Firefox.  This populates certain registry entries with settings.  In the absence of those settings (the URL to fetch), we should fallback to the production URL, as verified above.

- (Optional) Look in regedit under the key `Computer\HKEY_CURRENT_USER\Software\Mozilla\Firefox\Default Browser Agent` and witness entries with names like
  `C:\Users\nalexander\AppData\Local\Firefox
  Nightly|DefaultAgentRemoteServicesStateURL` with long URL defaulting to
  `https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff`

- In Firefox about:config, set
  `default-browser-agent.remote_services_state_url` to
  `https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff`
  (Here, only the origin changes; the path remains the same.)  This is a staging record that **enables** WDBA.

- Open a command prompt.  Again, elevated privileges should not matter.  Navigate to the location of `firefox.exe`, and run the default browser agent debug commands:
```
  C:\Users\nalexander\AppData\Local\Firefox Nightly>default-browser-agent.exe debug-remote-disabled
  default-browser-agent: Last remote disabled: 0
  default-browser-agent: Remote service disabled state URL: 'https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff'
  [ERROR defaultagent_static] Using remote settings URL: https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff
  default-browser-agent: Error code: 0x0
  default-browser-agent: Next remote disabled: 0
  IsAgentRemoteDisabled: 0
```
Witness the configured URL.  If the network is available, you should see `IsAgentRemoteDisabled: 0`.

- (Optional) witness the last witnessed value (0) in regedit, like `C:\Users\nalexander\AppData\Local\Firefox Nightly|DefaultAgentLastRemoteDisabled`

- Disable the network, or update the URL to something that will 404.

- Run `debug-remote-disabled` again.  Witness an error code but that we fall back to the last witnessed remote disabled value (here, 0, meaning "not disabled").
```
  C:\Users\nalexander\AppData\Local\Firefox Nightly>default-browser-agent.exe debug-remote-disabled
  default-browser-agent: Last remote disabled: 0
  default-browser-agent: Remote service disabled state URL: 'https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173fffg'
  [ERROR defaultagent_static] Using remote settings URL: https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173fffg
  [ERROR defaultagent_static] Error::NetworkError
  default-browser-agent: Error code: 0x7d01
  IsAgentRemoteDisabled: 0
```
- If necessary, re-enable the network.

- In Firefox about:config, then set
  `default-browser-agent.remote_services_state_url` to
  `https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f0ff0ff0ff`
  (Here, the origin is still stage but the path points to a known record that flips the kill switch to disabled.)  **THIS RECORD SHOULD EXIST TOMORROW** -- it is waiting for Rachel Tublitz to "review" it so that it's published.

- Run `debug-remote-disabled` again.  Witness no error code and that we're remotely disabled (with a 1, meaning "yes disabled").
```
  C:\Users\nalexander\AppData\Local\Firefox Nightly>default-browser-agent.exe debug-remote-disabled
  default-browser-agent: Last remote disabled: 0
  default-browser-agent: Remote service disabled state URL: 'https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f0ff0ff0ff`
  [ERROR defaultagent_static] Using remote settings URL: https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f0ff0ff0ff
  default-browser-agent: Error code: 0x0
  default-browser-agent: Next remote disabled: 1
  IsAgentRemoteDisabled: 1
```

- (Optional) witness the last witnessed value (1) in regedit, like `C:\Users\nalexander\AppData\Local\Firefox Nightly|DefaultAgentLastRemoteDisabled`

- Disable the network, or update the URL to something that will 404.

- Run `debug-remote-disabled` again.  Witness an error code but that we fall back to the last witnessed remote disabled value (here, 1, meaning "yes disabled").
```
  C:\Users\nalexander\AppData\Local\Firefox Nightly>default-browser-agent.exe debug-remote-disabled
  default-browser-agent: Last remote disabled: 0
  default-browser-agent: Remote service disabled state URL: 'https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173fffg'
  [ERROR defaultagent_static] Using remote settings URL: https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173fffg
  [ERROR defaultagent_static] Error::NetworkError
  default-browser-agent: Error code: 0x7d01
  IsAgentRemoteDisabled: 1
```

- If necessary, re-enable the network.

- In Firefox about:config, set
  `default-browser-agent.remote_services_state_url` to the original "not disabled" record:
  `https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff`

- Run `debug-remote-disabled` again.  Witness no error code and the correct "not disabled" value of 0:
```
  C:\Users\nalexander\AppData\Local\Firefox Nightly>default-browser-agent.exe debug-remote-disabled
  default-browser-agent: Last remote disabled: 0
  default-browser-agent: Remote service disabled state URL: 'https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff'
  [ERROR defaultagent_static] Using remote settings URL: https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff
  default-browser-agent: Error code: 0x0
  default-browser-agent: Next remote disabled: 0
  IsAgentRemoteDisabled: 0
```

Those are the scenarios I have thought of and tested against.
I have a happy (debug) [try build](https://treeherder.mozilla.org/#/jobs?repo=try&searchStr=windows%2C2012%2Cdebug%2Cbuild-win32%2Fdebug%2C%28b%29&revision=ecac709532ece5654e4eba160152341df35c28eb).

For testing, I've exposed a debug command that simply runs the code and prints the output.  I don't really know how to verify that the WDBA task is/is not run, since it's essentially silent.  Perhaps we can witness Telemetry being sent?  Whatever was used for the initial WDBA testing should be possible here.  In any case, here's how I've tested this locally:

- Install from [try build](https://firefoxci.taskcluster-artifacts.net/DFlW7aK_SrCY_PrhWJxEyA/0/public/build/install/sea/target.installer.exe).  Elevated privileges should not matter, but I tested without them so please test with them.  **DO NOT RUN THE INSTALLED FIREFOX IMMEDIATELY**

- Open a command prompt.  Again, elevated privileges should not matter.  Navigate to the location of `firefox.exe`, and run the default browser agent debug commands:
```
  C:\Users\nalexander\AppData\Local\Firefox Nightly>default-browser-agent.exe debug-remote-disabled
  default-browser-agent: Last remote disabled: 0
  default-browser-agent: Remote service disabled state URL: 'https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff'
  [ERROR defaultagent_static] Using remote settings URL: https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff
  [ERROR defaultagent_static] Error::NetworkError
  default-browser-agent: Error code: 0x7d01
  IsAgentRemoteDisabled: 0
```
Witness the URL, which should fallback to the production URL: `https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff`.  Right now this will fail since we don't have the records in production, only in staging.  But it's important to test that not having the setting in the registry doesn't crash.

- Run the installed Firefox.  This populates certain registry entries with settings.  In the absence of those settings (the URL to fetch), we should fallback to the production URL, as verified above.

- (Optional) Look in regedit under the key `Computer\HKEY_CURRENT_USER\Software\Mozilla\Firefox\Default Browser Agent` and witness entries with names like
  `C:\Users\nalexander\AppData\Local\Firefox
  Nightly|DefaultAgentRemoteServicesStateURL` with long URL defaulting to
  `https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff`

- In Firefox about:config, set
  `default-browser-agent.remote_services_state_url` to
  `https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff`
  (Here, only the origin changes; the path remains the same.)  This is a staging record that **enables** WDBA.

- Open a command prompt.  Again, elevated privileges should not matter.  Navigate to the location of `firefox.exe`, and run the default browser agent debug commands:
```
  C:\Users\nalexander\AppData\Local\Firefox Nightly>default-browser-agent.exe debug-remote-disabled
  default-browser-agent: Last remote disabled: 0
  default-browser-agent: Remote service disabled state URL: 'https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff'
  [ERROR defaultagent_static] Using remote settings URL: https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff
  default-browser-agent: Error code: 0x0
  default-browser-agent: Next remote disabled: 0
  IsAgentRemoteDisabled: 0
```
Witness the configured URL.  If the network is available, you should see `IsAgentRemoteDisabled: 0`.

- (Optional) witness the last witnessed value (0) in regedit, like `C:\Users\nalexander\AppData\Local\Firefox Nightly|DefaultAgentLastRemoteDisabled`

- Disable the network, or update the URL to something that will 404.

- Run `debug-remote-disabled` again.  Witness an error code but that we fall back to the last witnessed remote disabled value (here, 0, meaning "not disabled").
```
  C:\Users\nalexander\AppData\Local\Firefox Nightly>default-browser-agent.exe debug-remote-disabled
  default-browser-agent: Last remote disabled: 0
  default-browser-agent: Remote service disabled state URL: 'https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173fffg'
  [ERROR defaultagent_static] Using remote settings URL: https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173fffg
  [ERROR defaultagent_static] Error::NetworkError
  default-browser-agent: Error code: 0x7d01
  IsAgentRemoteDisabled: 0
```
- If necessary, re-enable the network.

- In Firefox about:config, then set
  `default-browser-agent.remote_services_state_url` to
  `https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f0ff0ff0ff`
  (Here, the origin is still stage but the path points to a known record that flips the kill switch to disabled.)  **THIS RECORD SHOULD EXIST TOMORROW** -- it is waiting for Rachel Tublitz to "review" it so that it's published.

- Run `debug-remote-disabled` again.  Witness no error code and that we're remotely disabled (with a 1, meaning "yes disabled").
```
  C:\Users\nalexander\AppData\Local\Firefox Nightly>default-browser-agent.exe debug-remote-disabled
  default-browser-agent: Last remote disabled: 0
  default-browser-agent: Remote service disabled state URL: 'https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f0ff0ff0ff`
  [ERROR defaultagent_static] Using remote settings URL: https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f0ff0ff0ff
  default-browser-agent: Error code: 0x0
  default-browser-agent: Next remote disabled: 1
  IsAgentRemoteDisabled: 1
```

- (Optional) witness the last witnessed value (1) in regedit, like `C:\Users\nalexander\AppData\Local\Firefox Nightly|DefaultAgentLastRemoteDisabled`

- Disable the network, or update the URL to something that will 404.

- Run `debug-remote-disabled` again.  Witness an error code but that we fall back to the last witnessed remote disabled value (here, 1, meaning "yes disabled").
```
  C:\Users\nalexander\AppData\Local\Firefox Nightly>default-browser-agent.exe debug-remote-disabled
  default-browser-agent: Last remote disabled: 0
  default-browser-agent: Remote service disabled state URL: 'https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173fffg'
  [ERROR defaultagent_static] Using remote settings URL: https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173fffg
  [ERROR defaultagent_static] Error::NetworkError
  default-browser-agent: Error code: 0x7d01
  IsAgentRemoteDisabled: 1
```

- If necessary, re-enable the network.

- In Firefox about:config, set
  `default-browser-agent.remote_services_state_url` to the original "not disabled" record:
  `https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff`

- Run `debug-remote-disabled` again.  Witness no error code and the correct "not disabled" value of 0:
```
  C:\Users\nalexander\AppData\Local\Firefox Nightly>default-browser-agent.exe debug-remote-disabled
  default-browser-agent: Last remote disabled: 0
  default-browser-agent: Remote service disabled state URL: 'https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff'
  [ERROR defaultagent_static] Using remote settings URL: https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff
  default-browser-agent: Error code: 0x0
  default-browser-agent: Next remote disabled: 0
  IsAgentRemoteDisabled: 0
```

Those are the scenarios I have thought of and tested against.
I have a happy (debug) [try build](https://treeherder.mozilla.org/#/jobs?repo=try&searchStr=windows%2C2012%2Cdebug%2Cbuild-win32%2Fdebug%2C%28b%29&revision=ecac709532ece5654e4eba160152341df35c28eb).

**PLEASE SEE UPDATED TEST PLAN BELOW**

For testing, I've exposed a debug command that simply runs the code and prints the output.  I don't really know how to verify that the WDBA task is/is not run, since it's essentially silent.  Perhaps we can witness Telemetry being sent?  Whatever was used for the initial WDBA testing should be possible here.  In any case, here's how I've tested this locally:

- Install from [try build](https://firefoxci.taskcluster-artifacts.net/DFlW7aK_SrCY_PrhWJxEyA/0/public/build/install/sea/target.installer.exe).  Elevated privileges should not matter, but I tested without them so please test with them.  **DO NOT RUN THE INSTALLED FIREFOX IMMEDIATELY**

- Open a command prompt.  Again, elevated privileges should not matter.  Navigate to the location of `firefox.exe`, and run the default browser agent debug commands:
```
  C:\Users\nalexander\AppData\Local\Firefox Nightly>default-browser-agent.exe debug-remote-disabled
  default-browser-agent: Last remote disabled: 0
  default-browser-agent: Remote service disabled state URL: 'https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff'
  [ERROR defaultagent_static] Using remote settings URL: https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff
  [ERROR defaultagent_static] Error::NetworkError
  default-browser-agent: Error code: 0x7d01
  IsAgentRemoteDisabled: 0
```
Witness the URL, which should fallback to the production URL: `https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff`.  Right now this will fail since we don't have the records in production, only in staging.  But it's important to test that not having the setting in the registry doesn't crash.

- Run the installed Firefox.  This populates certain registry entries with settings.  In the absence of those settings (the URL to fetch), we should fallback to the production URL, as verified above.

- (Optional) Look in regedit under the key `Computer\HKEY_CURRENT_USER\Software\Mozilla\Firefox\Default Browser Agent` and witness entries with names like
  `C:\Users\nalexander\AppData\Local\Firefox
  Nightly|DefaultAgentRemoteServicesStateURL` with long URL defaulting to
  `https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff`

- In Firefox about:config, set
  `default-browser-agent.remote_services_state_url` to
  `https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff`
  (Here, only the origin changes; the path remains the same.)  This is a staging record that **enables** WDBA.

- Open a command prompt.  Again, elevated privileges should not matter.  Navigate to the location of `firefox.exe`, and run the default browser agent debug commands:
```
  C:\Users\nalexander\AppData\Local\Firefox Nightly>default-browser-agent.exe debug-remote-disabled
  default-browser-agent: Last remote disabled: 0
  default-browser-agent: Remote service disabled state URL: 'https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff'
  [ERROR defaultagent_static] Using remote settings URL: https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff
  default-browser-agent: Error code: 0x0
  default-browser-agent: Next remote disabled: 0
  IsAgentRemoteDisabled: 0
```
Witness the configured URL.  If the network is available, you should see `IsAgentRemoteDisabled: 0`.

- (Optional) witness the last witnessed value (0) in regedit, like `C:\Users\nalexander\AppData\Local\Firefox Nightly|DefaultAgentLastRemoteDisabled`

- Disable the network, or update the URL to something that will 404.

- Run `debug-remote-disabled` again.  Witness an error code but that we fall back to the last witnessed remote disabled value (here, 0, meaning "not disabled").
```
  C:\Users\nalexander\AppData\Local\Firefox Nightly>default-browser-agent.exe debug-remote-disabled
  default-browser-agent: Last remote disabled: 0
  default-browser-agent: Remote service disabled state URL: 'https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173fffg'
  [ERROR defaultagent_static] Using remote settings URL: https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173fffg
  [ERROR defaultagent_static] Error::NetworkError
  default-browser-agent: Error code: 0x7d01
  IsAgentRemoteDisabled: 0
```
- If necessary, re-enable the network.

- In Firefox about:config, then set
  `default-browser-agent.remote_services_state_url` to
  `https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f0ff0ff0ff`
  (Here, the origin is still stage but the path points to a known record that flips the kill switch to disabled.)  **THIS RECORD SHOULD EXIST TOMORROW** -- it is waiting for Rachel Tublitz to "review" it so that it's published.

- Run `debug-remote-disabled` again.  Witness no error code and that we're remotely disabled (with a 1, meaning "yes disabled").
```
  C:\Users\nalexander\AppData\Local\Firefox Nightly>default-browser-agent.exe debug-remote-disabled
  default-browser-agent: Last remote disabled: 0
  default-browser-agent: Remote service disabled state URL: 'https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f0ff0ff0ff`
  [ERROR defaultagent_static] Using remote settings URL: https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f0ff0ff0ff
  default-browser-agent: Error code: 0x0
  default-browser-agent: Next remote disabled: 1
  IsAgentRemoteDisabled: 1
```

- (Optional) witness the last witnessed value (1) in regedit, like `C:\Users\nalexander\AppData\Local\Firefox Nightly|DefaultAgentLastRemoteDisabled`

- Disable the network, or update the URL to something that will 404.

- Run `debug-remote-disabled` again.  Witness an error code but that we fall back to the last witnessed remote disabled value (here, 1, meaning "yes disabled").
```
  C:\Users\nalexander\AppData\Local\Firefox Nightly>default-browser-agent.exe debug-remote-disabled
  default-browser-agent: Last remote disabled: 0
  default-browser-agent: Remote service disabled state URL: 'https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173fffg'
  [ERROR defaultagent_static] Using remote settings URL: https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173fffg
  [ERROR defaultagent_static] Error::NetworkError
  default-browser-agent: Error code: 0x7d01
  IsAgentRemoteDisabled: 1
```

- If necessary, re-enable the network.

- In Firefox about:config, set
  `default-browser-agent.remote_services_state_url` to the original "not disabled" record:
  `https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff`

- Run `debug-remote-disabled` again.  Witness no error code and the correct "not disabled" value of 0:
```
  C:\Users\nalexander\AppData\Local\Firefox Nightly>default-browser-agent.exe debug-remote-disabled
  default-browser-agent: Last remote disabled: 0
  default-browser-agent: Remote service disabled state URL: 'https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff'
  [ERROR defaultagent_static] Using remote settings URL: https://settings.stage.mozaws.net/v1/buckets/main/collections/windows-default-browser-agent/records/ffffffff-0c5f-49a0-bb48-11f17173ffff
  default-browser-agent: Error code: 0x0
  default-browser-agent: Next remote disabled: 0
  IsAgentRemoteDisabled: 0
```

Those are the scenarios I have thought of and tested against.

Back to Bug 1636539 Comment 8