Docs: note that Bun resources don't trust the dev cert via NODE_EXTRA_CA_CERTS (upstream Bun bug)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- bun
- Domain
- documentation
Research direction
Start with the Certificate configuration and JavaScript apps in the AppHost documentation pages named in the issue, especially the Bun/AddBunApp sections. Add a caution linking to oven-sh/bun#44365, explain that NODE_EXTRA_CA_CERTS does not reliably establish trust for the dev certificate, and document the plain-HTTP endpoint workaround; done when both pages contain the relevant guidance.
Written by the indexing model from the issue text.
Description
Problem
Aspire sets up development certificate trust for the various resource types, but for Bun resources (AddBunApp/addBunApp), that doesn't actually work today. Aspire configures NODE_EXTRA_CA_CERTS (and SSL_CERT_DIR) on Bun resources automatically, pointing at the generated dev cert. Confirmed by inspecting the actual running process's environment. But Bun's fetch() still rejects the certificate with:
TypeError: unable to verify the first certificate
code: "UNABLE_TO_VERIFY_LEAF_SIGNATURE"
This is a genuine Bun bug, not an Aspire misconfiguration: Bun doesn't trust a pinned self-signed leaf certificate with basicConstraints: CA:FALSE via NODE_EXTRA_CA_CERTS, even though Node.js does for the exact same certificate and env var. I filed and reproduced this upstream with a minimal, Aspire-independent repro: oven-sh/bun#44365.
Net effect: any Bun-hosted resource (e.g. a CopilotKit/AG-UI runtime bridge, or any custom Bun service) that calls another Aspire project resource over HTTPS in local development will fail with UNABLE_TO_VERIFY_LEAF_SIGNATURE out of the box, with no Aspire-side configuration able to fix it. The only current workaround is to call the target resource's plain-HTTP endpoint instead of HTTPS for that specific call.
Request
Please add a note to the relevant docs pages so other users don't lose time rediscovering this:
- Certificate configuration — add a caution that Bun resources are currently affected by oven-sh/bun#44365 and don't reliably trust the dev certificate via
NODE_EXTRA_CA_CERTSeven though it's configured correctly, with the HTTP-endpoint workaround. - Set up JavaScript apps in the AppHost — a similar pointer near the Bun (
AddBunApp) hosting integration section would help.
- Dominant language
- MDX
- Stars
- 195
- Forks
- 91
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 111
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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 microsoft/aspire.dev
-
docs-from-code
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
microsoft/aspire.dev#1734 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
microsoft/aspire.dev#1650 ·
Maintainers usually reply within 1 day
-
Docs: Dev Tunnels "Configure dev tunnel options" examples do not compile; options table omits RegionOpen
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
microsoft/aspire.dev#1465 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
microsoft/aspire.dev#1464 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Half a day Newbie friendliness 84/100
microsoft/aspire.dev#1463 ·
Maintainers usually reply within 1 day
All issues in microsoft/aspire.dev
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 87/100
adri0/scadustats#128 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
WordPress/hosting-handbook#506 ·
Maintainers usually reply within 2 days
-
Docs: refresh target-app-parity and file-format-parity against mainPossibly taken @vangel76 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
storytold/photocraft#4417 · 1 comment ·
Maintainers usually reply within 1 day
-
documentation help wanted needs-triage
Difficulty 1/5 1-3 hours Newbie friendliness 75/100
hivecommons/hive#11606 · 2 comments ·
Maintainers usually reply within 1 day
-
documentation good first issue launch
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
FlologixAI/etchwork#4 ·