[Bug]: Polyscope API reporting 0 repositories
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 44/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Lĩnh vực
- api, backend-api-design
Hướng nghiên cứu
Bắt đầu bằng cách theo dõi GET /api/v1/repositories và so sánh kết quả của nó với GET /api/v1/servers cũng như trạng thái đăng ký relay được mô tả trong các log. Tái hiện các phản hồi trống, một phần và đầy đủ xảy ra không liên tục bằng cách sử dụng các repository ID được liệt kê; hoàn tất nghĩa là endpoint luôn trả về tất cả repository đã đăng ký cho tài khoản đã xác thực.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Platform
macOS
Operating system version
Mac OS Tahoe 26.3
System architecture
ARM64 (M1, M2, etc)
PolyScope Version
0.17.0
Bug description
Authenticated calls to GET /api/v1/repositories return an empty list for my account, but the local Polyscope server (desktop app) has six repositories registered for that same account. They show up in the UI, and the local server logs show worktree.list requests for each of them at startup.
The behaviour is intermittent. Sometimes /repositories returns the expected list, sometimes it returns {"data": []} with no change on my side. Same token, same account, same local server running. Earlier the same day I successfully POSTed workspaces against IDs returned by this endpoint, so it was working; a few hours later it started returning empty and stayed empty for a stretch; then it returned a partial list (just 1 of 6 repos); then empty again. No API-side mutations from me between the state changes.
Auth isn't the issue. GET /api/v1/servers with the same token consistently returns both of my connected servers as online: true, including the Mac server whose local log lists the six repo IDs. I also regenerated the token in the UI and the intermittent behaviour is identical with the new token.
Impact: any API client that has to discover a repo by listing first is unreliable. Hard-coded repo IDs still work for POST /api/v1/workspaces when they're remembered from a previous successful list call, but fresh setups hit a coin flip on whether the API will return anything.
The six repo IDs the local server tracks (and which /repositories should be returning):
7e7c4fd4, 8a23f2e1, 58dc1e37, b8f1a2ac, 813d41ae, 08a13118
Steps to reproduce
- Have a Polyscope account with at least one repo registered (visible in the UI, desktop app running and connected to the relay).
- Generate or regenerate an API token from the Polyscope UI for that account.
- Hit the endpoint:
curl -H "Authorization: Bearer $TOKEN" https://getpolyscope.com/api/v1/repositories - Response is
{"data": []}. - Sanity check the same token against a different endpoint:
curl -H "Authorization: Bearer $TOKEN" https://getpolyscope.com/api/v1/servers
This returns the account's servers correctly, including online status. So the token and auth layer are fine.
Additional checks that didn't change the outcome:
?all=true,?status=all,?state=all,?include=disconnected,?include_unregistered=trueall returned{"data": []}./api/v1/servers/<server_id>/repositoriesreturns 404.- Regenerated the token, same result.
/api/v1/workspacesalso returns{"data": []}for this account, probably correct but worth noting for consistency.
Rough timeline on the same day (2026-04-22):
- Around 00:50 local:
/repositoriesreturned 2 repos. - Around 10:00 local: returned 1 repo.
- From about 11:30 local onward: returns 0.
No deletions were made through the API between those checks.
Relevant log output
[electron] Starting prod server: /Applications/Polyscope.app/Contents/Resources/polyscope-server
[server] [relay-client] Connecting to relay at wss://relay-edge.getpolyscope.com...
[server] [polyscope] Server running on ws://0.0.0.0:4321/ws
[server] [polyscope] REST API: http://0.0.0.0:4321/api
[server] [polyscope] WS upgrade request from 127.0.0.1 localhost: true
[server] [polyscope] Client connected
[server] [ws] received: repo.list {"type":"repo.list"}
[server] [polyscope] Hydrated auth user from stored token
[server] [ws] received: auth.set {"type":"auth.set","user":{"id":<REDACTED>,"name":"<REDACTED>","email":"<REDACTED>","avatar":"<REDACTED>","subscribed":true,"on_trial":false,"expose_token":"<REDACTED>
[server] [ws] broadcast: auth.status {"type":"auth.status","user":{"id":<REDACTED>,"name":"<REDACTED>","email":"<REDACTED>","avatar":"<REDACTED>
[server] [ws] received: worktree.list {"type":"worktree.list","repoId":"7e7c4fd4"}
[server] [ws] received: repo.detect_integrations {"type":"repo.detect_integrations","repoId":"7e7c4fd4"}
[server] [ws] received: worktree.list {"type":"worktree.list","repoId":"8a23f2e1"}
[server] [ws] received: repo.detect_integrations {"type":"repo.detect_integrations","repoId":"8a23f2e1"}
[server] [ws] received: worktree.list {"type":"worktree.list","repoId":"58dc1e37"}
[server] [ws] received: repo.detect_integrations {"type":"repo.detect_integrations","repoId":"58dc1e37"}
[server] [ws] received: worktree.list {"type":"worktree.list","repoId":"b8f1a2ac"}
[server] [ws] received: repo.detect_integrations {"type":"repo.detect_integrations","repoId":"b8f1a2ac"}
[server] [ws] received: worktree.list {"type":"worktree.list","repoId":"813d41ae"}
[server] [ws] received: repo.detect_integrations {"type":"repo.detect_integrations","repoId":"813d41ae"}
[server] [ws] received: worktree.list {"type":"worktree.list","repoId":"08a13118"}
[server] [ws] received: repo.detect_integrations {"type":"repo.detect_integrations","repoId":"08a13118"}
[server] [relay-client] Connected to relay
[server] [relay-client] Registered as server 46b12b9c-30b
Meanwhile, same token, same moment, cloud REST API:
$ curl -H "Authorization: Bearer $POLYSCOPE_TOKEN" https://getpolyscope.com/api/v1/repositories
{"data":[]}
$ curl -H "Authorization: Bearer $POLYSCOPE_TOKEN" https://getpolyscope.com/api/v1/servers
{"data":[
{"id":"46b12b9c-30b","online":true,"platform":"darwin","version":"0.17.0","name":"<REDACTED>"},
{"id":"a574620f-013","online":true,"platform":"linux","version":"0.17.0","name":"<REDACTED>"}
]}
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 20
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của beyondcode/polyscope-community
-
[Bug]: Remote branch selection uses an unresolved local branch name when creating a workspace Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
[Bug]: Large workspace causes permanent server reconnect loop when a remote client subscribes Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
beyondcode/polyscope-community#198 · 1 bình luận · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Tất cả issue của beyondcode/polyscope-community
Issue tương tự
-
货币战争手改优先级配置缺少列表元素类型校验(P3) Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
syfoud/Simulated_Scepter#172 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
crossplane/crossplane#7859 ·
-
bot:ai-assisted component:compact-js status:untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
midnightntwrk/midnight-sdk#403 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
nightscout/nocturne#1379 ·