CTKAPPLAUNCHER error with custom Slicer build in Visual Studio

I am getting failures with a custom Slicer application that Kitware had helped us develop 3 years ago. Most of the projects build fine. The issue is with the CTKAPPLAUNCHER project.

From what I can tell, it appears to have to do with a failure to download CTKAppLauncher-0.1.14-win-i386.tar.gz from packages.kitware.com. This used to work fine. This application is built in Visual Studio 2013 Community Edition.

Here’s the relevant build output:
InitializeBuildStatus:
Touching “x64\Release\CTKAPPLAUNCHER\CTKAPPLAUNCHER.tlog\unsuccessfulbuild”.
CustomBuild:
Building Custom Rule C:/D/SPMTR-rel/Slicer/CMakeLists.txt
CMake does not need to re-run because C:\D\SPMTR-rel\S-bld\CMakeFiles\generate.stamp is up-to-date.
Creating directories for ‘CTKAPPLAUNCHER’
Performing download step (download, verify and extract) for ‘CTKAPPLAUNCHER’
– downloading…
src=‘http://packages.kitware.com/api/rest?method=midas.item.download&id=7565&dummy=CTKAppLauncher-0.1.14-win-i386.tar.gz
dst=‘C:/D/SPMTR-rel/S-bld/CTKAPPLAUNCHER-prefix/src/method=midas.item.download&id=7565&dummy=CTKAppLauncher-0.1.14-win-i386.tar.gz’
timeout=‘none’
– [download 100% complete]
CMake Error at CTKAPPLAUNCHER-prefix/src/CTKAPPLAUNCHER-stamp/download-CTKAPPLAUNCHER.cmake:27 (message):
CUSTOMBUILD : error : downloading [C:\D\SPMTR-rel\S-bld\CTKAPPLAUNCHER.vcxproj]
http://packages.kitware.com/api/rest?method=midas.item.download&id=7565&dummy=CTKAppLauncher-0.1.14-win-i386.tar.gz
failed

    status_code: 22
    status_string: "HTTP response code said error"
    log: timeout on name lookup is not supported

  Hostname was NOT found in DNS cache

    Trying 66.194.253.18...

  Connected to packages.kitware.com (66.194.253.18) port 80 (#0)

  GET
  /api/rest?method=midas.item.download&id=7565&dummy=CTKAppLauncher-0.1.14-win-i386.tar.gz
  HTTP/1.1


  User-Agent: curl/7.38.0


  Host: packages.kitware.com


  Accept: */*


  


  HTTP/1.1 301 Moved Permanently


  Date: Mon, 02 Mar 2020 21:28:05 GMT


  Server Apache is not blacklisted

  Server: Apache


  X-Frame-Options: SAMEORIGIN


  Location:
  https://packages.kitware.com/api/rest?method=midas.item.download&id=7565&dummy=CTKAppLauncher-0.1.14-win-i386.tar.gz



  Content-Length: 332


  Content-Type: text/html; charset=iso-8859-1


  


  Ignoring the response-body

  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

  <html><head>

  <title>301 Moved Permanently</title>

  </head><body>

  <h1>Moved Permanently</h1>

  <p>The document has moved <a
  href="https://packages.kitware.com/api/rest?method=midas.item.download&amp;id=7565&amp;dummy=CTKAppLauncher-0.1.14-win-i386.tar.gz">here</a>.</p>


  </body></html>

  Connection #0 to host packages.kitware.com left intact

  Issue another request to this URL:
  'https://packages.kitware.com/api/rest?method=midas.item.download&id=7565&dummy=CTKAppLauncher-0.1.14-win-i386.tar.gz'


  Found bundle for host packages.kitware.com: 0x2677a30

  timeout on name lookup is not supported

  Hostname was NOT found in DNS cache

    Trying 66.194.253.18...

  Connected to packages.kitware.com (66.194.253.18) port 443 (#1)

  schannel: SSL/TLS connection with packages.kitware.com port 443 (step 1/3)

  schannel: disable server certificate revocation checks

  schannel: sending initial handshake data: sending 176 bytes...

  schannel: sent initial handshake data: sent 176 bytes

  schannel: SSL/TLS connection with packages.kitware.com port 443 (step 2/3)

  schannel: failed to receive handshake, need more data

  schannel: SSL/TLS connection with packages.kitware.com port 443 (step 2/3)

  schannel: encrypted data buffer: offset 2988 length 4096

  schannel: sending next handshake data: sending 126 bytes...

  schannel: SSL/TLS connection with packages.kitware.com port 443 (step 2/3)

  schannel: encrypted data buffer: offset 274 length 4096

  schannel: SSL/TLS handshake complete

  schannel: SSL/TLS connection with packages.kitware.com port 443 (step 3/3)

  schannel: incremented credential handle refcount = 1

  schannel: stored credential handle in session cache

  GET
  /api/rest?method=midas.item.download&id=7565&dummy=CTKAppLauncher-0.1.14-win-i386.tar.gz
  HTTP/1.1


  User-Agent: curl/7.38.0


  Host: packages.kitware.com


  Accept: */*

  schannel: client wants to read 16384 bytes

  schannel: encrypted data buffer: offset 0 length 16384

  schannel: encrypted data got 521

  schannel: encrypted data buffer: offset 521 length 16384

  schannel: decrypted data length: 492

  schannel: decrypted data added: 492

  schannel: decrypted data cached: offset 492 length 16384

  schannel: decrypted data buffer: offset 492 length 16384

  schannel: decrypted data returned 492

  schannel: decrypted data buffer: offset 0 length 16384

CUSTOMBUILD : The requested URL returned error : 403 Forbidden [C:\D\SPMTR-rel\S-bld\CTKAPPLAUNCHER.vcxproj]

  Closing connection 1

  schannel: shutting down SSL/TLS connection with packages.kitware.com port
  443

  schannel: clear security context handle

  schannel: decremented credential handle refcount = 0

Done Building Project “C:\D\SPMTR-rel\S-bld\CTKAPPLAUNCHER.vcxproj” (default targets) – FAILED.

Hi:

I am looking at this and will get back to you.

Sam,
I have been looking into this too - just trying to get it to build to make some progress. This is what I have discovered so far.

  • The issue is with the CTKAPPLAUNCHER project

  • CTKAPPLAUNCHER-prefix\src\CTKAPPLAUNCHER-stamp\download-CTKAPPLAUNCHER.cmake is where the issue originates. There is a file download command here:

file(DOWNLOAD
  "http://packages.kitware.com/api/rest?method=midas.item.download&id=7565&dummy=CTKAppLauncher-0.1.14-win-i386.tar.gz"
  "C:/W/SPMTR-rel/S-bld/CTKAPPLAUNCHER-prefix/src/method=midas.item.download&id=7565&dummy=CTKAppLauncher-0.1.14-win-i386.tar.gz"
  SHOW_PROGRESS
  # no TIMEOUT
  STATUS status
  LOG log)
  • This download fails - apparently this tar.gz file does not exist on packages.kitware.com any more.

  • I was able to find this tar.gz file at: https://github.com/commontk/AppLauncher/releases/tag/v0.1.14

  • I downloaded this file.

  • I then modified the following files to use this downloaded file instead:
    download-CTKAPPLAUNCHER.cmake
    verify-CTKAPPLAUNCHER.cmake
    extract-CTKAPPLAUNCHER.cmake
    This hack appears to at least successfully build CTKAPPLAUNCHER

Just wanted to share this with you.

Regards,
Arun

PS: JC was our principal consultant at Kitware when we worked on this about 3 years back. So he might be worth asking. We had a contract with Kitware for this work.