Repository navigation
fix: hash the machine id from an address unique to the machine - #32
Merged
Merged
Conversation
The machine id hashed the first network interface that was up. That is the loopback adapter on iOS, Android, macOS and Linux, and on Windows often a VPN or VM adapter whose address is the same on every machine, so all of those machines reported one id. The GUID fallback never ran, because an empty address converts to "" rather than null. Only accept a six-byte, manufacturer-assigned address that is not one of the fixed VMware, VirtualBox, Cisco AnyConnect, FortiClient or GlobalProtect adapter addresses; otherwise hash a random GUID and store it. Replace a stored id that was hashed from one of those shared addresses, so machines that have already run get an id of their own. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Jen-Uno
marked this pull request as ready for review
October 8, 2026 16:58
rajamatt
self-requested a review
October 8, 2026 18:19
rajamatt
approved these changes
Oct 8, 2026
Intel Macs with a T2 chip expose an internal bridge adapter whose address, ac:de:48:00:11:22, is the same on every one of them and is not marked as locally administered. When Wi-Fi uses a private address it was the one picked, so those Macs would again share one id. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Jen-Uno
enabled auto-merge
October 8, 2026 19:20
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
|
Congrats on your first pull-request! We ❤ the people who are involved in this project, and we’d love to pay it forward by sending you some swag. If you have any feedback (or ideas how to improve Uno as a open-source project) please open a feedback issue. |
This was referenced Oct 21, 2026
opensource-fork-sync Bot
pushed a commit
to cla7aye15I4nd/opensource-unoplatform__uno
that referenced
this pull request
Oct 23, 2026
Picks up the machine id fix (unoplatform/uno.devtools.telemetry#32), which stops hashing the loopback or a shared VPN/VM adapter address into one id shared by unrelated machines, and replaces a cached shared id on the next start. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

GitHub Issue (If applicable): n/a (issues are disabled on this repository)
PR Type
What kind of change does this PR introduce?
What is the current behavior?
GetMachineId()hashes the address of the first network interface that is up:000000000000.Every machine in one of those groups therefore reports the same Machine ID. The Machine ID is also the Application Insights
user_Id(Telemetry.cs), so user counts and anything keyed onuser_Idmerge those machines into a single user.Two details make it worse:
null, and an emptyPhysicalAddressconverts to"", so""is hashed instead (e3b0c44298fc1c149afbf4c8996fb924, the truncated SHA-256 of an empty string)..machinehashand reused on every start, so fixing the derivation alone would not change any machine that has already run.What is the new behavior?
Address selection (
MachineIdSource.GetUniqueAddress). The first interface that is up is still used, but only if its address identifies one machine. That means it must be:Loopback interfaces are skipped. An interface that throws no longer hides the ones after it.
Fallback. With no such address, a random GUID is hashed and stored in
.machinehash, just like an address-based id. This is always the case on iOS and Android, and on Macs whose Wi-Fi uses a private address. Before, a failure to enumerate interfaces produced an id that was never stored, so it changed on every run.Stored ids (
MachineIdSource.IsSharedMachineId). A stored id equal to the hash of one of those shared addresses is discarded and replaced, so machines that have already run get an id of their own on their next start.What stays the same:
docs/usage.mdnow describes how the desktop Machine ID is derived.PR Checklist
docs/usage.md)MachineIdSourceTests, 38 cases. All 117 unit tests pass.Other information
Effect on consumers
.machinehashis shared by every product on a machine. Once any product with this change has run there, products still on older versions read the corrected id too.Known limitation. On a machine that needs a random id, several products with this change starting at the same instant can each generate one. The last write wins, so for that one session they may report different ids.
Tests.
MachineIdSourceTestscovers:TelemetryCommonProperties.Against the previous implementation, two of the stored-id tests fail and the enumeration-failure test stops the test host (through
Debug.Fail).Internal Issue (If applicable): tracked internally.
🤖 Generated with Claude Code