Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

NodeLink fails to restart after update

Featured Replies

Posted

When NodeLink has detected the last two updates, it doesn't seem to restart properly after updating on my RPI3.  The last bit in the log today is

2018-12-05 03:59:59 - Auto-Update: Checking for program update...
2018-12-05 04:00:00 - Auto-Update: New version found (0.9.24), downloading...
2018-12-05 04:00:05 - Auto-Update: Download complete, moving and restarting...

And yet NodeLink isn't running.  If I run it manually via the following, it runs and works fine.

sudo mono -O=-aot /home/rcoleman/node/NodeLink.exe &

If I hit the "Restart NodeLink" button in the web interface, I get this:

Unhandled Exception:
System.TypeInitializationException: The type initializer for 'System.Net.Http.HttpClient' threw an exception. ---> System.OverflowException: TimeSpan overflowed because the duration is too long.
  at System.TimeSpan.Interval (System.Double value, System.Int32 scale) <0x74a03bb8 + 0x0010c> in <c3c5f4bb011a4af8b925b0d39ee12396>:0 
  at System.TimeSpan.FromSeconds (System.Double value) <0x74a03e88 + 0x0001b> in <c3c5f4bb011a4af8b925b0d39ee12396>:0 
  at System.Net.Http.HttpClient..cctor () [0x00000] in <8143c7fff6c24f069b2e1e781bdabec4>:0 
   --- End of inner exception stack trace ---
  at i.m () [0x007c6] in <3cfda86346df48819a7b88da9fabba44>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Net.Http.HttpClient' threw an exception. ---> System.OverflowException: TimeSpan overflowed because the duration is too long.
  at System.TimeSpan.Interval (System.Double value, System.Int32 scale) <0x74a03bb8 + 0x0010c> in <c3c5f4bb011a4af8b925b0d39ee12396>:0 
  at System.TimeSpan.FromSeconds (System.Double value) <0x74a03e88 + 0x0001b> in <c3c5f4bb011a4af8b925b0d39ee12396>:0 
  at System.Net.Http.HttpClient..cctor () [0x00000] in <8143c7fff6c24f069b2e1e781bdabec4>:0 
   --- End of inner exception stack trace ---
  at i.m () [0x007c6] in <3cfda86346df48819a7b88da9fabba44>:0 

Since it appears to be happening in the "Http" module, I tried the following from another thread:

sudo apt install libmono-system-net-http*

But it looks like it was fine:

rcoleman@rpi3:~/node$ sudo apt install libmono-system-net-http*
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libmono-system-net-http4.0-cil' for glob 'libmono-system-net-http*'
Note, selecting 'libmono-system-net-http-formatting4.0-cil' for glob 'libmono-system-net-http*'
Note, selecting 'libmono-system-net-http-webrequest4.0-cil' for glob 'libmono-system-net-http*'
libmono-system-net-http-formatting4.0-cil is already the newest version (5.16.0.179-0xamarin1+raspbian9b1).
libmono-system-net-http-formatting4.0-cil set to manually installed.
libmono-system-net-http-webrequest4.0-cil is already the newest version (5.16.0.179-0xamarin1+raspbian9b1).
libmono-system-net-http-webrequest4.0-cil set to manually installed.
libmono-system-net-http4.0-cil is already the newest version (5.16.0.179-0xamarin1+raspbian9b1).
libmono-system-net-http4.0-cil set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

I did run the installation script a few weeks ago (in a vain attempt to try to fix Ecobee issues) and this issue may have coincided with that, but I don't know for sure.  All I can say is that the last couple of NodeLink updates have required me to manually restart NodeLink.

  • Author

Ah, I was about to say that I thought -aot was supposed to fix that. Not a big deal, just have to keep up with updates. 

I was gonna fix it in NodeLink but it's Pi only, mono 5.16 only, and only mono upgrade (not fresh install).  Just too specfic to bother a workaround for.  

5.18 should be out any day now.  

If you want to fix it now find my post to uninstall mono (it's one command).  On full reinstall the issue goes away (no aot required).  

  • Author

I tried to uninstall and reinstall mono via this

- Commented out the repo in /etc/apt/sources.list.d/mono-official.list
- Ran sudo apt update
- Removed mono (sudo apt remove --purge --auto-remove mono-runtime)
- Installed raspbian version (sudo apt-get install mono-vbnc mono-complete)

But the final installation step quickly failed because of held-back packages.  I commented out the mono repo and did an update, so I'm not sure what was wrong and it seemed like a rabbithole.  I did the installation via

sudo apt install mono-vbnc libmono-system-net-http*

and it took forever and caused the RPI3 to stop responding for long periods of time, but eventually succeeded and everything's working fine now.  I can start and restart NodeLink without any problems.

Thanks for the pointer!

The long time to install/compile is another 5.16 bug.  They made quite a mess of that release.

Archived

This topic is now archived and is closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.