Skip to content

[Opencode Web]if password and user in url path. will show useGlobalSync error #15238

Closed as not planned

Description

@abearxiong

Description

export OPENCODE_SERVER_PASSWORD=111111
opencode web --hostname 0.0.0.0 --port 3000

http://opencode:111111@localhost:3000/ will show error

Image

Then, close and reopen the browser, and access http://localhost:3000/ without entering a username or password to use it normally.

Plugins

No response

OpenCode version

1.2.15

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

ubuntu24.04

Terminal

No response

Activity

  1. github-actions commented on Feb 26, 2026

    @github-actions
    Contributor

    This issue might be related to existing issues about web UI authentication with passwords. Please check:

    These issues share similar symptoms around OPENCODE_SERVER_PASSWORD causing problems in the web UI, though the specific trigger (credentials embedded in the URL) and error (useGlobalSync) appear to be distinct.

  2. gabrielgrant commented on Mar 27, 2026

    @gabrielgrant

    Getting this error too. For others searching, here's the complete error:

    Error: useGlobalSync must be used within GlobalSyncProvider
        at ri (http://40.160.9.248:39401/assets/index-3DxpclDG.js:2389:19373)
        at aT (http://40.160.9.248:39401/assets/session-Bbou8yJa.js:21:35964)
        at http://40.160.9.248:39401/assets/index-3DxpclDG.js:2:15011
        at We (http://40.160.9.248:39401/assets/index-3DxpclDG.js:2:4067)
        at Object.fn (http://40.160.9.248:39401/assets/index-3DxpclDG.js:2:14981)
        at H2 (http://40.160.9.248:39401/assets/index-3DxpclDG.js:2:6835)
        at $l (http://40.160.9.248:39401/assets/index-3DxpclDG.js:2:6592)
        at Df (http://40.160.9.248:39401/assets/index-3DxpclDG.js:2:8033)
        at Q7 (http://40.160.9.248:39401/assets/index-3DxpclDG.js:2:8914)
        at xO (http://40.160.9.248:39401/assets/index-3DxpclDG.js:2:8286)
    
  3. removed
    bugSomething isn't working
    webRelates to opencode on web / desktop
    on May 3, 2026
  4. Zeyuzhao commented on May 6, 2026

    @Zeyuzhao

    Been running into this issue as well - been serving opencode from a modal container, and when debugging the opencode instance through the server hosted on the container, I receive the same error:

    Error: useGlobalSync must be used within GlobalSyncProvider
        at ti (https://ta-01kqzjsa18wvcemrsd62e2v1qq-4096-rhcwqia86crjy0ve7a84v0783.w.modal.host/assets/index-BaRBwI5U.js:2396:22089)
        at re (https://ta-01kqzjsa18wvcemrsd62e2v1qq-4096-rhcwqia86crjy0ve7a84v0783.w.modal.host/assets/home-Ds3CJOhB.js:1:1138)
        at https://ta-01kqzjsa18wvcemrsd62e2v1qq-4096-rhcwqia86crjy0ve7a84v0783.w.modal.host/assets/index-BaRBwI5U.js:2:15011
        at Qe (https://ta-01kqzjsa18wvcemrsd62e2v1qq-4096-rhcwqia86crjy0ve7a84v0783.w.modal.host/assets/index-BaRBwI5U.js:2:4067)
        at Object.fn (https://ta-01kqzjsa18wvcemrsd62e2v1qq-4096-rhcwqia86crjy0ve7a84v0783.w.modal.host/assets/index-BaRBwI5U.js:2:14981)
        at pw (https://ta-01kqzjsa18wvcemrsd62e2v1qq-4096-rhcwqia86crjy0ve7a84v0783.w.modal.host/assets/index-BaRBwI5U.js:2:6835)
        at zl (https://ta-01kqzjsa18wvcemrsd62e2v1qq-4096-rhcwqia86crjy0ve7a84v0783.w.modal.host/assets/index-BaRBwI5U.js:2:6592)
        at qf (https://ta-01kqzjsa18wvcemrsd62e2v1qq-4096-rhcwqia86crjy0ve7a84v0783.w.modal.host/assets/index-BaRBwI5U.js:2:8033)
        at Dk (https://ta-01kqzjsa18wvcemrsd62e2v1qq-4096-rhcwqia86crjy0ve7a84v0783.w.modal.host/assets/index-BaRBwI5U.js:2:8914)
        at XO (https://ta-01kqzjsa18wvcemrsd62e2v1qq-4096-rhcwqia86crjy0ve7a84v0783.w.modal.host/assets/index-BaRBwI5U.js:2:8286)
    

    Is there a way for this error to fail silently instead of blocking the whole page?

    Image
  5. eyueldk commented on May 25, 2026

    @eyueldk

    Still seems to be an issue if you pass basic auth in url.

  6. ccssqq-ted commented on Jun 3, 2026

    @ccssqq-ted

    I meet the same issue. Need the basic web authorization because our security team forces any application with basic authorization. Hope the developer can fix it in next version. Thank you.

  7. github-actions commented on Aug 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

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