Announcement

Collapse
No announcement yet.

Could not load...'Newtonsoft.Json, Version=12.0.0.0...PublicKeyToken=30ad4fe6b2a6aeed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SteveMSJ
    replied
    Originally posted by dbrunt View Post
    Correct on all counts! It's what I do and have done for a living for almost 35 years. My analytical skills have always been admired, praised and sometimes caused envy! I forget now why I was starting HS4 in console mode and watching its output; I just wish I still had the memory retention of my younger days!

    This entry then...<probing privatePath="bin/SDJ-Health;bin;bin/homeseer" allows the pi to find its installed version of System.Data.SQLite.dll and resolves whatever the issue is with HS4 Linux wanting to find Newtonsoft.json.dll. That I'll leave to you & HST to figure out, perhaps one day when they've run out of things to do!
    I have reported it to HST and I'll let you know if I get any response.

    I wouldn't recommend making changes to the path HSPI_SDJHealth.exe.config file because it isn't good practice to point to a folder not created by the pi. Whilst it might work at the moment there is a risk of file version conflicts if HS install a version of SQLite in their path or I install another library in my path. After all it is just avoiding a single message at startup in the console output. The .config file will also get overwritten every time you install an update to the pi.

    Steve

    Leave a comment:


  • dbrunt
    replied
    Correct on all counts! It's what I do and have done for a living for almost 35 years. My analytical skills have always been admired, praised and sometimes caused envy! I forget now why I was starting HS4 in console mode and watching its output; I just wish I still had the memory retention of my younger days!

    This entry then...<probing privatePath="bin/SDJ-Health;bin;bin/homeseer" allows the pi to find its installed version of System.Data.SQLite.dll and resolves whatever the issue is with HS4 Linux wanting to find Newtonsoft.json.dll. That I'll leave to you & HST to figure out, perhaps one day when they've run out of things to do!

    Leave a comment:


  • SteveMSJ
    replied
    Originally posted by SteveMSJ View Post

    Hopefully I’ll put together an HS4 Linux test system together in the next week or so and let you know how I get on.

    Steve
    dbrunt

    Ok. I finally have a Raspberry PI4 set up with both HS3 and HS4 installed and setup so I can test the pi in HS4 under Windows and Linux.

    Firstly I can confirm the message you have observed but it isn't in the HS log as such, just in the Linux console. If you view the HS4 log it doesn't show the message. This explains why it doesn't have a source attached to it in your screenshot. It doesn't occur in HS3 linux, just HS4 linux. It occurs the first time the pi references the SQLite battery history database and is a spurious HS4 message because the pi doesn't use Newtonsoft.json.dll. The pi isn't throwing an error, the message comes from HS4, but is triggered when the pi first accesses its own installed version of the System.Data.SQLite.dll library.

    I will raise this with HS to see if they can correct the issue in HS4. However, I wouldn't hold your breath because it doesn't cause any issues and I can't imagine many users actually look at the linux console output. You are obviously more eagle eyed than most!

    Steve

    Leave a comment:


  • SteveMSJ
    replied
    Originally posted by zwolfpack View Post
    I'd wager that the message highlighted in the original post originates from a source other than the SDJ-Health plugin. Note that there's nothing in the message itself that identifies it's source. Lots of stuff runing asynchronously at startup, thus log entries can become intermingled.

    No such error on my HS3 "test" system, so if anything it's an HS4 problem. Thus by rights, HST should be the responsible party ... [ there's your laugh for the day] ...
    I think you are correct and hopefully I can test in the next week or so.

    steve



    Leave a comment:


  • SteveMSJ
    replied
    Originally posted by dbrunt View Post
    In view of what you have described then I would think just modify the path to <probing privatePath="bin/SDJ-Health;bin;bin/homeseer" to make HS4 Linux happy (after you test of course). Not sure if both bin & bin/homeseer are required unless for backwards compatibility? (bin/homeseer is where Newtonsoft.json.dll is in HS4 Linux) I have removed my duplicate copy I placed in bin/SDJ-Health/Newtonsoft.json.dll since it's essentially a double-fix to the minor issue.

    Daniel
    Hopefully I’ll put together an HS4 Linux test system together in the next week or so and let you know how I get on.

    Steve

    Leave a comment:


  • zwolfpack
    replied
    I'd wager that the message highlighted in the original post originates from a source other than the SDJ-Health plugin. Note that there's nothing in the message itself that identifies it's source. Lots of stuff runing asynchronously at startup, thus log entries can become intermingled.

    No such error on my HS3 "test" system, so if anything it's an HS4 problem. Thus by rights, HST should be the responsible party ... [ there's your laugh for the day] ...

    Leave a comment:


  • dbrunt
    replied
    In view of what you have described then I would think just modify the path to <probing privatePath="bin/SDJ-Health;bin;bin/homeseer" to make HS4 Linux happy (after you test of course). Not sure if both bin & bin/homeseer are required unless for backwards compatibility? (bin/homeseer is where Newtonsoft.json.dll is in HS4 Linux) I have removed my duplicate copy I placed in bin/SDJ-Health/Newtonsoft.json.dll since it's essentially a double-fix to the minor issue.

    Daniel

    Leave a comment:


  • SteveMSJ
    replied
    Originally posted by dbrunt View Post
    Hi Steve,

    Thanks for the feedback! Whilst SDJ-Health has been working fine for me, I have been trying to clean up various errors observed in startup/shutdown. This is an HS4 upgrade from HS3, a few revisions ago (perhaps 4.0.5 or earlier). I fixed an error related to scheduler.dll at startup - I had 'bin\Scheduler.dll' rather than a Scheduler.dll in bin/. Once I moved it down/renamed it, it loaded at startup but then I had an error re: 'flite' so I added that package to linux and 'speak' now works. While that is unrelated to SDJ, it pointed out a Windows-to-Linux naming issue for me. I found that some plugins refer to /Log and others to /log which doesn't matter in Windows but you end up with 2 directories in Linux. So I shuffled things around and created hard links from the uppercase name to the lowercase one. I've seen some plugins test for Linux and translate \ to / but then later in the coding I found "" hard coded! Anyways, sorry I digressed from the topic at hand...
    For SDJ while it may not use Newtonsoft.json.dll while running, your config file does point to it in your folder:
    Code:
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">^M <probing privatePath="[B]bin/SDJ-Health[/B]"/>^M </assemblyBinding>^M
    which does not exist since your plugin does not provide it in bin/SDJ-Health. I suspect that the many other Linux users may not have noticed the tiny error message within the SDJ startup section in the log. I suggest that to clear the error even though it causes no harm, just change the config to:
    Code:
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">^M <probing privatePath="bin/SDJ-Health[B][COLOR=#8e44ad];bin;bin/homeseer[/COLOR][/B]"/>^M </assemblyBinding>^M
    Thanks,
    Daniel

    P.S. Thanks for a fabulous plug-in!!!
    Hi Daniel,

    Thanks for the information. However, I am still confused as to why you think SDJ-Health should point to or use NewtonSoft.json.dll.

    The lines you have quoted in my HSPI_SDJHealth.exe.config file point to the privatePath 'bin/SDJ-Health" folder, because that is where I install the System.Data.SQLite.dll library which the pi uses to manage the database of battery readings. I don't install the Newtonsoft.json.dll library there because I don't reference it in the pi. Maybe it is something to do with HS4 implicitly requiring all plugins to reference Newtonsoft.json.dll, as json is the primary format for storage, even if they don't use it, and perhaps windows is more forgiving than linux/mono on finding the library. However, that would be news to me and I haven't seen any mention of it in the HS4 documentation or the developer forum.

    It doesn't throw an error on my HS3 or HS4 windows systems nor on the HS3 linux systems I have tested. When I get some time I will set up an HS4 linux system and see if I can understand why your system is logging an error. Perhaps someone else running HS4 linux can comment on whether they see this log error.

    I do try to be careful with windows/linux naming issues but it is easy to get caught out with linux case sensitivity when your primary environment is windows. For file paths I stick to using the "/" linux convention rather than "" in my plugins because it is necessary for linux but windows can cope with either.

    Originally posted by dbrunt View Post
    ("bin/SDJ-Health" could be removed since it points to a directory without Newtonsoft.json.dll) and it will find the HS native Newtonsoft.json.dll and everything will be happy! That change has eliminated the disconcerting message for me even though it causes no ill effect to the operation of the plugin.
    If I was to remove bin/SDJ-Health from the config file then the pi wouldn't find the required version of System.Data.SQLite and you will get an error that prevents storing and accessing the battery history.

    Originally posted by dbrunt View Post
    I compared other plugins that supply Newtonsoft.json.dll and some match the version in HS4 bin/homeseer while others have a different version...
    Of course lots of plugins do explicitly use json and they reference and install the version of the library that they depend on.

    In the meantime I'm glad you have things working ok.

    Steve

    Leave a comment:


  • dbrunt
    replied
    Hi Steve,

    Thanks for the feedback! Whilst SDJ-Health has been working fine for me, I have been trying to clean up various errors observed in startup/shutdown. This is an HS4 upgrade from HS3, a few revisions ago (perhaps 4.0.5 or earlier). I fixed an error related to scheduler.dll at startup - I had 'bin\Scheduler.dll' rather than a Scheduler.dll in bin/. Once I moved it down/renamed it, it loaded at startup but then I had an error re: 'flite' so I added that package to linux and 'speak' now works. While that is unrelated to SDJ, it pointed out a Windows-to-Linux naming issue for me. I found that some plugins refer to /Log and others to /log which doesn't matter in Windows but you end up with 2 directories in Linux. So I shuffled things around and created hard links from the uppercase name to the lowercase one. I've seen some plugins test for Linux and translate \ to / but then later in the coding I found "" hard coded! Anyways, sorry I digressed from the topic at hand...
    For SDJ while it may not use Newtonsoft.json.dll while running, your config file does point to it in your folder:
    Code:
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">^M <probing privatePath="[B]bin/SDJ-Health[/B]"/>^M </assemblyBinding>^M
    which does not exist since your plugin does not provide it in bin/SDJ-Health. I suspect that the many other Linux users may not have noticed the tiny error message within the SDJ startup section in the log. I suggest that to clear the error even though it causes no harm, just change the config to:
    Code:
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">^M <probing privatePath="bin/SDJ-Health[B][COLOR=#8e44ad];bin;bin/homeseer[/COLOR][/B]"/>^M </assemblyBinding>^M
    ("bin/SDJ-Health" could be removed since it points to a directory without Newtonsoft.json.dll) and it will find the HS native Newtonsoft.json.dll and everything will be happy! That change has eliminated the disconcerting message for me even though it causes no ill effect to the operation of the plugin. I compared other plugins that supply Newtonsoft.json.dll and some match the version in HS4 bin/homeseer while others have a different version...

    Thanks,
    Daniel

    P.S. Thanks for a fabulous plug-in!!!

    Leave a comment:


  • SteveMSJ
    replied
    Originally posted by dbrunt View Post
    So I went ahead and did both: copied bin/homeseer/Newtonsoft.Json.dll to your bin/SDJ-Health folder AND modified your HSPI_SDJHealth.exe.config:
    This is very strange as I have never come across this error nor has anybody else reported it. More strangely still I don't reference, or make use of, the Newtonsoft.json.dll anywhere in SDJ-Health. I have tested SDJ-Health on several alpha and beta versions of HS4, including the latest RC2, without issues and certainly not the error message on startup you are seeing. However, whilst I have tested SDJ-Health on HS3 linux, I have only tested on HS4 windows versions, although here are others running SDJ-Health on HS4 linux.

    There is no Newtonsoft.json.dll in the \bin\SDJ-Health\ folders of either my HS3 or HS4 installs. The only Newtonsoft.json.dll files on my system are in the \bin folders of various plugins that use it.

    So, I am at a complete loss as to why you should see that error message. Unless anyone else reports it then it would seem to be unique to your system. Of course it could be that, if everything actually works, others might have the error message in the log at startup but not notice it. However, the linux users tend to be very observant and quick to point out discrepancies

    Is this over a clean install of HS4 or an upgrade from HS3?
    Is there perhaps an erroneous Newtonsoft.json.dll in your root HS4 folder?

    As a test, I wonder whether the error message reoccurs if you remove the file you have added to /bin/SDJ-Health and reinstate the original HSPI_SDJHealth.exe.config file? Also if you uninstall and reinstall the plug-in. After all the pi doesn't use the Newtonsoft.json.dll library.

    I'd be very interested to know if you have any more thoughts or comments.

    Steve

    Leave a comment:


  • dbrunt
    replied
    So I went ahead and did both: copied bin/homeseer/Newtonsoft.Json.dll to your bin/SDJ-Health folder AND modified your HSPI_SDJHealth.exe.config:

    Code:
    <?xml version="1.0"?>^M
    <configuration>^M
    <runtime>^M
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">^M
    <probing privatePath="bin/SDJ-Health[B][COLOR=#8e44ad];bin;bin/homeseer[/COLOR][/B]"/>^M
    </assemblyBinding>^M
    </runtime>^M
    <startup>^M
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>^M
    </startup>^M
    </configuration>^M
    No error now...
    Code:
    05:45:09:9399:[Z-Wave]->*********************************************************** ********************
    05:45:09:9405:[Z-Wave]-> STARTUP COMPLETE: All configured interfaces were successfully initialized.
    05:45:09:9410:[Z-Wave]->*********************************************************** ********************
    05:45:10:9511:[SDJ-Health]->PEData read successfully from child device #246
    05:45:10:9620:[SDJ-Health]->PEData read successfully from child device #247
    05:45:10:9701:[SDJ-Health]->PEData read successfully from child device #248
    05:45:10:9832:[SDJ-Health]->PEData read successfully from child device #249
    05:45:10:9910:[SDJ-Health]->PEData read successfully from child device #250
    05:45:10:9997:[SDJ-Health]->PEData read successfully from child device #415
    05:45:11:0075:[SDJ-Health]->PEData read successfully from child device #416
    05:45:11:0157:[SDJ-Health]->PEData read successfully from child device #417
    05:45:11:0258:[SDJ-Health]->PEData read successfully from child device #418
    05:45:11:0352:[SDJ-Health]->PEData read successfully from child device #419
    05:45:11:0441:[SDJ-Health]->PEData read successfully from child device #420
    05:45:11:0550:[SDJ-Health]->PEData read successfully from child device #421
    05:45:11:0653:[SDJ-Health]->PEData read successfully from child device #422
    05:45:11:2501:[SDJ-Health]->Found existing battery database.
    05:45:13:6888:[SDJ-Health]->Polling devices started.
    05:45:13:6926:[SDJ-Health]->Activity Checking stopped.
    05:45:13:9162:[SDJ-Health]->Read Exclusion List from INI adding 0 devices.
    05:45:13:9207:[SDJ-Health]->GeneralHealthTimer turned off as no interfaces set to be checked.
    05:45:20:7223:[SDJ-Health]->Z-Wave Device #175 polled succesfully.
    05:45:20:7238:[SDJ-Health]->Polled Device #174 added to message queue for processing.
    05:45:35:2509:[Z-Wave]->Starting Z-Wave Polling for Network ECECBAE4...
    Writing events, serializing start...

    Leave a comment:


  • Could not load...'Newtonsoft.Json, Version=12.0.0.0...PublicKeyToken=30ad4fe6b2a6aeed

    Hi Steve,

    I have noticed this in my startup log:

    09:59:58:1529:[Z-Wave]->********************************************************* ** ********************
    09:59:58:1536:[Z-Wave]-> STARTUP COMPLETE: All configured interfaces were successfully initialized.
    09:59:58:1541:[Z-Wave]->********************************************************* ** ********************
    09:59:59:2709:[SDJ-Health]->PEData read successfully from child device #246
    09:59:59:2832:[SDJ-Health]->PEData read successfully from child device #247
    09:59:59:2922:[SDJ-Health]->PEData read successfully from child device #248
    09:59:59:3052:[SDJ-Health]->PEData read successfully from child device #249
    09:59:59:3152:[SDJ-Health]->PEData read successfully from child device #250
    09:59:59:3227:[SDJ-Health]->PEData read successfully from child device #415
    09:59:59:3310:[SDJ-Health]->PEData read successfully from child device #416
    09:59:59:3406:[SDJ-Health]->PEData read successfully from child device #417
    09:59:59:3483:[SDJ-Health]->PEData read successfully from child device #418
    09:59:59:3557:[SDJ-Health]->PEData read successfully from child device #419
    09:59:59:3629:[SDJ-Health]->PEData read successfully from child device #420
    09:59:59:3724:[SDJ-Health]->PEData read successfully from child device #421
    09:59:59:3818:[SDJ-Health]->PEData read successfully from child device #422
    09:59:59:5410:[SDJ-Health]->Found existing battery database.
    Can't find custom attr constructor image: /usr/local/HomeSeer/Scheduler.dll mtoken: 0x0a0000c0 due to: Could not load file or assembly 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies.
    10:00:01:4991:[SDJ-Health]->Polling devices started.
    10:00:01:5029:[SDJ-Health]->Activity Checking stopped.
    10:00:01:7286:[SDJ-Health]->Read Exclusion List from INI adding 0 devices.
    10:00:01:7344:[SDJ-Health]->GeneralHealthTimer turned off as no interfaces set to be checked.
    10:00:08:5541:[SDJ-Health]->Z-Wave Device #175 polled succesfully.
    10:00:08:5553:[SDJ-Health]->Polled Device #174 added to message queue for processing.
    10:00:23:4783:[Z-Wave]->Starting Z-Wave Polling for Network ECECBAE4...

    It would appear to be an issue in HSPI_SDJHealth.exe.config &/or bin/SDJ-Health:
    Code:
    [I]HSPI_SDJHealth.exe.config[/I]
    <?xml version="1.0"?>
    <configuration>
    <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    [B]<probing privatePath="bin/SDJ-Health"/>[/B]
    </assemblyBinding>
    </runtime>
    <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    </startup>
    </configuration>
    Code:
    root@Debian10:/usr/local/HomeSeer# [B]ls -al bin/SDJ-Health[/B]
    total 280
    drwxr-xr-x 2 root root 4096 Jun 19 09:57 .
    drwxr-xr-x 15 root root 4096 Apr 16 07:48 ..
    -rw-r--r-- 1 root root 277504 Apr 2 2017 System.Data.SQLite.dll
    root@Debian10:/usr/local/HomeSeer#
    Should the probing path be modified similar to HSPI_JowiHue.exe.config...
    Code:
    <?xml version="1.0"?>
    <configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    </startup>
    <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    [B]<probing privatePath="bin/JowiHue;bin;bin/homeseer"/>[/B]
    <dependentAssembly>
    [B]<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
    <bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0"/>[/B]
    </dependentAssembly>
    </assemblyBinding>
    </runtime>
    
    </configuration>
    or should there be a special Newtonsoft.Json.dll in bin/SDJ-Health?
    Code:
    root@Debian10:/usr/local/HomeSeer/bin# find . -type f -name Newton*
    ./Z-Wave/Newtonsoft.Json.dll
    ./AmbientWeather/Newtonsoft.Json.xml
    ./AmbientWeather/Newtonsoft.Json.dll
    ./EventEnabler/Newtonsoft.Json.dll
    ./homeseer/Newtonsoft.Json.Schema.dll
    ./homeseer/Newtonsoft.Json.xml
    ./homeseer/Newtonsoft.Json.dll
    ./JowiHue/Newtonsoft.Json.dll

    Date/time=2020-06-19 10:20:10 AM PDT
    Version=HS4 Pro Edition 4.0.9.0 (Linux)
    License=Registered
    Uptime=0 Days 0 Hours 0 Minutes 0 Seconds
    Lan IP=192.168.1.103 (Debian10)
    Device Count=150
    Event Count=53
    Plugins Enabled=Pushover 3P:,SDJ-Health:,Insteon:,drhsEventEnabler:,Z-Wave:,mcsMQTT:
    Modules/Threads=73 Modules, 28 Threads
    Available Threads=396
    HomeSeer Memory Used=88 Mbytes
Working...
X