[Bug]: Server failed health check after timeout
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
Research direction
Start at the Electron startup path that launches polyscope-server and waits on port 4321; reproduce on macOS ARM64 with that port occupied and inspect the EADDRINUSE exit. Establish the expected behavior for this conflict and verify that the server no longer causes an unexplained health-check failure, adding coverage if the project has a relevant test path.
Written by the indexing model from the issue text.
Description
Platform
macOS
Operating system version
26.2(25C56)
System architecture
ARM64 (M1, M2, etc)
PolyScope Version
0.17.0
Bug description
[electron] Starting prod server: /Applications/Polyscope.app/Contents/Resources/polyscope-server
[electron] Waiting for server health check on port 4321...
[server:err] 424 | )}function dqT(T){if(T.points.length<2)return"";let R=T.points.map((A)=>${A.x},${A.y}).join(" "),_=!T.identifying?' stroke-dasharray="6 4"':"";return<polyline points="${R}" fill="none" stroke="var(--line)" stroke-width="${L9.connector}"${} />}function nqT(T){if(!T.label||T.points.length<2)return"";let R=oqT(T.points),A=x_(T.label,DR.edgeLabel,uR.edgeLabel)+8,D=DR.edgeLabel+6;return
[server:err] 425 | ${zL(T.label)}}function iqT(T){if(T.points.length<2)return"";let R=[],_=T.points[0],A=T.points[1];R.push(EQ(_,A,T.cardinality1));let D=T.points[T.points.length-1],O=T.points[T.points.length-2];return R.push(EQ(D,O,T.cardinality2)),R.join(
[server:err] 426 | )}function EQ(T,R,_){let A=[],D=L9.connector+0.25,O=T.x-R.x,q=T.y-R.y,H=Math.sqrt(O*O+q*q);if(H===0)return"";let B=O/H,W=q/H,L=-W,J=B,U=T.x-B*4,F=T.y-W*4,z=T.x-B*16,K=T.y-W*16,N=_==="one"||_==="zero-one",E=_==="many"||_==="zero-many",G=_==="zero-one"||_==="zero-many";if(N){A.push();let V=U-B*4,C=F-W*4;A.push()}if(E){let V=U,C=F;A.push(),A.push(),A.push()}if(G){let j=E?20:12,V=T.x-B*j,C=T.y-W*j;A.push()}return A.joi [server:err] 427 | )}function oqT(T){if(T.length===0)return{x:0,y:0};if(T.length===1)return T[0];let R=0;for(let D=1;D<T.length;D++){let O=T[D].x-T[D-1].x,q=T[D].y-T[D-1].y;R+=Math.sqrt(OO+qq)}if(R===0)return T[0];let =R/2,A=0;for(let D=1;D<T.length;D++){let O=T[D].x-T[D-1].x,q=T[D].y-T[D-1].y,H=Math.sqrt(OO+qq);if(A+H>=){let B=H>0?(-A)/H:0;return{x:T[D-1].x+OB,y:T[D-1].y+qB}}A+=H}return T[T.length-1]}function zL(T){return T.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function rqT(T){let R=T.trim().split([server:err] 428 |)[0]?.trim().toLowerCase()??"";if(/^sequencediagram\s*$/.test(R))return"sequence";if(/^classdiagram\s*$/.test(R))return"class";if(/^erdiagram\s*$/.test(R))return"er";return"flowchart"}function tqT(T){return{bg:T.bg??Q.bg,fg:T.fg??Q.fg,line:T.line,accent:T.accent,muted:T.muted,surface:T.surface,border:T.border}}async function ZQ(T,R={}){let =tqT(R),A=R.font??"Inter",D=R.transparent??!1,O=rqT(T),q=T.split([server:err] 429 |);return T9(R,A,O,,{skipUserBroadcast:"Committing changes"}).catch((q)=>console.error("[api] agent.prompt (commit) failed:",q)),G({workspace_id:A,agent:{status:"working"}})},"workspaces.create_pr":async(T,R,)=>{let{workspace_id:A,title:D,body:O}=T,q=T.draft===!0;if(!A)return OR("validation_error","workspace_id is required",422);if(!FT(A))return OR("not_found","Workspace not found",404);let B=q?tW(A,D,O):rW(A,D,O);return T9(R,A,B,,{skipUserBroadcast:q?"Creating draft pull request":"Creating pull request"}).catch((L)=>console.error("[api] agent.prompt (pr) failed:",L)),G_({workspace_id:A,agent:{status:"working"}})},"workspaces.stop":async(T)=>{let R=T.workspace_id;if(!R)return OR("validation_error","workspace_id is required",422);if(!FT(R))return OR("not_found","Workspace not found",404);return await N7(R),G_({workspace_id:R,agent:{status:"idle"}})},"api.key_exchange":async(T)=>{let R=f_(T.public_key),=f(T.nonce);if(!R)return OR("validation_error","public_key is required",422);if(!_)return OR("validation
[server:err] error: Failed to start server. Is port 4321 in use?
[server:err] syscall: "listen",
[server:err] errno: 0,
[server:err] code: "EADDRINUSE"
[server:err] at (/$bunfs/root/polyscope-server-aarch64-apple-darwin:429:3906)
[server:err] Bun v1.3.11 (macOS arm64)
[electron] Server exited with code 1
[electron] Server failed health check after timeout
Steps to reproduce
No response
Relevant log output
- Dominant language
- No language data
- Stars
- 20
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from beyondcode/polyscope-community
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
beyondcode/polyscope-community#198 · 1 comment · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
All issues in beyondcode/polyscope-community
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
syfoud/Simulated_Scepter#172 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
crossplane/crossplane#7859 ·
-
bot:ai-assisted component:compact-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
midnightntwrk/midnight-sdk#403 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nightscout/nocturne#1379 ·