Skip to content

First-run auth message shows Linux settings path and suggests --cached, neither valid on Windows #675

Description

@scottdraves

Summary

When the client starts with no sealed session, it tells the user to edit ~/.config/infinidream/settings.json and to re-run with --cached. Both are Linux-only: the path is wrong on Windows and macOS, and --cached isn't parsed at all on Windows.

Observed

Fresh install on Windows 10 (deleted %LOCALAPPDATA%\Infinidream\), build 0.1.0 / dd396ac7:

[2026-07-31 16:26:20.217383 - warning]: No sealed session found
[2026-07-31 16:26:20.217383 - warning]: No sealed session or API key found. Set
settings.generator.nickname in ~/.config/infinidream/settings.json and run
interactively, or run with --cached to play cached videos.

Two separate problems

1. Hardcoded Linux settings path

client_generic/Networking/EDreamClient.cpp:740-742

g_Log->Warning("No sealed session or API key found. "
               "Set settings.generator.nickname in ~/.config/infinidream/settings.json "
               "and run interactively, or run with --cached to play cached videos.");

The message is emitted on all platforms, but that path only exists on Linux. Actual locations:

Platform Settings file
Windows %LOCALAPPDATA%\Infinidream\settings.json (stage: Infinidream-stage)
macOS /Users/Shared/infinidream.ai/settings.json
Linux ~/.config/infinidream/settings.json

2. --cached is not parsed on Windows

client_generic/Client/main.cpp:34-45

#ifdef WIN32
int32_t APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
                         LPSTR lpCmdLine, int nCmdShow)
{
    bool cachedOnlyMode = false; // WIN32 does not support --cached flag parsing yet
#else
int32_t main(int argc, char* argv[])
{
    // Parse our flags before glutInit so GLUT doesn't interfere.
    bool cachedOnlyMode = false;
    for (int i = 1; i < argc; ++i)
        if (strcmp(argv[i], "--cached") == 0) { cachedOnlyMode = true; break; }

WinMain ignores lpCmdLine entirely, so a user who follows the advice gets no effect and no feedback.

The same --cached suggestion appears unguarded at client_generic/Client/client.h:890-895:

fprintf(stderr,
    "\nNo sealed session or API key found.\n"
    "Options:\n"
    "  1. Run interactively to be prompted for your email and log in\n"
    "  2. Set INFINIDREAM_API_KEY environment variable\n"
    "  3. Run with --cached to play locally cached videos\n");

(That one at least avoids a hardcoded path, but option 3 is still Linux/macOS-only, and on Windows the GUI app has no console to print it to.)

Suggested fix

  • Make the settings-path text platform-conditional, reusing whatever helper already resolves the settings directory rather than hardcoding a string.
  • Drop or #ifdef-guard the --cached suggestion on Windows until the flag is actually parsed there — or implement parsing in WinMain via GetCommandLineW() / CommandLineToArgvW().

Notes

  • Pre-existing, introduced in Feat/linux pr 525 #582 (aa6d73ff). Not a regression from any currently open PR — found while testing Fix #622: Linux client settings GUI #647 on Windows.
  • Cosmetic/UX only. Signing in through the UI works normally; this just misdirects anyone reading the log or a console message after a failed auth.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

  • Status
    Clients

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions