rccoleman Posted February 22, 2018 Posted February 22, 2018 After running fine for a long time, I'm now getting the following error when I try to run NodeLink on an updated Stretch install on a Rasperry Pi 3: rcoleman@rpi3:~/node$ mono NodeLink.exe Unhandled Exception: System.BadImageFormatException: Could not resolve field token 0x0400004d File name: 'NodeLink' I initially noticed that the NodeLink.exe binary was different from the latest one on your website, but I pushed the latest one and I'm still getting this error. Ideas?
rccoleman Posted February 22, 2018 Author Posted February 22, 2018 I just re-ran the installation instructions to pull in the mono repo and I now get this: rcoleman@rpi3:~/node$ mono NodeLink.exe Unhandled Exception: System.BadImageFormatException: Could not resolve field token 0x0400004d, due to: Could not load type of field 'j:z' (25) due to: Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. assembly:System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:<unknown type> member:<none> assembly:/home/rcoleman/node/NodeLink.exe type:j member:<none> File name: 'NodeLink' [ERROR] FATAL UNHANDLED EXCEPTION: System.BadImageFormatException: Could not resolve field token 0x0400004d, due to: Could not load type of field 'j:z' (25) due to: Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. assembly:System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:<unknown type> member:<none> assembly:/home/rcoleman/node/NodeLink.exe type:j member:<none> File name: 'NodeLink' Looks like I'm missing a dependency based on the latest http changes?
io_guy Posted February 22, 2018 Posted February 22, 2018 I think your mono version is messed. Updated stretch install - sure you pointed the apt-get to the proper stretch repo? Getting version 5.8.0.108? And installed mono-complete?
rccoleman Posted February 22, 2018 Author Posted February 22, 2018 Yes: rcoleman@rpi3:~/node$ mono --version Mono JIT compiler version 5.8.0.108 (tarball Fri Jan 19 18:55:10 UTC 2018) Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: normal Notifications: epoll Architecture: armel,vfp+hard Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: sgen (concurrent by default) It was working fine until (I think) the last NodeLink update, or maybe the one before that.
io_guy Posted February 22, 2018 Posted February 22, 2018 Not sure what to say, delete your config file (rename it) and see if it makes a difference. Most people are running the same Pi setup (I am too). Yes System.Net.Http usage is new in NodeLink but that's been supported in mono for a long time.
rccoleman Posted February 22, 2018 Author Posted February 22, 2018 Weird. I successfully removed and reinstalled mono-vbnc, but when I tried to remove "mono-complete", it said that it wasn't installed. I installed it and it's working now. It's been a long time since I installed everything, so something may have broken.
xKing Posted February 23, 2018 Posted February 23, 2018 Just upgraded to 0.9.9 from 0.9.5 and of course it crashed with the same error. Did 'sudo apt-get install libmono-system-net*' and it fixed it, I don't have mono-complete installed either (cause why bring all that junk over?)
io_guy Posted February 23, 2018 Posted February 23, 2018 The howto specifies the junk because it only wastes space not memory, and prevents new versions of NodeLink breaking like yours did. Some of the devices also require the JSON library which is not included in the runtime.
paulbates Posted February 23, 2018 Posted February 23, 2018 Any chance your SD card is going bad, especially since mono is run a lot? Paul
xKing Posted February 24, 2018 Posted February 24, 2018 On 2/23/2018 at 4:27 PM, io_guy said: The howto specifies the junk because it only wastes space not memory, and prevents new versions of NodeLink breaking like yours did. Some of the devices also require the JSON library which is not included in the runtime. So if I do mono-complete 0 upgraded, 252 newly installed, 0 to remove and 0 not upgraded. Need to get 110 MB/112 MB of archives. After this operation, 407 MB of additional disk space will be used. Thanks, but no thanks, not going to waste 407Mb on SD card (as any flash memory SD card lasts longer if more free space is available). That is after I've added json.
io_guy Posted February 25, 2018 Posted February 25, 2018 Lol, I'll send you the 20 cents for an SD card. Dream up a new argument.
paulbates Posted February 25, 2018 Posted February 25, 2018 I'd like to test the assertion that continued advanced development of Nodelink on native .net is exposing some differences in how mono is implemented vs .net? SSL comes to mind. This is not a veiled complaint or criticism, rather trying to predict if more is in store and is it worth considering the benefits of moving back to a windows based light server with real .net and getting off of mono?
io_guy Posted February 25, 2018 Posted February 25, 2018 I wouldn't bother. Microsoft owns mono now and has open sourced a lot of .NET. The two will get closer in the future, not apart.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.