Hi! It happened on a couple versions of Misskey, I upgraded to 12.87.0 when it came out hoping that might resolve it, but it did not.
PostgreSQL11.12 (Debian 11.12-0+deb10u1)
My friend created their account a day or 2 after the one I'm trying to delete, so it's odd that theirs was able to be deleted and mine cannot.
Edit: I tried again with debug enabled, and this is the output:
message: 'Internal error occurred. Please contact us if the error persists.',
message: 'null value in column "userId" violates not-null constraint',
stack: 'QueryFailedError: null value in column "userId" violates not-null constraint\n at new QueryFailedError (/home/misskey/misskey/node_modules/typeorm/error/QueryFailedError.js:12:28)\n at PostgresQueryRunner.<anonymous> (/home/misskey/misskey/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:248:31)\n at step (/home/misskey/misskey/node_modules/typeorm/node_modules/tslib/tslib.js:143:27)\n at Object.throw (/home/misskey/misskey/node_modules/typeorm/node_modules/tslib/tslib.js:124:57)\n at rejected (/home/misskey/misskey/node_modules/typeorm/node_modules/tslib/tslib.js:115:69)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)',