Zaid-Ajaj / Fable.Remoting

Type-safe communication layer (RPC-style) for F# featuring Fable and .NET Apps
https://zaid-ajaj.github.io/Fable.Remoting/
MIT License
274 stars 57 forks source link

Problems after installing .Net SDK 7 #332

Closed DejanMilicic closed 1 year ago

DejanMilicic commented 1 year ago

After installing .Net 7 SDK, code that was working fine before

let adjectivesApi =
  Remoting.createApi ()
  |> Remoting.withRouteBuilder Route.builder
  |> Remoting.buildProxy<IAdjectivesApi>

is now producing following error

Uncaught Error: Option has no value
    at value (Option.js:39:15)
    at Remoting_buildProxy_Z2B50D2A3 (Remoting.fs.js:60:26)
DejanMilicic commented 1 year ago

I solved it by upgrading from 7.21 to 7.24

kerams commented 1 year ago

That's caused by upgrading to Fable 4, but yes, newer client versions fixed it.

DejanMilicic commented 1 year ago

Actually, I tried both with 3.7.18 and 4.0.0-theta-018 and results was the same. For some reason, the mere act of installing SDK 7 broke my project, even thought I did not change anything in the project itself (and I was compiling using 3.7.18)

kerams commented 1 year ago

That's weird, because https://github.com/Zaid-Ajaj/Fable.Remoting/pull/313/files fixed that specific error message (caused by missing ITypeResolver in Fable 4) in v7.22. I've been on .NET 7 since Preview 1 with Fable 3 and had no problems with Remoting, and I would be surprised if a different SDK version used to build the client started causing runtime exceptions in JS.

As long as your application now works reliably, none of this really matters.