Skip to content

GUI check for own/already-existing device ID could be better #7291

Closed

Description

@bugith

Does your log mention database corruption?

Not yet ;-)
Also, the new device won't show in devices list

Activity

  1. added
    bug
    needs-triage
    on Jan 17, 2021
  2. bugith commented on Jan 17, 2021

    @bugith
    Author

    Ooops : I added my own ID !!!!
    It seems the check to see if device already exists doesn't check our own ID....

  3. tomasz1986 commented on Jan 20, 2021

    @tomasz1986
    Member

    If I understand correctly, you mean that you have added your own ID as a remote device. Is this correct? Can you describe exactly how you did it?

    The GUI does not allow doing so normally. This is what one gets when trying to add their own ID.

    image

  4. bugith commented on Jan 24, 2021

    @bugith
    Author

    I can reproduce. While trying I noticed that typing the ID lower-case and no dashes, or at least e.g. the last character, the pre-existence test doesn't work, and validating doesn't change our "Device Name" anymore.
    But I also noticed that the test is not reliable : e.g. swapping 2 letters in the end past the 52 first won't show the warning. I also noticed some months ago that weird thing happen between 52 and 56th chars. At least the dashes should be stripped out and entries should be case-insensitive while checking if not yet. In my memory I said to myself there was a difficulty here because valid ID may be either 52 or 56 chars in length. Please confirm.

    Cornercase ;-) reproduce : Add new device-> enter our ID so that warning won't trigger before validating (eg, replace latest letter to lower-case -> Enter a "Device Name" that ALREADY exists in your list (I only did this with exact same case) -> Validate -> Our "Device Name" is changed accordingly.
    Strangely, doing a second shoot (to revert back or even try with another existing Device Name) won't "work" until I changed back my Device Name from Action/Settings

  5. changed the title [-]v0.13.0-rc1 Addind a device changes our name[/-] [+]GUI check for own/already-existing device ID could be better[/+] on Jan 25, 2021
  6. calmh commented on Jan 25, 2021

    @calmh
    Member

    Sounds like the already-exists-check doesn't take all possible variations of the device ID into account. It should resolve it to canonical form before checking.

  7. removed
    needs-triage
    on Jan 25, 2021
  8. bugith commented on Jan 25, 2021

    @bugith
    Author

    Sounds like the already-exists-check doesn't take all possible variations of the device ID into account. It should resolve it to canonical form before checking.

    Yes Jakob. Furthermore, ST quits on restart: I got rid of that by cleaning the dup in config.xml

    [start] 10:21:58 INFO: syncthing v1.13.0-rc.1 "Fermium Flea" (go1.15.6 windows-amd64) [email protected] 2021-01-11 14:15:21 UTC
    [start] 10:21:58 INFO: Automatic upgrade is always enabled for candidate releases.
    [334ZK] 10:21:58 INFO: My ID: 334YZDC-BBBBBBB-CCCCCCC-DDDDDDD-EEEEEEE-FFFFFFF-3K3FFAU
    [334ZK] 10:21:59 INFO: Single thread SHA256 performance is 466 MB/s using minio/sha256-simd (402 MB/s using crypto/sha256).
    [334YZ] 10:21:59 WARNING: Short device IDs are in conflict. Unlucky!
      Regenerate the device ID of one of the following:
       334YZDC-BBBBBBB-CCCCCCC-DDDDDDD-EEEEEEE-FFFFFFF-3K3FFQE in conflict with 334YZDC-BBBBBBB-CCCCCCC-DDDDDDD-EEEEEEE-FFFFFFF-3K3FFAU
    [334ZK] 10:22:00 INFO: Exiting
    

    Notice how the 2 strings differ on the last 2 chars

  9. calmh commented on Jan 25, 2021

    @calmh
    Member

    That's not a dup though, that's just that you added a device ID you made up that's almost identical to another device ID, and Syncthing can't handle if they don't differ somewhere in the first 64 bits.

  10. added a commit that references this issue on Mar 29, 2025
    3856f6a
  11. added a commit that references this issue on Mar 29, 2025
    0d6117d
  12. added this to the v1.29.5 milestone on Mar 31, 2025
  13. added a commit that references this issue on Apr 1, 2025
    2953630
  14. modified the milestones: v1.29.5, v1.29.6 on Apr 12, 2025
  15. added a commit that references this issue on May 1, 2025
    4fe3f95
  16. added
    frozen-due-to-age
    on Jul 1, 2026
  17. locked and limited conversation to collaborators on Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfrozen-due-to-age

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions