Unable to change label colour possibly due to "The specified value "e8e8e8" does not conform to the required format" #102

Closed
opened 2025-11-01 20:47:01 -05:00 by GiteaMirror · 15 comments
Owner

Originally created by @timdonovanuk on GitHub (Nov 2, 2022).

Description

When trying to set a label colour, the circle does not reflect the colour picked. The following is often printed in the Chrome JS console (when creating a new label, or editing an existing one):

The specified value "e8e8e8" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

This then causes a POST http://192.168.1.81/api/v1/labels/5 400 (Bad Request) error.

I guess a '#' is missing.

In this screenshot I have clicked purple but nothing changes

Vikunja Frontend Version

0.20.0

Vikunja API Version

0.20.0

Browser and version

Chrome

Can you reproduce the bug on the Vikunja demo site?

Yes

Screenshots

image

Originally created by @timdonovanuk on GitHub (Nov 2, 2022). ### Description When trying to set a label colour, the circle does not reflect the colour picked. The following is often printed in the Chrome JS console (when creating a new label, or editing an existing one): `The specified value "e8e8e8" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.` This then causes a POST http://192.168.1.81/api/v1/labels/5 400 (Bad Request) error. I guess a '#' is missing. In this screenshot I have clicked purple but nothing changes ### Vikunja Frontend Version 0.20.0 ### Vikunja API Version 0.20.0 ### Browser and version Chrome ### Can you reproduce the bug on the Vikunja demo site? Yes ### Screenshots ![image](https://user-images.githubusercontent.com/8156439/199454605-4e17cc50-3a3f-43ac-8f83-5cf2189667b0.png)
GiteaMirror added the bug label 2025-11-01 20:47:01 -05:00
Author
Owner

@timdonovanuk commented on GitHub (Nov 2, 2022):

This is reproducible on the demo site. I cannot set the colour (nothing happens if I click purple) and the label api returns a 400.

image

@timdonovanuk commented on GitHub (Nov 2, 2022): This is reproducible on the demo site. I cannot set the colour (nothing happens if I click purple) and the label api returns a 400. ![image](https://user-images.githubusercontent.com/8156439/199455654-e1a076fb-9ab2-4f42-ab96-e270fe6f9deb.png)
Author
Owner

@kolaente commented on GitHub (Nov 2, 2022):

I can't reproduce this with Chromium 106.0.5249.119. What version and OS are you using?

@kolaente commented on GitHub (Nov 2, 2022): I can't reproduce this with Chromium 106.0.5249.119. What version and OS are you using?
Author
Owner

@timdonovanuk commented on GitHub (Nov 2, 2022):

Windows 10 and the latest Chrome (Version 107.0.5304.88 (Official Build) (64-bit))

labels

FWIW it does the same in a second browser (Edge)

@timdonovanuk commented on GitHub (Nov 2, 2022): Windows 10 and the latest Chrome (Version 107.0.5304.88 (Official Build) (64-bit)) ![labels](https://user-images.githubusercontent.com/8156439/199459198-a271eee4-704c-4b50-88c9-2d22723dd2ec.gif) FWIW it does the same in a second browser (Edge)
Author
Owner

@timdonovanuk commented on GitHub (Nov 2, 2022):

Chrome just popped out this error while I did some digging, maybe it helps locate the issue:

AxiosError$2 {message: 'Request failed with status code 400', name: 'AxiosError', code: 'ERR_BAD_REQUEST'

data: "{\"max_right\":null,\"id\":0,\"title\":\"RW\",\"hex_color\":\"rgba(0, 0, 0, 0)\",\"description\":\"\",\"created_by\":{\"max_right\":null,\"id\":0,\"email\":\

"{\"code\":2002,\"message\":\"Invalid Data\",\"invalid_fields\":[\"hex_color: rgba(0, 0, 0, 0) does not validate as runelength(0|6)\"]}\n"
@timdonovanuk commented on GitHub (Nov 2, 2022): Chrome just popped out this error while I did some digging, maybe it helps locate the issue: ``` AxiosError$2 {message: 'Request failed with status code 400', name: 'AxiosError', code: 'ERR_BAD_REQUEST' data: "{\"max_right\":null,\"id\":0,\"title\":\"RW\",\"hex_color\":\"rgba(0, 0, 0, 0)\",\"description\":\"\",\"created_by\":{\"max_right\":null,\"id\":0,\"email\":\ "{\"code\":2002,\"message\":\"Invalid Data\",\"invalid_fields\":[\"hex_color: rgba(0, 0, 0, 0) does not validate as runelength(0|6)\"]}\n" ```
Author
Owner

@timdonovanuk commented on GitHub (Nov 2, 2022):

Sorry for the spam - perhaps the colour never gets set properly in the first place. Recorded in edge this time (I never use Edge and have zero plugins installed):
labels2

@timdonovanuk commented on GitHub (Nov 2, 2022): Sorry for the spam - perhaps the colour never gets set properly in the first place. Recorded in edge this time (I never use Edge and have zero plugins installed): ![labels2](https://user-images.githubusercontent.com/8156439/199462974-68a9900d-50e6-4f50-9af7-97509704d489.gif)
Author
Owner

@timdonovanuk commented on GitHub (Nov 2, 2022):

I think this must be an issue introduced in the latest versions of Chrome / Edge. I have an old completely separate Vikunja instance running 0.19 where label colours used to work and now they do not.

It works fine on a Chrome Android.

@timdonovanuk commented on GitHub (Nov 2, 2022): I think this must be an issue introduced in the latest versions of Chrome / Edge. I have an old completely separate Vikunja instance running 0.19 where label colours used to work and now they do not. It works fine on a Chrome Android.
Author
Owner

@timdonovanuk commented on GitHub (Nov 2, 2022):

Last post for now, I promise.

Just installed Firefox (106.0.3 (64-bit)) and it works fine. The colour picker is completely different on Firefox though:

image

So I guess it's something incompatible with the colour picker in the latest Chrome / Edge.

@timdonovanuk commented on GitHub (Nov 2, 2022): Last post for now, I promise. Just installed Firefox (106.0.3 (64-bit)) and it works fine. The colour picker is completely different on Firefox though: ![image](https://user-images.githubusercontent.com/8156439/199486805-f3dab1eb-1cd0-4438-9299-fb37298fa26d.png) So I guess it's something incompatible with the colour picker in the latest Chrome / Edge.
Author
Owner

@kolaente commented on GitHub (Nov 2, 2022):

I was able to reproduce this in browserstack with Chrome 107 on windows 11.

@dpschen Do you think it's worth fixing this before recreating the color picker?

@kolaente commented on GitHub (Nov 2, 2022): I was able to reproduce this in browserstack with Chrome 107 on windows 11. @dpschen Do you think it's worth fixing this before recreating the color picker?
Author
Owner

@dpschen commented on GitHub (Nov 2, 2022):

Unsure. Maybe it's best to increase priority.

Interesting is that the color format seems to be rgba(0, 0, 0, 0) which is valid CSS (although deprecated). We assumed that the native color picker would return a hex code. Judging from this message, without testing or looking at the code it seems like in Chrome it uses another valid CSS Color Syntax.

@dpschen commented on GitHub (Nov 2, 2022): Unsure. Maybe it's best to increase priority. Interesting is that the color format seems to be `rgba(0, 0, 0, 0)` which is valid CSS (although deprecated). We assumed that the native color picker would return a hex code. Judging from this message, without testing or looking at the code it seems like in Chrome it uses another valid CSS Color Syntax.
Author
Owner

@timdonovanuk commented on GitHub (Nov 3, 2022):

I can actually change label successfully colours (in Chrome) if I use the colour picker. It definitely has issues (red != green and NaN) but it works kinda, enough to change labels.

image

image

@timdonovanuk commented on GitHub (Nov 3, 2022): I can actually change label successfully colours (in Chrome) if I use the colour picker. It definitely has issues (red != green and NaN) but it works kinda, enough to change labels. ![image](https://user-images.githubusercontent.com/8156439/199703308-fe8fb053-3327-4081-819e-46a2554a2225.png) ![image](https://user-images.githubusercontent.com/8156439/199703465-4376420d-0a46-4278-9c18-f360f8c743f2.png)
Author
Owner

@kolaente commented on GitHub (Nov 9, 2022):

I've posted this on Stack Overflow with a minimal example: https://stackoverflow.com/q/74377807/10924593

@kolaente commented on GitHub (Nov 9, 2022): I've posted this on Stack Overflow with a minimal example: https://stackoverflow.com/q/74377807/10924593
Author
Owner

@dpschen commented on GitHub (Nov 9, 2022):

This seems like a Chromium bug.

@dpschen commented on GitHub (Nov 9, 2022): This seems like a Chromium bug.
Author
Owner

@dpschen commented on GitHub (Nov 9, 2022):

Just checked: yes it is a Chromium bug:
https://bugs.chromium.org/p/chromium/issues/detail?id=1380977

@dpschen commented on GitHub (Nov 9, 2022): Just checked: yes it is a Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1380977
Author
Owner

@dpschen commented on GitHub (Nov 9, 2022):

@timdonovanuk Like mentioned in the bug tracker of Chrome this means that you can try this out with Chrome Canary 109 and it should work.

@dpschen commented on GitHub (Nov 9, 2022): @timdonovanuk Like mentioned in the bug tracker of Chrome this means that you can try this out with Chrome Canary 109 and it should work.
Author
Owner

@kolaente commented on GitHub (Nov 9, 2022):

Just checked in Chrome Canary 109 and it seems to work there. I'll close this as resolved then, please ping if you have other issues.

@kolaente commented on GitHub (Nov 9, 2022): Just checked in Chrome Canary 109 and it seems to work there. I'll close this as resolved then, please ping if you have other issues.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#102