SystemLink Forum

cancel
Showing results for 
Search instead for 
Did you mean: 

API for package deployment/upgrade

Solved!
Go to solution

After addressing some issues regarding systemlink server proxy configuration, we are now in a slightly better place.

 

I was still unsuccessful in my attempt to install a specific version of the ni certificates package

[
   [
      {
         "__kwarg__": true,
         "pkgs": [
            {
               "ni-certificates": "2.0.3.49152-0+f0"
            }
         ],
         "refresh": true
      }
   ],
   []
]
errors:
- Unable to locate package 'ni-certificates (= 2.0.3.49152-0+f0)' with a compatible version and architecture.
", null ]

 But when I tried doing a simple "upgrade", it worked:

[
   [
      {
         "__kwarg__": true,
         "pkgs": [
            "ni-certificates"
         ],
         "refresh": true
      }
   ],
   []
]
[
   {
      "changes": {
         "ni-labview-2019-runtime-engine-x86": {
            "old": "19.1.1.49152-0+f0",
            "new": "19.1.2.49153-0+f1"
         },
         "ni-traceengine": {
            "old": "19.0.0.49152-0+f0",
            "new": "20.0.0.49152-0+f0"
         },
         "ni-certificates": {
            "old": "2.0.2.49152-0+f0",
            "new": "2.0.3.49152-0+f0"
         }
      },
      "result": true,
      "comment": ""
   },
   null
]

 So, it did seem to find the exact version I attempted to install explicitly, but only when I performed an implicit upgrade. Could my argument syntax be incorrect?

0 Kudos
Message 11 of 16
(1,359 Views)

Your syntax looks correct to me.  I guess the one difference between what you have and what I'm using is that I don't have a space after the colon before the double quote with the version.

 

You may also want to double check that all of the characters are correct and that your os hasn't auto corrected any of the quotes or dashes to other characters.  Typically, not an issue if you type it using a text editor like Visual Studio Code, but I have had issues in the past when coping text from a web browser in some cases with it converting to em dashes and open double quotes.

0 Kudos
Message 12 of 16
(1,356 Views)

You also seem to have a strange [] in what you posted, but I would have expected that to error out differently. Try changing from

[
   [
      {
         "__kwarg__": true,
         "pkgs": [
            {
               "ni-certificates": "2.0.3.49152-0+f0"
            }
         ],
         "refresh": true
      }
   ],
   []
]

 

To

[
   [
      {
         "__kwarg__": true,
         "pkgs": [
            {
               "ni-certificates":"2.0.3.49152-0+f0"
            }
         ],
         "refresh": true
      }
   ]
],

 

0 Kudos
Message 13 of 16
(1,353 Views)

The extra brackets in the arguments field are not present in what I am actually sending, but they show up in the systemlink UI. So that might just be a Systemlink UI bug.

 

I also tried doing an install of a package onto a system that did not yet have it installed. I've tried it twice now, and both times, it just takes the full specified timeout (600 seconds), adn then reports a status of "Failed (-2147220448)" with nothing included in the "detailed results" section.

0 Kudos
Message 14 of 16
(1,351 Views)

Does it work if you use the SystemLink web interface or is this only an issue with the API?  One trick you can do if it works form the web interface is open the Chrome Developer Tools and then from the Network tab look at the request the web interface is making to the API. Note if you click "view source" from the Chrome debug tool it will show you the raw JSON that is passed to the API.

 

Screen Shot 2020-11-05 at 9.10.32 AM.png

0 Kudos
Message 15 of 16
(1,344 Views)
Solution
Accepted by topic author TurboPhil

For anyone who stumbles on this thread, the root cause of the issues was apparently because we were leveraging a proxy for connecting our client systems out to the greater internet. We had to go in and update some settings with Systemlink and NI Package Manager such they those processes were also proxying correctly.

 

Since doing so, the API calls are now working.

 

NI is aware of the issues regarding proxy configuration, and hopefully the next round of updates to Systemlink and NI Package Manager tools will better handle these sorts of configuration (or at least provide more meaningful error messages to help identify the problems).

Message 16 of 16
(1,293 Views)