Bug: Database error when uploading OpenGraph json
Description:
Ingesting data pulled from 1PassHound, receiving a database error after the last ingest azure data measurement_id log line.
Are you intending to fix this bug?
"no"
Component(s) Affected:
- PostgreSQL
- Data Collector (SharpHound, AzureHound)
Steps to Reproduce:
-
Go to administration/file-ingest
-
Click on Upload File(s)
-
Upload local .json file from 1PassHound output
-
gui will show status Complete
-
See ERROR in bloodhound log.
-
Expected Behavior:
Status shows Complete and data is able to be queried in Bloodhound.
Actual Behavior:
No data is uploaded.
Screenshots/Code Snippets/Sample Files:
{"time":"2025-09-04T04:29:55.024267762Z","level":"ERROR","message":"Database error","query":"INSERT INTO completed_tasks (ingest_job_id, file_name, parent_file_name, errors, created_at, updated_at) VALUES (0, 'UnknownFileName.json', '', '{}', NOW(), NOW()) RETURNING id;","err":"ERROR: insert or update on table \"completed_tasks\" violates foreign key constraint \"completed_tasks_ingest_job_id_fkey\" (SQLSTATE 23503)"}
{"time":"2025-09-04T04:29:55.024311267Z","level":"ERROR","message":"Failed to create completed task for ingest task 1: ERROR: insert or update on table \"completed_tasks\" violates foreign key constraint \"completed_tasks_ingest_job_id_fkey\" (SQLSTATE 23503)"}
Environment Information:
BloodHound: v8.1.1
Collector: https://github.com/SpecterOps/1PassHound
OS: Linux
Browser (if UI related): N/A
Node.js (if UI related: N/A
Go (if API related): N/A
Database (if persistence related): docker.io/library/neo4j:4.4
Docker (if using Docker): N/A
Additional Information:
Any additional context or information that might be helpful in understanding and diagnosing the issue.
Potential Solution (optional):
If you have any ideas about what might be causing the issue or how it could be fixed, you can share them here.
Related Issues:
If you've found related issues in the project's issue tracker, mention them here.
Contributor Checklist:
- [x] I have searched the issue tracker to ensure this bug hasn't been reported before or is not already being addressed.
- [x] I have provided clear steps to reproduce the issue.
- [x] I have included relevant environment information details.
- [x] I have attached necessary supporting documents.
- [x] I have checked that any JSON files I am attempting to upload to BloodHound are valid.
Hey, thanks for the bug report! I've been able to reproduce it and am working on a fix 😄
@parkerderek I was able to reproduce the issue regarding completed_tasks, however I haven't been able to replicate the data failing to upload. I tested with a 1PassHound payload and despite the error, it still populated the data.
Is it possible that the payload had an issue?
It appears that 1PassHound also had an update 3 weeks ago that resolved an issue with how the payload was being created. If you're interested in digging into this further, could you try updating 1PassHound and try collecting again?
Going to close this as #1871 resolved the issue I was able to reproduce. Please feel free to open a new issue or reply here if needed 😄