Skip to content

Cannot change language in served web app #799

Closed

Description

@phramusca

Hi,
I am trying this very promising solution to manage recipes.
I have managed to install it on my pi. By the way, link from the doc does not work:

curl -L https://github.com/cooklang/cookcli/releases/latest/download/cook-aarch64-unknown-linux-musl.tar.gz
Not Found%  

So I used curl -L https://github.com/cooklang/cookcli/releases/latest/download/cook-0.39.0-linux-aarch64-musl.tar.gz | tar xz instead.

After a cook seed ~/recipes, I started it with cook server ~/recipes --host --cors-origin http://kitchen.local:9080 and the app showed up.

All seems to work fine so far, except that I am unable to change the language. Whatever language I click on, the page refreshes but it is always in english.

Activity

  1. LeMyst commented on Oct 28, 2026

    @LeMyst
    Collaborator

    Thanks for the report, and glad the Pi setup otherwise works!

    Download link. 0.39.0 renamed the release archives to cook-<version>-<os>-<arch>[-<libc>] (#650), and the Raspberry Pi guide on cooklang.org still uses the old names. Your command is the right one. Because the name now carries the version, a command that always fetches the latest release has to look the version up first:

    V=$(curl -sI https://github.com/cooklang/cookcli/releases/latest | sed -n 's|^location: .*/tag/v||Ip' | tr -d '\r')
    curl -L "https://github.com/cooklang/cookcli/releases/download/v$V/cook-$V-linux-aarch64-musl.tar.gz" | tar xz

    Once installed, cook update keeps it current.

    Language. I couldn't reproduce this in a fresh browser with the 0.39.0 release and your exact flags: clicking a language switches the page. I could reproduce it as soon as the browser already holds a cookie called lang for kitchen.local set by something else. Cookies are not separated by port, so any other app on that Pi (on port 80, 8080, …) that stores its own lang cookie can shadow CookCLI's. If that cookie is HttpOnly or Secure, or set for a wider domain or a longer path, the picker's cookie is either refused or sent second, and the page stays in English.

    Could you check? In the browser's dev tools, open Application (Chrome) or Storage (Firefox) → Cookies → http://kitchen.local:9080 and look at the lang rows. Two quick workarounds meanwhile:

    • delete the lang cookie(s) there, then pick the language again, or
    • open CookCLI through the Pi's IP address (http://192.168.x.y:9080), which has its own cookie jar.

    On our side, #800 gives CookCLI's cookie a name of its own (cook_lang, like the existing cook_session) so another app can't collide with it. The old lang cookie is still read, so nobody loses the language they already chose.


    Analysis and changes made by Claude (Anthropic's AI assistant), posted on behalf of @LeMyst.

  2. phramusca commented on Nov 11, 2026

    @phramusca
    Author

    Could you check? In the browser's dev tools, open Application (Chrome) or Storage (Firefox) → Cookies → http://kitchen.local:9080 and look at the lang rows. Two quick workarounds meanwhile:

    I had a look and had only one lang cookie there, but since I host other websites on the pi, there may be a conflict. Anyway, I removed it and now I can change the language as expected, and the lang cookie value changes accordingly. Thanks for the workaround and I hope your change will solve it definitely.

  3. added a commit that references this issue on Nov 16, 2026
    af5410f
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions