Skip to content

notes.userid (citext) vs aspnetusers.id (uuid) type mismatch causes "operator is not unique" error, breaks mobile log in #440

Description

@ImReallyConfused

Once a department has 3+ notes, users (including admin accounts) can no longer log into the native mobile app. Logging in via a mobile browser to the same account works fine. Deleting notes restores app login

Environment
Self-hosted via docker-compose.yml (db, api, worker, web, events, redis, rabbitmq, etc.) on openSUSE
Postgres 16.14 (Debian 16.14-1.pgdg13+1)
Reproduced on master as of commit 9f93f65 (2026-07-25)

Error

worker-1  | Exception data:
worker-1  |   Severity: ERROR
worker-1  |   SqlState: 42725
worker-1  |   MessageText: operator is not unique: uuid = citext
worker-1  |   Hint: Could not choose a best candidate operator. You might need to add explicit type casts.
worker-1  |   Position: 71
worker-1  |   File: parse_oper.c
worker-1  |   Line: 639
worker-1  |   Routine: op_error
worker-1  | Npgsql.PostgresException (0x80004005): 42725: operator is not unique: uuid = citext

Steps to reproduce

  1. Log into the Resgrid website.
  2. Add one or more notes for a department.
  3. Attempt to log into the mobile app with the same user account.
  4. Login fails with the above Postgres exception in the worker logs.
  5. Delete the note(s) via the web app → mobile login succeeds again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions