<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: `NPM install` integrity check failure on Linux in Splunk AppDynamics</title>
    <link>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723083#M3510</link>
    <description>&lt;P&gt;That would explain it. But then the issue is that the server doing that is incompatible with using a package-lock.json file and deploying on a different platform than the one that a developer develops on... The integrity check will fail every time...&lt;/P&gt;</description>
    <pubDate>Thu, 23 Nov 2017 19:49:42 GMT</pubDate>
    <dc:creator>CommunityUser</dc:creator>
    <dc:date>2017-11-23T19:49:42Z</dc:date>
    <item>
      <title>`NPM install` integrity check failure on Linux</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723081#M3508</link>
      <description>&lt;PRE class="console-output"&gt;integrity checksum failed when using sha1: wanted sha1-SdstUAFQuOSM8Wed69GwsB/wLx8= but got sha1-bocDAWWpWcjMh/14FCG4/eDNOZM=&lt;/PRE&gt;
&lt;P&gt;That is the exact error I get.&lt;/P&gt;
&lt;P&gt;That checksum is from my package-lock.json file&lt;/P&gt;
&lt;DIV style="color: #f8f8f2; background-color: #272822; font-family: Menlo, Monaco, 'Courier New', monospace; font-weight: normal; font-size: 12px; line-height: 18px; white-space: pre;"&gt;
&lt;DIV&gt;&lt;SPAN style="color: #66d9ef; font-style: italic;"&gt;"appdynamics-zmq"&lt;/SPAN&gt;&lt;SPAN style="color: #f8f8f2;"&gt;: {&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="color: #66d9ef; font-style: italic;"&gt;"version"&lt;/SPAN&gt;&lt;SPAN style="color: #f8f8f2;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #cfcfc2;"&gt;"&lt;A href="http://packages.appdynamics.com/nodejs/4.4.1.0/appdynamics-zmq.tgz" target="_blank" rel="nofollow noopener noreferrer"&gt;http://packages.appdynamics.com/nodejs/4.4.1.0/appdynamics-zmq.tgz&lt;/A&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #f8f8f2;"&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="color: #66d9ef; font-style: italic;"&gt;"integrity"&lt;/SPAN&gt;&lt;SPAN style="color: #f8f8f2;"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #cfcfc2;"&gt;"sha1-SdstUAFQuOSM8Wed69GwsB/wLx8="&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="color: #f8f8f2;"&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;

&lt;P&gt;That chechsum was generated on OSX. BUT, it's a file. Its hash should be the same on any platform because it's the same file being downloaded.&lt;/P&gt;

&lt;P&gt;From the NPM documentation (source: &lt;A href="https://docs.npmjs.com/files/package-lock.json" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.npmjs.com/files/package-lock.json&lt;/A&gt;)&lt;/P&gt;

&lt;P&gt;&amp;gt; For remote tarball sources this is an integrity based on a SHA512 of the file.&lt;/P&gt;

&lt;P&gt;Therefore the only explaination that I can think of is that the appDynamics server is serving a different file to my Linux machine than it serves to my OSX machine...&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2017 16:31:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723081#M3508</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2017-11-21T16:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: `NPM install` integrity check failure on Linux</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723082#M3509</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;packages.appdynamics.com&amp;nbsp;serves the file based on the provided user-agent string.&lt;/P&gt;

&lt;P&gt;For additional information see:&amp;nbsp;&lt;A href="https://community.appdynamics.com/t5/Knowledge-Base/Advanced-NPM-Guide-for-the-AppDynamics-Node-js-Agent/ta-p/26743" target="_blank"&gt;https://community.appdynamics.com/t5/Knowledge-Base/Advanced-NPM-Guide-for-the-AppDynamics-Node-js-Agent/ta-p/26743&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 22:41:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723082#M3509</guid>
      <dc:creator>Ray_Waldock</dc:creator>
      <dc:date>2017-11-22T22:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: `NPM install` integrity check failure on Linux</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723083#M3510</link>
      <description>&lt;P&gt;That would explain it. But then the issue is that the server doing that is incompatible with using a package-lock.json file and deploying on a different platform than the one that a developer develops on... The integrity check will fail every time...&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2017 19:49:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723083#M3510</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2017-11-23T19:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: `NPM install` integrity check failure on Linux</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723084#M3511</link>
      <description>&lt;P&gt;Hi Marc,&lt;/P&gt;

&lt;P&gt;That's correct, we currently do not support&amp;nbsp;lockfiles with our install workflow, due to the nature of our native dependencies. One way to deploy AppD if you want to keep using lockfiles would be to install our package once globally for each instrumented machine. This would make the agent available to every app on the machine,&amp;nbsp;without having to worry about whether you copied the right one over from dev/build.&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Kyle&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 18:11:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723084#M3511</guid>
      <dc:creator>Kyle_Furlong</dc:creator>
      <dc:date>2017-11-27T18:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: `NPM install` integrity check failure on Linux</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723085#M3512</link>
      <description>&lt;P&gt;Hi Kyle&lt;/P&gt;

&lt;P&gt;I realise this is an old post, but&amp;nbsp;this issue is causing us all sorts of problems.&lt;/P&gt;

&lt;P&gt;We develop on Mac machines, have our CI running in Linux and Windows and deploy to Windows (Azure).&lt;/P&gt;

&lt;P&gt;Our deployment relies on the package-lock.json file and the appdynamics dependencies are causing us a big headache.&lt;/P&gt;

&lt;P&gt;Is there any way that you could do something similar to the Cylon project who have multi-platform precompiled dependencies? They have &lt;A href="https://cylonjs.com/blog/2014/11/19/creating-multiplatform-precompiled-binaries-for-node-modules/" target="_self" rel="nofollow noopener noreferrer"&gt;documented their process&amp;nbsp;in a fair amount of detail&lt;/A&gt;&amp;nbsp;and&amp;nbsp;a resulting package is &lt;A href="https://github.com/hybridgroup/node-opencv" target="_self" rel="nofollow noopener noreferrer"&gt;node-opencv&lt;/A&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;

&lt;P&gt;Adam&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 15:52:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723085#M3512</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2018-07-16T15:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: `NPM install` integrity check failure on Linux</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723086#M3513</link>
      <description>&lt;P&gt;Hi Adam,&lt;/P&gt;

&lt;P&gt;Thanks for your interest in finding a solution. The package-lock file is definitely one that's been tricky since it came out, but one for which we've found multiple solutions.&lt;/P&gt;

&lt;P&gt;I've skimmed through the Cylon.js post, and it looks like they do something very similar to what we provide, except they leverage node-pre-gyp to automate some of the bookkeeping. In essence both their solution and our solution provide pre-compiled binaries for your particular system by calculating your Node.js version, OS, and architecture, and downloading a pre-built binary at install time.&lt;/P&gt;

&lt;P&gt;As I mentioned in the previous post, a lot of our customers are moving towards thinking about the appdynamics package as a service that is provided on a particular machine, not as an integral dependency in the package.json for a particular app. So the deployment process is about installing the agent globally on a target machine with npm install -g appdynamics. This avoids any package-lock issue, as well as ensuring you have the right binaries for the system. To make this work smoothly, we simply want to add an environment variable gatekeeper so that you can ensure not to call the instrumentation when the package isn't present:&lt;/P&gt;

&lt;PRE&gt;if (process.env.APPD_ENABLED === 'true') {
  require('appdynamics').profile({
    ...
  });
}&lt;/PRE&gt;
&lt;P&gt;What are your thoughts? We can explore other solutions in case this one is out of reach for any reason.&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Kyle&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 16:55:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723086#M3513</guid>
      <dc:creator>Kyle_Furlong</dc:creator>
      <dc:date>2018-07-16T16:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: `NPM install` integrity check failure on Linux</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723087#M3514</link>
      <description>Hi Kyle,&lt;BR /&gt;&lt;BR /&gt;Thanks for getting back so quickly.&lt;BR /&gt;&lt;BR /&gt;I hadn’t thought of putting the appdynamics require behind an environment variable switch — that makes a lot more sense of making it a per-machine installation.&lt;BR /&gt;&lt;BR /&gt;One issue that this leaves outstanding for me is the issue of keeping the appdynamics client versions in sync with the central server. If we upgrade our appdynamics central server, at what point will we need to update the appdynamics clients?&lt;BR /&gt;&lt;BR /&gt;Thank again,&lt;BR /&gt;&lt;BR /&gt;Adam&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Jul 2018 17:02:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723087#M3514</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2018-07-16T17:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: `NPM install` integrity check failure on Linux</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723088#M3515</link>
      <description>&lt;P&gt;Well, so our central server (what we call the controller), typically offers backwards compatibility for agents. Meaning&amp;nbsp;a 4.4.x&amp;nbsp;controller will support any 4.4.x and previous agents. Also! With 4.5 we're relaxing the forward compatibility restriction. 4.5+ agents will now work with any 4.4.x controllers. I would expect this going foward as well.&lt;/P&gt;

&lt;P&gt;Long story short, if you're already on a 4.4 controller, you&amp;nbsp;can and should just use the latest Node.js package.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 17:09:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723088#M3515</guid>
      <dc:creator>Kyle_Furlong</dc:creator>
      <dc:date>2018-07-16T17:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: `NPM install` integrity check failure on Linux</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723089#M3516</link>
      <description>Excellent news. Thank you very much!&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Jul 2018 17:11:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723089#M3516</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2018-07-16T17:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: `NPM install` integrity check failure on Linux</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723090#M3517</link>
      <description>&lt;P&gt;No problem! Don't hesitate to reach out again in case you need anything.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 17:12:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723090#M3517</guid>
      <dc:creator>Kyle_Furlong</dc:creator>
      <dc:date>2018-07-16T17:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: `NPM install` integrity check failure on Linux</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723091#M3518</link>
      <description>Hi again Kyle,&lt;BR /&gt;&lt;BR /&gt;Unfortunately, I’m still having trouble integrating the appdynamics agent into our Azure (Windows) NodeJS app service.&lt;BR /&gt;&lt;BR /&gt;You proposed installing the module globally, but doing this means that the regular node require(…) does not work (see &lt;A href="https://stackoverflow.com/a/15646750" target="_blank" rel="nofollow noopener noreferrer"&gt;https://stackoverflow.com/a/15646750&lt;/A&gt;).&lt;BR /&gt;&lt;BR /&gt;Unfortunately the proposed solution (using NODE_PATH to explicitly tell node of the additional global directory to search) does not work on Azure app services — the environment variable is detected but appears to have no effect.&lt;BR /&gt;&lt;BR /&gt;I have even tried explicitly specifying the entire path but this failed as well — in both cases node says it cannot find the module.&lt;BR /&gt;&lt;BR /&gt;My current guess is that Azure is preventing the app from loading files from outside of its wwwroot directory. Unfortunately this is where all the deployed code lives and there is already a node_modules directory there constructed from the package-json.lock using “npm install”.&lt;BR /&gt;&lt;BR /&gt;So for the moment, I am unable to integrate appdynamics in our Azure app service.&lt;BR /&gt;&lt;BR /&gt;I would really like to see a solution that fits the package-lock.json installation method — perhaps you could look at something similar to the way node-sass has a postinstall script that downloads the dependencies?&lt;BR /&gt;&lt;BR /&gt;Thank you for your help!&lt;BR /&gt;&lt;BR /&gt;Adam&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Jul 2018 10:52:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723091#M3518</guid>
      <dc:creator>CommunityUser</dc:creator>
      <dc:date>2018-07-18T10:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: `NPM install` integrity check failure on Linux</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723092#M3519</link>
      <description>&lt;P&gt;Hi Adam,&lt;/P&gt;

&lt;P&gt;Yikes, Microsoft does like to make our lives difficult... I definitely feel you that having AppD in your normal deployment workflow would be easiest, but unfortunately a re-architecture of our install process is probably not in the cards. It is definitely something we periodically review though—it's possible that as more and more people have end-to-end package-lock deployment workflows we'll opt to take the work on.&lt;/P&gt;

&lt;P&gt;But for us in the mean time it means we need to keep hunting for a better process. If global install on the Azure instances isn't possible, and we have to install into the wwwroot, I wonder, could we use a post-deploy script to install the agent? That way you could have a script that basically changes to the wwwroot directory and runs npm install appdynamics@4.5.0. This same script could set the environment variable. (&lt;A href="https://github.com/projectkudu/kudu/wiki/Post-Deployment-Action-Hooks" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/projectkudu/kudu/wiki/Post-Deployment-Action-Hooks&lt;/A&gt;)&lt;/P&gt;

&lt;P&gt;Another option would be to do this one-off install at build/deploy time in your CI/CD pipeline somewhere, but depending on your environment that may take more effort. In any case, happy to keep working with you to find something that fits your needs!&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Kyle&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 16:15:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723092#M3519</guid>
      <dc:creator>Kyle_Furlong</dc:creator>
      <dc:date>2018-07-19T16:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: `NPM install` integrity check failure on Linux</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723093#M3520</link>
      <description>&lt;P&gt;Just to update this thread, since customers have found it and asked for a resolution, since version 4.5.14 of the node agent, the npm install logic for the AppDynamics agent has changed to bring down the platform dependent components in a post-install script.&lt;/P&gt;&lt;P&gt;This means that package lock should no longer prevent Node apps built on one platform being transported to and executed on a different platform (and hence should also remedy this issue with deployment on the Azure platform)&lt;/P&gt;&lt;P&gt;Warm regards,&lt;/P&gt;&lt;P&gt;Peter.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 21:47:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/NPM-install-integrity-check-failure-on-Linux/m-p/723093#M3520</guid>
      <dc:creator>Peter_Holditch</dc:creator>
      <dc:date>2019-09-17T21:47:14Z</dc:date>
    </item>
  </channel>
</rss>

