Skip to content

NUI → server HTTP upload hangs ~60 s on FiveM for GTAV Enhanced before falling back #297

Description

@WilliM233

Affected area

Media uploads (voice notes, recordings, photos) on FiveM for GTAV Enhanced

Framework

QBCore/QBox

What's broken

Environment

sd-phone 1.0.5, QBox, FiveM for GTAV Enhanced (server and client current as of 2026-09-27).

What happens

Voice notes and recordings sit on "sending" for about 60 seconds and then go through. The NUI's POST
to http://<endpoint>/sd-phone/... (the slot client/uploadurl.lua completes) never reaches the
server: no error in the NUI, nothing in the server log, the request just stays open. When
SLOT_TTL = 60 (server/media/httpUpload.lua) expires, the phone falls back to the event route,
which works.

It looks like the same Enhanced limitation that breaks screencapture's http protocol: the NUI can't
reach its own server's HTTP handler. It's probably not a bug in sd-phone, but the phone waits out the
full TTL before it gives up.

Workaround we run

client/uploadurl.lua answers { success = false, code = 'unavailable' } up front, so the event
route runs straight away with the same server-side budget and checks. Voice notes send at once, and
5 back to back all went through.

Suggestion

Detect Enhanced (or a failed first HTTP attempt) and skip the HTTP route, or use a much shorter
client-side timeout before falling back. Side effect today: each send still mints an HTTP slot the
client never uses (MAX_SLOTS_PER_PLAYER = 3, 60 s TTL).

Unrelated nit

server/main.lua:128 says the roadphone kill switch is sd_phone_roadcompat, but the shim reads
sd_phone_roadphonecompat (server/compat/roadphone/init.lua:6, client/compat/roadphone.lua:20).

Steps to reproduce

  1. Enhanced client, direct upload on.
  2. Record a voice note in Messages and send it.
  3. It stays on "sending" for ~60 s, then sends.

Console errors / logs

Screenshots or clips

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions