Announcement

Collapse

Contacting HomeSeer This Week

HomeSeer is open and operational this week. All orders are being processed and shipped as usual. However, some staff are working from home. If you need to contact HomeSeer for support or customer service, please use our Email or Chat options. https://homeseer.com/contact-us/
See more
See less

Help with Newtonsoft.Json error

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

  • XboxMeister
    replied
    Hmmm, that is interesting. I notice the supportedRuntime part didn't get moved. Wondering if that is somehow causing an issue. I will have to experiment a bit with that file to see why that would matter. It is generated by Visual Studio when the plug-in is built.

    Really glad you got it going. I was pretty much stumped as to what the problem was as I have no direct control over loading that DLL other than invoking functions it contains.


    Update: the supportedRuntime part shouldn't matter and appears to not be valid directly under the <configuration> node anyway. Not sure why this was required but will investigate more and update my exe.config to do this moving forward. There is a note about the Newtonsoft DLL and setting up the probing privatepath for HS developers but it doesn't call out where in the XML file to locate the statement. Perhaps it is required under both <startup> and <configuration>.

    Leave a comment:


  • FastFreddi
    replied
    Ok got it to work. Modified the config file. Moved the probing path stuff to the start of the file.

    Code:
    <?xml version="1.0"?>
    <configuration>
     <runtime>
          <loadFromRemoteSources enabled="true" />
       <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
             <probing privatePath="bin/TankUtil" />
       </assemblyBinding>
        </runtime>
      <system.diagnostics>
        <sources>
          <!-- This section defines the logging configuration for My.Application.Log -->
          <source name="DefaultSource" switchName="DefaultSwitch">
            <listeners>
              <add name="FileLog"/>
              <!-- Uncomment the below section to write to the Application Event Log -->
              <!--<add name="EventLog"/>-->
            </listeners>
          </source>
        </sources>
        <switches>
          <add name="DefaultSwitch" value="Information"/>
        </switches>
        <sharedListeners>
          <add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" initializeData="FileLogWriter"/>
          <!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log -->
          <!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
        </sharedListeners>
      </system.diagnostics>
      <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
      </startup>
    </configuration>

    Leave a comment:


  • FastFreddi
    replied
    Ok restarted HS3 with admin privilege and recopied file and got it to install. Unfortunately, the JSON DLL error persists.

    Leave a comment:


  • XboxMeister
    replied
    I'm assuming you put it in the Updates3\Zips folder? Looks like it isn't finding it at all vs. a problem with the archive.

    Leave a comment:


  • FastFreddi
    replied
    It won't install
    Mar-12 16:41:05 Updater Install/Update of package Tank Utility failed.
    Mar-12 16:41:05 Updater Error Installation of package Tank Utility failed. The installation file 'HSPI_TankUtil_3-0-0-1.zip' does not exist. Please retry download.
    Mar-12 16:41:05 Updater Installing package Tank Utility
    Mar-12 16:41:05 Updater Using local file: HSPI_TankUtil_3-0-0-1.zip
    Mar-12 16:41:05 Updater Downloading update: Tank Utility
    Mar-12 16:41:05 Updater Starting download of updates

    Leave a comment:


  • XboxMeister
    replied
    OK, thanks for the feedback guys. I will go update my install.txt for future releases so it doesn't have that flag set. I'll double check obviously that it seems to work without it but I am sure you guys are correct about it. I've attached an updated version in a zip and an updater override file to see if that helps the OP. The only change from what the regular updater has is that I've changed the install.txt file to not do the regsvr32 on the JSON DLL.

    To use it I would:

    1) Disable and delete the TankUtility instance and plug-in in the Manage Plug-in screen. This should delete HSPI_TankUtil.exe in the HS3 root directory but you should double check it is gone.
    2) Delete all the TankUtility devices in HS3. The new plugin will rebuild them all anyway so better to start clean.
    2) Shut down HS3
    3) Delete the TankUtil INI files from the config folder
    4) Delete the bin/TankUtil folder (including the JSON DLL it contains)
    5) Put the updater_override.txt in the HS3 root.
    6) Put the zip archive in Updates3\Zips folder
    7) Restart HS3
    8) Go to Plugins->Manage and click on the Refresh button so it finds the updater_override.txt file and install the package.

    You will need to enter your credentials again in the Config page of course.

    Let me know if that resolves the error for finding the JSON DLL.
    Last edited by XboxMeister; March 13th, 2019, 03:53 PM. Reason: I removed the test attachments as they didn't solve the issue.

    Leave a comment:


  • bsobel
    replied
    Originally posted by XboxMeister View Post

    Yes, Updater docs are not super helpful about whether that is required. They only say "The file is an OCX or DLL file and needs to be registered using regsvr32." but no context as to when that will be needed or not. I figured it was safer to just let it do a regsvr32. Doesn't seem to be an issue on my Windows HS3 box but I can't say for certain that it isn't somehow causing the behavior he is seeing.

    When you say no others have 1 but are always 0, do you mean for the Newtonsoft JSON DLL?

    I can provide a zip and updater override file to see if it matters for this problem. Easy enough to do on my end.
    You don't need that. It is used when the file is a real OCX and calls the dllregister function. The install may fail on Windows (perhaps) if that is specified. I installed on Mono who doesn't have that same concept so never saw this...

    Leave a comment:


  • zwolfpack
    replied
    Originally posted by XboxMeister View Post


    When you say no others have 1 but are always 0, do you mean for the Newtonsoft JSON DLL?
    For any file - yours is the only one that has that flag.

    Leave a comment:


  • XboxMeister
    replied
    Originally posted by zwolfpack View Post
    Don't know if this is is at all significant - re your install.txt line

    Newtonsoft.Json.dll,.\bin\TankUtil,1

    No other install.txt's have the "1" flag, they are always "0".
    Yes, Updater docs are not super helpful about whether that is required. They only say "The file is an OCX or DLL file and needs to be registered using regsvr32." but no context as to when that will be needed or not. I figured it was safer to just let it do a regsvr32. Doesn't seem to be an issue on my Windows HS3 box but I can't say for certain that it isn't somehow causing the behavior he is seeing.

    When you say no others have 1 but are always 0, do you mean for the Newtonsoft JSON DLL?

    I can provide a zip and updater override file to see if it matters for this problem. Easy enough to do on my end.

    Leave a comment:


  • zwolfpack
    replied
    Don't know if this is is at all significant - re your install.txt line

    Newtonsoft.Json.dll,.\bin\TankUtil,1

    No other install.txt's have the "1" flag, they are always "0".

    Leave a comment:


  • XboxMeister
    replied
    Originally posted by FastFreddi View Post
    I have .NET framework version 4.7 installed. I've disabled all plugins that have a private JSON DLL with the exception of z-wave and I've updated to HS3 3.0.0.500 then reboot and still get this error.
    Strange. Everything sounds like it is correct. I tried the clean install 3 more times last night and every time it came up without a problem. Not sure what the issue is at this point. I wasn't looking for you to disable the other PI's that use the JSON DLL but rather verify that they were all working correctly for you even though mine wasn't. That would help eliminate things going on in the overall system as a cause.

    Do you have the file HSPI_TankUtil.exe.config in your HS3 root directory after the install? That has the reference in it ( <probing privatePath="bin/TankUtil" />) for where to search for the JSON DLL for the TU plugin. If that isn't there for whatever reason, that would certainly be an issue. After I do an install, it is left in the root of the HS3 install directory.

    Leave a comment:


  • Grundcm
    replied
    Following up: I know it was a different Plug-In, but I was able to fix my problem by removing and reinstalling the Plug-In. I was pretty thorough in making sure all the files associated with the plug-in were removed and all the devices it created were gone before reinstalling. The only thing I did differently is use Chrome to download the install file instead of Microsoft Edge. I know it shouldn't make a difference but..

    Hope this helps

    Leave a comment:


  • FastFreddi
    replied
    I have .NET framework version 4.7 installed. I've disabled all plugins that have a private JSON DLL with the exception of z-wave and I've updated to HS3 3.0.0.500 then reboot and still get this error.

    Leave a comment:


  • XboxMeister
    replied
    Originally posted by FastFreddi View Post
    Reboot had no effect
    Hmmmm, I cleared my Windows HS3 machine (deleted the plug-in EXE, deleted the bin/TankUtil folder and files, deleted the TankUtil.ini files in Config, …. I restarted HS3 and then took the download from Updater. After putting my TU account info in, I got the devices and all the data with no warnings about not being able to load the JSON DLL. This is running HS3 3.0.0.500 (note I tried it on the 4xx builds before releasing it so I don't think v500 has anything to do with it) and Win10 Pro (build 10.0.17134) so the config should be very similar to yours.

    Do you know what version of .NET runtime is installed on the system? Do you have other plug-ins that have a version of the JSON DLL installed in a private directory as well? (trying to figure out if it is something to do with how the TU plug-in got installed or if it is any PI using the Newtonsoft DLL).

    Leave a comment:


  • FastFreddi
    replied
    Reboot had no effect

    Leave a comment:

Working...
X