Skip to content

Misc. bug: WebUI (server) crash after streeaming response #15461

@stduhpf

Description

@stduhpf

Name and Version

version: 6219 (1bc664a)
built with MSVC 19.44.35209.0 for x64

Operating systems

No response

Which llama.cpp modules do you know to be affected?

llama-server

Command line

cd tools/server/webui
npm i
npm run dev

Problem description & steps to reproduce

Start server, go to webui with any browser (tried chrome and firefox), type any prompt and send it.

The response streams as expected, but once it's done generating, it dissapears with a popup saying:

can't access property "delta", ie.choices[0] is undefined (firefox), or cannot read the properties of undefined (reading 'delta') (chrome)

First Bad Commit

Didn't bother doing a bisect

Relevant log output

in devtools:


(index):250 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'delta')
    at j ((index):250:3415)
    at async at ((index):250:4503)
    at async L ((index):604:11275)


That's not very helpful, so I started the webui in dev mode, and I got this:

app.context.tsx:258 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'delta')
    at generateMessage (app.context.tsx:258:47)
    at async replaceMessageAndGenerate (app.context.tsx:381:5)
    at async handleRegenerateMessage (ChatScreen.tsx:180:5)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions