Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict theme key in local storage when Argo CD runs subpath mode. #547

Open
atuk721 opened this issue Apr 18, 2024 · 0 comments
Open

Conflict theme key in local storage when Argo CD runs subpath mode. #547

atuk721 opened this issue Apr 18, 2024 · 0 comments

Comments

@atuk721
Copy link

atuk721 commented Apr 18, 2024

When Argo CD runs subpath mode and share origin with multiple applications and uses same local storage key, it became not to work.

As my experience, external application uses theme key in local storage and save "DARK" or "LIGHT" to it.
After that, when I access to Argo CD, it outputs a following error in a browser.

VM172:1 Uncaught SyntaxError: Unexpected token 'D', "DARK" is not valid JSON
    at JSON.parse (<anonymous>)
    at 10180 (main.9ecae91d8fd1deedf944.js:2:1501193)
    at i (main.9ecae91d8fd1deedf944.js:2:2463187)
    at 58535 (main.9ecae91d8fd1deedf944.js:2:2104618)
    at i (main.9ecae91d8fd1deedf944.js:2:2463187)
    at main.9ecae91d8fd1deedf944.js:2:2468811
    at main.9ecae91d8fd1deedf944.js:2:2468821
10180 @ main.9ecae91d8fd1deedf944.js:2
i @ main.9ecae91d8fd1deedf944.js:2
58535 @ main.9ecae91d8fd1deedf944.js:2
i @ main.9ecae91d8fd1deedf944.js:2
(anonymous) @ main.9ecae91d8fd1deedf944.js:2
(anonymous) @ main.9ecae91d8fd1deedf944.js:2

I think it occurs below because theme item is not JSON.

https://github.com/argoproj/argo-ui/blob/master/v2/shared/context/theme.tsx#L10

So I think this should change key name more specific like "argo-ui-theme" because Argo CD can run by subpath mode.
Or should add error handlings to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant