fabulous-dev / Fabulous

Declarative UI framework for cross-platform mobile & desktop apps, using MVU and F# functional programming
https://fabulous.dev
Apache License 2.0
1.15k stars 122 forks source link

Crash when update to 0.55 version #778

Closed anhlt closed 4 years ago

anhlt commented 4 years ago

My App crash when I update to latest version

2020-07-26 22:22:06.078097+0900 Petsnap.iOS[37994:2379341] Error in view function: System.MissingMethodException: Method not found: Fabulous.AttributeKey`1<string> Fabulous.ViewElement.get_KeyAttribKey()
  at <StartupCode$Petsnap>.$App.xaml+runner@133-2.Invoke (Petsnap.AppModule+Model model, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] dispatch) [0x00000] in C:\Users\tuana\source\repos\petsnap\Petsnap\App.xaml.fs:133 
  at Fabulous.ProgramModule+withConsoleTrace@213-2[model,msg,arg].Invoke (model model, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] dispatch) [0x0001b] in <1b7a2249b75567d02893dd26e7db011b>:0
**System.MissingMethodException:** 'Method not found: Fabulous.AttributeKey`1<string> Fabulous.ViewElement.get_KeyAttribKey()'

[HotReload] (2020-07-26 22:24:04.3): ERROR: Caught exception in AgentStatusChangedHandler at 212: Xamarin.HotReload.DebuggerTimeoutException: Failed to Inject Assembly
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
[HotReload] (2020-07-26 22:24:04.3): INFO: XAML Hot Reload encountered a problem and failed to start. Use Help -> Report a Problem if the issues persists.
[HotReload] (2020-07-26 22:24:04.3): INFO: Stopping All Hot Reload sessions due to Failed ...
[HotReload] (2020-07-26 22:24:04.3): INFO: (Petsnap.iOS) Stopped Hot Reload session due to Failed ...
[HotReload] (2020-07-26 22:24:04.3): INFO: Stopped Hot Reload session.
TimLariviere commented 4 years ago

@anhlt Could you give us more information on this crash?

Regarding the error message, it's strange. KeyAttribKey is a new field in the 0.55 version, and Fabulous shouldn't complain it's missing.

It's as if your project still referenced Fabulous.dll v0.54 with Fabulous.XamarinForms.dll v0.55.

anhlt commented 4 years ago

@TimLariviere What kind of information you want to know?

This is my app source code https://github.com/anhlt/petsnap.git Dependencies


  <ItemGroup>
    <PackageReference Include="Fabulous" Version="0.55.0" />
    <PackageReference Include="Fabulous.LiveUpdate" Version="0.55.0" />
    <PackageReference Include="Fabulous.XamarinForms.LiveUpdate" Version="0.55.0" />
    <PackageReference Include="Sharpnado.MaterialFrame" Version="1.1.1" />
    <PackageReference Include="Xamarin.Forms" Version="4.7.0.1179" />
    <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
    <PackageReference Include="Fabulous.XamarinForms" Version="0.55.0" />
    <PackageReference Include="FSharp.Data" Version="3.3.3" />
    <PackageReference Include="Xamarin.Forms.PancakeView" Version="2.0.1.698" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Update="FSharp.Core" Version="4.7.2" />
  </ItemGroup>
TimLariviere commented 4 years ago

@anhlt Thanks. In your repository, your iOS and Android projects have not been updated. They are still using Fabulous v0.54.2.

https://github.com/anhlt/petsnap/blob/01dc064acb5c9bab858cce27a689d5ea3837ba49/iOS/packages.config#L3-L6

anhlt commented 4 years ago

@TimLariviere Thank you. Solved