Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocreate of ~/.aspnet/https is broken #44157

Open
jhudsoncedaron opened this issue Oct 14, 2024 · 5 comments
Open

Autocreate of ~/.aspnet/https is broken #44157

jhudsoncedaron opened this issue Oct 14, 2024 · 5 comments
Assignees
Labels
Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch

Comments

@jhudsoncedaron
Copy link

Describe the bug

With a new home directory, check out and build an application that wants the default https certificate (such as a vite application)

Note this won't reproduce out of your home directory, only a new one.

It's being talked about here: vitejs/vite#16296 (comment)

Troubleshooting results: vitejs/vite#16296 (comment)

To Reproduce

  1. Create new user account
  2. Clone any vite project
  3. Try to build it

Build Error

failed to load config from /github/workspace/vite.config.js
error during build:
Error: Could not create certificate.
at file:///github/workspace/vite.config.js.timestamp-1711659903508-baa8584510e9a.mjs:27:11
(...at etc...)

The stacktrace is misleading; the line "Error: Could not create certificate" comes out of the dotnet command, and got thrown by vite.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-NetSDK untriaged Request triage from a team member labels Oct 14, 2024
@cgdallas
Copy link

I am also experiencing this issue now with a project being run from a Github Action.

I had built and deployed a branch targeting dotnet 8 on October 5th without issue. I was working on a new branch today and started to run into this error trying to deploy it. As a troubleshooting step, I re-ran the same branch from October 5th and it's now failing with the same error - so this was working in the past.

The relevent snippet from the action run was:

> [email protected] build
#21 15.36   > tsc && vite build
#21 15.36   
#21 34.11   There was an error exporting the HTTPS developer certificate to a file.
#21 34.13   failed to load config from ...path here.../vite.config.ts
#21 34.14   error during build:
EXEC : error : Could not create certificate

@martincostello
Copy link
Member

See dotnet/aspnetcore#58330

@nagilson
Copy link
Member

It looks like this has been fixed, if you still experience this please file an issue at https://github.com/dotnet/aspnetcore/

@jhudsoncedaron
Copy link
Author

jhudsoncedaron commented Oct 24, 2024

@nagilson : I think you can at least produce a more meaningful error message.

If you can't reproduce the problem try it with a brand new user account.

@nagilson nagilson reopened this Oct 24, 2024
@nagilson
Copy link
Member

That's a good point, apologies; I will route this to the aspnet team to resolve this further.

@nagilson nagilson added Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch and removed untriaged Request triage from a team member Area-NetSDK labels Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch
Projects
None yet
Development

No branches or pull requests

4 participants