question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EnableLiveUpdate on UWP

See original GitHub issue

Repro:

Check out https://github.com/nosami/Elmish.Calculator and add a UWP app to it. (VS: right click on solution, Add Project | C# | Cross-platform | Xamarin.Forms, blank app.) In the UWP app, add a reference to Elmish.Calculator and set EntryPoint in package.appxmanifest to Elmish.Calculator.App, and set MainPage.xaml.cs to LoadApplication(new Elmish.Calculator.App()).

Run or debug the UWP app.

Expected: shows calculator app, runs fine Actual: shows calculator app for about ten seconds, then throws a SocketException and terminates.

System.Net.Sockets.SocketException
  HResult=0x80004005
  Message=Only one usage of each socket address (protocol/network address/port) is normally permitted
  Source=System.Net.Sockets
  StackTrace:
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at System.Net.Sockets.UdpClient..ctor(Int32 port, AddressFamily family)
   at <StartupCode$Elmish-XamarinForms-LiveUpdate>.$LiveUpdate.Start@45-2.Invoke(Unit unitVar)
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2)
   at <StartupCode$Elmish-XamarinForms-LiveUpdate>.$LiveUpdate.Start@71-14.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.FSharp.Control.AsyncPrimitives.Start@938-1.Invoke(ExceptionDispatchInfo edi)
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
   at Microsoft.FSharp.Control.TrampolineHolder.ExecuteWithTrampoline(FSharpFunc`2 firstAction)
   at <StartupCode$FSharp-Core>.$Async.Sleep@1355-1.Invoke(Object _arg3)
   at System.Threading.TimerQueueTimer.<>c.<.cctor>b__19_0(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.TimerQueueTimer.CallCallback()
   at System.Threading.TimerQueueTimer.Fire()
   at System.Threading.TimerQueue.FireNextTimers()
   at System.Threading.TimerQueue.AppDomainTimerCallback()

Additional info:

Commenting out do runner.EnableLiveUpdate () makes the SocketException go away.

System details:

Windows 10, Visual Studio 15.8.1.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

0reactions
TimLarivierecommented, May 16, 2022

LiveUpdate has been abandoned in v2. Might come back in the future

Read more comments on GitHub >

github_iconTop Results From Across the Web

Update a live tile from a background task - UWP applications
Use a background task to update your app's live tile with fresh content. Here's a video that shows how to add live tiles...
Read more >
Updating a sideloaded UWP app - Microsoft Q&A
Hi, I have a UWP application sideloaded on ~30 tablets for my company. What is the best way to update the application?
Read more >
How to auto-update a sideload UWP app without first ...
I have a UWP app that is distributed via sideload (not through the Store) for various reasons. This app has auto-updating enabled, and...
Read more >
Intro to UWP (Universal Windows Platform) Apps in C# ...
You may have heard about Universal Windows Platform Applications, also known as UWP applications and wondered what they are. In this video ...
Read more >
Manual: UWP build settings
UWP build settings · Select File > Build Settings. · From the list of platforms in the Platform pane, select UWP. · If...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found