Profile image: "Couldn't read the image: bad image" #317
Labels
No labels
area/ci
area/desktop
area/packaging
area/protocol
area/reading
area/ui
area/web
area/writing
kind/bug
kind/feature
kind/infra
kind/request
needs/user
parked
perf
security
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
littlefox/neokom#317
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reported by the user: uploading a profile image (a 200×200 orange and white chevron on black) fails with "Couldn't read the image: bad image".
"bad image" comes from
app/src/image_pick.rs: the webview's<img>firedonerroron the picked file, before NeoKOM looked at it.Checked: WebKitGTK 2.4x (the desktop CI image), on a page from a custom scheme like the app's, loads a picked PNG through a
blob:URL, adata:URL andcreateImageBitmap. So it is something about this file (its format or type), not how the picker loads files.Needs the file (
needs/user). Whatever the cause, the message should say what kind of file it was and that NeoKOM can't read that kind, not "bad image".Fixed in #326; main green (run #593).
The file was fine: fox.png is a plain 200x200 RGBA PNG. Dioxus desktop opens its own file dialog and gives the page's input an empty stand-in (
new File([], path)), which the picker read, so every picture picked on the desktop failed. The bytes now come from the change event (FileData::read_bytes); pasted and dropped images are read in the page.Checked:
Not automated: the desktop's xdg-portal dialog isn't in the headless CI image. The user is testing the app.