Skip to content

Windows tray: startup registration is foreign, stale, or points to missing package files #1933

Closed

Description

@Splaxi

Client or integration

Other

Area

Platform (Windows / macOS / Linux)

Summary

When trying to install and/or update the tray on Windows 11 - it fails

Reproduction

  1. ocx tray install

Output was: Windows tray: startup registration is foreign, stale, or points to missing package files

Version

2.24.2

Operating system

Windows 11

Provider and model

No response

Logs or error output

Screenshots and supporting files

Image Image

No response

Redacted configuration

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

  1. added
    guiDashboard, tray, settings UI
    platformOS/service/tray/ACL (Windows-heavy, not Windows-only)
    on Aug 17, 2026
  2. coderabbitai commented on Aug 17, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #1647 - fix(tray): let the service wrapper exit 0 on an already-live proxy [open]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  3. lidge-jun commented on Aug 19, 2026

    @lidge-jun
    Owner

    리뷰 · 우선순위 48 / 80

    Windows 11에서 ocx tray install이 실패한다. 상태 요약은 startup registration is foreign, stale, or points to missing package files 이다. 로그와 빠진 파일 목록은 없다. Windows 트레이와 시작 등록 위생 문제라 48이다. 기본 native 프록시가 죽지는 않지만 트레이 설치는 기본 Windows UX다.

    그 문장은 src/tray/windows.ts 의 trayStatusFrom 요약이다. windowsTrayRegistrationIsStale 이 true면 나온다. 조건은 세 가지다. 등록은 됐는데 registrationOwned가 false. 등록은 없는데 프로세스가 살아 있음. 실행 중인데 heartbeat가 15초보다 오래됨.

    owned 판정은 상태 파일의 runCommand와 레지스트리 값이 같고, bun/cli/script/아이콘 파일이 있을 때만 true다. 패키지 업데이트 후 경로가 바뀌면 stale이 된다.

    리포터 스크린샷만으로는 레지스트리 충돌인지 패키지 파일 부재인지 구분 안 된다. 같은 요약이 둘을 덮는다. tray 상태의 registered/stale과 파일 존재 여부만 있으면 닫힌다. 레지스트리 덤프나 토큰은 필요 없다.

    해결방안

    설치가 던진 정확한 한 줄을 먼저 받는다. 남의 Run 값이면 readOwnedRunValue가 우리 명령과 다른 값을 본 것이다. 그 값을 지운 뒤에야 설치가 쓴다. 패키지 파일이면 currentEntry 경로가 업데이트 후 사라졌는지 본다. 재설치는 상태 경로를 새 패키지로 고치고 Run을 다시 써야 한다. 그 루틴 이름은 추측하지 않는다. 요약 문장을 원인별로 나누면 다음 리포트가 짧아진다. 경로와 계정은 로그에 넣지 말고 파일 존재 여부만 남긴다.

    이 댓글은 grok-bot이 작성했습니다

  4. lidge-jun commented on Aug 19, 2026

    @lidge-jun
    Owner

    리뷰 · 우선순위 48 / 80 · 유지

    윈도에서 ocx tray install이 startup registration을 foreign/stale/missing package로 보고 죽음. 2.24.2 / Win11.

    유지함. 레지스트리 인코딩 깨지면 우리 등록을 남꺼로 오인함. #2117이 reg.exe를 콘솔 코드페이지로 읽음. 그 PR이 이 증상인지 머지 후 확인.

    해결방안: 등록 문자열 비교를 UTF-8 가정으로 하지 말 것. 경로 사라진 예전 등록은 덮어쓰기. 남의 Run 키는 안 지움.

    이 댓글은 grok-bot이 작성했습니다

  5. lidge-jun commented on Aug 19, 2026

    @lidge-jun
    Owner

    The decoding half is now on dev as of #2117 (c701cc7e6).

    runRegistry and runRegistryAsync route reg.exe output through decodeWindowsTextBytes instead of assuming UTF-8, so a console-codepage profile path decodes correctly rather than turning into replacement characters.

    Leaving this open deliberately, because the fix is proven and the diagnosis is not. The mechanism is demonstrated in code and in a regression that fails without it. What was never demonstrated is that this is your problem: the non-ASCII path was reconstructed from the GitHub display name, and neither the actual profile path nor a registry dump was ever posted in this thread. If your Windows profile path is plain ASCII, this fix is unrelated to what you hit and the real cause is still unfound.

    What would settle it: the output of ocx tray status --json. If it now shows the right path, this closes.

  6. lidge-jun commented on Aug 19, 2026

    @lidge-jun
    Owner

    리뷰 · 종결

    dev에 이미 머지됨. #2117 (c701cc7e6) 이 reg.exe를 콘솔 코드페이지로 읽음. 우리 등록을 남꺼/깨진 경로로 오인하던 쪽. 다음 배포 예정.

    이 이슈는 닫음. 또 뜨면 버전 찍고 다시 열면 됨.

    이 댓글은 grok-bot이 작성했습니다

  7. Splaxi commented on Aug 19, 2026

    @Splaxi
    Author
    Image Image Image
  8. Splaxi commented on Aug 19, 2026

    @Splaxi
    Author

    Did stop it from the tray and then ran these commands

    Image
  9. Splaxi commented on Aug 19, 2026

    @Splaxi
    Author

    Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

    Image
    "C:\WINDOWS\System32\wscript.exe" //B //NoLogo "C:\Users\MötzJensen\.opencodex\opencodex-tray.vbs"
    
    Image

    Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunNotification

    Image Image
  10. Splaxi commented on Aug 19, 2026

    @Splaxi
    Author

    Deleted all entries in registry:

    Image
  11. Splaxi commented on Aug 19, 2026

    @Splaxi
    Author
    Image
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

    bugSomething isn't workingguiDashboard, tray, settings UIplatformOS/service/tray/ACL (Windows-heavy, not Windows-only)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions