Vector35 / Vector35/binaryninja-api

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

Open
#8,291 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Component: Collaboration
Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the two-remote-project workflow from the issue, starting with the project browser's type-archive export and import entry points. Trace how the archive's existing id is handled during remote upload; done means importing the archive into project B succeeds without the duplicate file-id error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
reverse-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.