Skip to content

Dev tunnels fails to run when in a dev container #11654

@aaronpowell

Description

@aaronpowell

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Insider DevcontainerPortForwardingLifecycleHook we add the allocated endpoint of the resource to the settings file:

_settingsWriter.AddPortForward(
                    endpoint.AllocatedEndpoint!.UriString,
                    endpoint.AllocatedEndpoint!.Port,
                    endpoint.UriScheme,
                    $"{resource.Name}-{endpoint.Name}");

But there is no allocated endpoint:

Image

This causes a null ref exception and the app host fails to start

Expected Behavior

You can use a dev tunnel in a dev container.

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version info

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions