Skip to content

Copying type archive from one remote project to another causes duplicate file id #8291

Description

@CouleeApps

Version and Platform (required):

  • Binary Ninja Version: 5.4 dev
  • Edition: Ultimate

Bug Description:
When using remote projects, downloading a type archive from one project and uploading it to another project causes an error to be printed:

[Default] Failed to upload cat.bnta: Remote Exception: Bad create file response code (400): {"id":["project file with this id already exists."]} (Details...)
[Default] File 948cb858-bfdc-4540-b891-8a3cf7eaa919 upload failed

Steps To Reproduce:

  1. Make two remote projects, A and B
  2. In A, add a binary. Open it
  3. In the binary, in the types view, create a type archive and add it to the project
  4. In the project browser for A, Export the type archive
  5. Open the project browser for B, and import the type archive
  6. Observe error

Expected Behavior:
I expected importing the type archive to not throw an error

Additional Information:
What is happening here is: the type archive contains its own id, and remote projects support uses that id when trying to add it to project B. But since the server already contains the first copy of the type archive in project A and it has the same id, there's a conflict on the file ids and it fails.

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions