Closed JohnDoeKyrgyz closed 3 years ago
This is a symptom of this issue: https://github.com/Zaid-Ajaj/Fable.Remoting/issues/226
I had this issue and all I did to fix it was make sure the app ran in Azure as 64bit.
I can confirm that switching the app service to 64 bit gets around the issue. Unfortunately, this requires a Basic or higher plan (i.e. the default Free or even the Dev tier are restricted to 32 bit).
I wonder what it is about 64-bit that fixes the issue - why are we suddenly coupled to that? cc: @Zaid-Ajaj @theimowski Also looping in @eiriktsarpalis since it seems related to the TypeShape / Remoting issue.
I really, really want to avoid forcing people onto paid plans to use this on Azure.
I think for me it was because some dependency I had only supports 64 bit. I didn't look into it further once I had a solution though.
@travis-leith Even an empty SAFE 3 template suffers from this issue.
I just looked at the fix for the typeshape thing the other day and it mentions using an int64 - is that the problem? https://github.com/Zaid-Ajaj/Fable.Remoting/pull/228
Pretty sure that's not the issue.
@JohnDoeKyrgyz, @travis-leith, what is the version of Fable.Remoting.MsgPack that you see in your packet.lock?
Fable.Remoting.Client (7.2)
Fable.Browser.XMLHttpRequest (>= 1.0)
Fable.Core (>= 3.1.5)
Fable.Remoting.MsgPack (>= 1.6.2)
Fable.SimpleJson (>= 3.17)
FSharp.Core (>= 4.7)
Fable.Remoting.Giraffe (4.15)
Fable.Remoting.Server (>= 5.13)
FSharp.Core (>= 4.7.2)
Giraffe (>= 4.1)
Fable.Remoting.Json (2.13)
FSharp.Core (>= 4.7.2)
Newtonsoft.Json (>= 12.0.2)
Fable.Remoting.MsgPack (1.7)
FSharp.Core (>= 4.7.2)
TypeShape (>= 8.0.1)
Fable.Remoting.Server (5.13)
Fable.Remoting.Json (>= 2.13)
Fable.Remoting.MsgPack (>= 1.7)
FSharp.Core (>= 4.7.2)
TypeShape (>= 8.0.1)
Incidentally, I was getting some weird serialization errors that were resolved by turning off msgpack. I have not yet reported the errors since I need to come up with a non-confidential example payload. The error was something like "Expecting Int32 at position 55, but the data contains an array."
@travis-leith, OK, so that's an old version of Remoting.Server that still depends on the TypeShape package. If you update to the latest, you should not see this problem anymore, UNLESS you also use binary serialization, because Remoting.MsgPack still depends on TypeShape.
At the moment I am not aware of any serialization bugs besides missing char
support, so it would be great if you could narrow down the problem and open an issue. Problems like this can also pop up when you have mismatching MsgPack versions on the frontend and backend (like when you update dependencies in your solution, but only deploy a new backend), since the representation of data may occasionally change between versions.
@JohnDoeKyrgyz, @travis-leith, what is the version of Fable.Remoting.MsgPack that you see in your packet.lock?
Fable.Remoting.Client (7.9) Fable.Browser.XMLHttpRequest (>= 1.0) Fable.Core (>= 3.1.5) Fable.Remoting.MsgPack (>= 1.9) Fable.SimpleJson (>= 3.19) FSharp.Core (>= 4.7) Fable.Remoting.Giraffe (4.21) Fable.Remoting.Server (>= 5.19) FSharp.Core (>= 4.7.2) Giraffe (>= 4.1) Fable.Remoting.Json (2.16) FSharp.Core (>= 4.7.2) Newtonsoft.Json (>= 12.0.2) Fable.Remoting.MsgPack (1.9) FSharp.Core (>= 4.7.2) TypeShape (9.0) Fable.Remoting.Server (5.19) Fable.Remoting.Json (>= 2.16) Fable.Remoting.MsgPack (>= 1.9) FSharp.Core (>= 4.7.2)
@JohnDoeKyrgyz, and you encountered the problem in Azure with these versions and without using binary serialization? That would be troubling.
@kerams the problem occurs even with the unaltered template, right?
@travis-leith, that would be expected because unless you update after using the template, you're stuck with an older version of Remoting without a particular fix.
Does that mean that when the .net 5 version of the template comes out, it will not have this problem since it will have the correct version of Remoting?
Does that mean that when the .net 5 version of the template comes out, it will not have this problem since it will have the correct version of Remoting?
@travis-leith You can wait for the new template with net5.0 but nothing stops you from simply updating the Fable.Remoting.* packages to latest which we believe should solve this issue
I think we can close the issue now?
I attempted to use the template to create a sample app and deploy it to Azure. The deployment appeared to work correctly, but when I access the site in Azure I get an HTTP 502. The commands I ran were:
mkdir SafeQuickTest dotnet new SAFE dotnet run -- Azure
The HTTP 502 looks like this:
For some reason, it appears that the application cannot start. Evidence of this is in the eventlogs.xml file: `
`
I also attempted to get the stdout log. Unfortunately this file was always empty.