reactiveui / refit

The automatic type-safe REST library for .NET Core, Xamarin and .NET. Heavily inspired by Square's Retrofit library, Refit turns your REST API into a live interface.

Home Page:https://reactiveui.github.io/refit/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Refit query does not complete in WASM RELEASE mode, works fine in debug mode

assassin316 opened this issue ยท comments

Describe the bug ๐Ÿž

I have an Uno app that is built for UWP and WASM, the Refit queries all work in both Release and Debug EXCEPT for Wasm Release mode.

Step to reproduce

  1. Change your build options to compile WASM in RELEASE
  2. Place a breakpoint in App.cs on line 23 (optional)
  3. Launch the app in release
  4. Once line 23 executes, the rest does not execute (line 26), this ONLY happens in RELEASE mode, debug mode works fine.

Reproduction repository

https://github.com/reactiveui/ReactiveUI

Expected behavior

The queries should successfully complete like they do in debug.

Screenshots ๐Ÿ–ผ๏ธ

No response

IDE

Visual Studio 2022

Operating system

No response

Version

No response

Device

No response

ReactiveUI Version

No response

Additional information โ„น๏ธ

You can find the sample project here:

https://drive.google.com/file/d/1tq1ifdNPUM8HVbhAU2d0yDLQ_BnCrG6Z/view?usp=share_link

At the end of the day, Refit is just a way to drive HttpClient around. I would try to see if your HttpClient class is working in Uno / WASM, then maybe create a DelegatingHttpClient to see what Refit is passing down to it.

At the end of the day Uno will have the same restrictions on network requests that JavaScript will with regards to setting certain headers, cross-site requests, etc, so you need to make sure your Refit client also complies with this

Fixed.

Refit was necessary to be specified in the LinkerConfig.xml

image

assassin316, ty for this Issue, I have been whit this problem 10h !!! i love you

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.