Skip to content

[Bug]: RequestBuilderImplementation regression PlatformNotSupportedException #2065

@Liandrel

Description

@Liandrel

Describe the bug 🐞

In the 10.1.6 release published 2 days ago this code were added to the BuildRequestFactoryForMethod method of the RequestBuilderImplementation class

Image

when running code generated with the Refit generator inside Blazor WASM standalone app this results with the
System.PlatformNotSupportedException: Cannot wait on monitors on this runtime.
since code tries to block a thread (sync wait) on a runtime that doesn’t support blocking waits.

Image

Step to reproduce

1.Try to call anything using Refit generated sdk from Blazor WASM standalone app

Or you can just create Blazor Wasm standalone app from the microsoft template and do this in the counter.razor

Image

if there will be need to create some sample repo with api, sdk and wasm UI I can do this too but i think this should be enough to investigate

Reproduction repository

https://github.com/reactiveui/refit

Expected behavior

This should happen...

Screenshots 🖼️

No response

IDE

No response

Operating system

No response

Version

No response

Device

No response

Refit Version

No response

Additional information ℹ️

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions