Skip to content

Cannot consume scoped service 'Microsoft.JSInterop.IJSRuntime' from singleton 'Blazor.Extensions.WebUSB.IUSB'. #8

@stalbot123

Description

@stalbot123

When trying to start the application after installing WebUSB, the app crashes with the following message:
An error occurred while starting the application.
AggregateException: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Blazor.Extensions.WebUSB.IUSB Lifetime: Singleton ImplementationType: Blazor.Extensions.WebUSB.USB': Cannot consume scoped service 'Microsoft.JSInterop.IJSRuntime' from singleton 'Blazor.Extensions.WebUSB.IUSB'.)
Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(IEnumerable serviceDescriptors, ServiceProviderOptions options)

InvalidOperationException: Error while validating the service descriptor 'ServiceType: Blazor.Extensions.WebUSB.IUSB Lifetime: Singleton ImplementationType: Blazor.Extensions.WebUSB.USB': Cannot consume scoped service 'Microsoft.JSInterop.IJSRuntime' from singleton 'Blazor.Extensions.WebUSB.IUSB'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions