Closed Bug 1349574 Opened 8 years ago Closed 8 years ago

Filter for desktop synced devices do not match the number of devices

Categories

(Shield :: General, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: aflorinescu, Unassigned)

References

(Blocks 1 open bug)

Details

[Preconditions:] 1. Obtain a copy of Firefox with the SHIELD recipe client system add-on installed. You can check about:support to ensure that you have it. 2. Set the extensions.shield-recipe-client.dev_mode preference to true to run recipes immediately on startup. 3. Set the extensions.shield-recipe-client.logging.level preference to 0 to enable more logging. 4. Set the security.content.signature.root_hash preference to DB:74:CE:58:E4:F9:D0:9E:E0:42:36:BE:6C:C5:C4:F6:6A:E7:74:7D:C0:21:42:7A:03:BC:2F:57:0C:8B:9B:90. 5. Set the preference value for extensions.shield-recipe-client.api_url set to https://normandy.stage.mozaws.net/api/v1 [Steps:] 1. Open Admin Interface. 2. Create a default heartbeat type recipe. 3. Set a filter with normandy.syncDesktopDevices = 2. 4. Open a FF with a profile containing the preconditions. 5. Create a sync account. 6. Sync 2 desktop devices. 7. Restart FF browser [Actual Result:} The recipe is fetched, but not executed. [Expected Result:] The heartbeat is executed, as the condition should return true. [Note1:] As far as I know there is a logic related to sync devices that makes them inactive if the devices haven't synced from more than 30days?! We should know if all devices are counted (inactive + active) or just the active ones. [Note2:] Using normandy.syncSetup or normandy.syncMobileDevices filters will validate the filters and the recipe will run successfully.
(typo) for step 3, the filter is: normandy.syncDesktopDevices == 2
(In reply to Adrian Florinescu [:AdrianSV] from comment #0) > [Note1:] > As far as I know there is a logic related to sync devices that makes them > inactive if the devices haven't synced from more than 30days?! We should > know if all devices are counted (inactive + active) or just the active ones. I asked on IRC, and apparently there is logic such that if a device has not synced for 3 weeks, other Firefox profiles on the same sync account will treat it as if it doesn't exist, including the device count we're using. So, for example, my test sync account has 3 profiles associated with it, one of which hasn't been run for over 3 weeks. When I run the two other profiles, they report that there are only 2 desktop sync devices. With that in mind, I tested locally and the syncDesktopDevices property correctly filters based on the number of active sync devices associated with my account. One thing that _might_ be causing this is that the preference we use to determine sync device count isn't updated immediately on startup, so the first restart after adding a new devices might not detect the new device if you have dev_mode enabled, since the filters will be checked immediately. Can you replicate the issue after waiting a minute or two and then restarting? Also, what is the value of the services.sync.clients.devices.desktop preference when you see the filter fail? Specifically, my replication steps were: 1. Create a console-log recipe with the filter: normandy.syncDesktopDevices == 2 2. Create a new profile and sign up for a new sync account with that new profile. 3. Create another new profile, and sign in to the sync account created in step 2. 4. On one of those two new profiles, install the latest SHIELD XPI and point it towards the server you're testing on. 5. Restart Firefox, wait 15 seconds or so, and check that the services.sync.clients.devices.desktop preference has been updated to 2. 6. Restart Firefox and check that the console-log recipe was execute successfully.
Flags: needinfo?(adrian.florinescu)
(In reply to Michael Kelly [:mkelly,:Osmose] from comment #2) One thing that _might_ be causing this is that the preference we > use to determine sync device count isn't updated immediately on startup, so > the first restart after adding a new devices might not detect the new device > if you have dev_mode enabled, since the filters will be checked immediately. > Can you replicate the issue after waiting a minute or two and then > restarting? Also, what is the value of the > services.sync.clients.devices.desktop preference when you see the filter > fail? Our STR are the same, but I've just noticed that sync might take a while to complete and update value for services.sync.clients.devices.desktop. Seems that indeed the case here was that runing FF with devmode on didn't give enough time for the preference to update accordingly. WFM re-running the STR with devmode off.
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(adrian.florinescu)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.