Local nerdpacks failed to load in my local

I’m getting this message when I’m lunching the url where as my team mate can run it locally. Is that the issue with my Account? Initially I have created one account with my Email Id [redacted] later My Organization created ESI-PROD and ESI-NONPROD account with the same id. Please delete the account which is not associated with any channel.

Local nerdpacks failed to load

You requested to load local nerdpacks for development through a query parameter, however we could not find a local server working on your machine.

Make sure you have got it working by running nr1 nerdpack:serve on your nerdpack, then reload the page. For further information, please proceed to the Development Center.

SIDs: dbe2948b50a219802ae954cd9b4f1c55.nr-local.net

Hey @SSantra

when you run a nerdpack locally, you do so from a specific CLI profile

You can set the default profile to use with:

nr1 profiles:default 

You will need to be logged into the New Relic UI via the account that matches that profile.

For me I only have one profile available:

So I would need to log in to my personal account Ryan Veitch Testing Account with the ?nerdpacks=local URL parameter before I can see that locally running app.

Can you double check that you are indeed logged into the right New Relic profile that matches the CLI profile?

@RyanVeitch From Newrelic UI I have logged in with my email id [redacted] and see here is the screen shot.
account

And here is the screen shot when I’m executing this command nr1 profiles:default.
account2 .
When I’m running nr1 nerdpack:serve and trying to access the generated url getting bellow errors:
Error

Please help me to resolve the issue.

Can you share anything that is shown in your browser console? JS errors or anything else that can help us identify the issue?

@RyanVeitch here is console log when I’m accessing the generated url (https://one.newrelic.com/?nerdpacks=local)

GET https://staging-bam.nr-data.net/1/0986481b53?a=3164801&sa=1&v=1177.96a4d39&t=Unnamed%20Transaction&rst=2623&ck=1&ref=https://one.newrelic.com/&be=711&fe=2138&dc=2106&af=err,xhr,stn,ins,spa&perf={"timing":{"of":1601549788588,"n":0,"f":1,"dn":1,"dne":1,"c":90,"s":103,"ce":203,"rq":203,"rp":409,"rpe":413,"dl":433,"di":2104,"ds":2105,"de":2105,"dc":2137,"l":2137,"le":2243},"navigation":{}}&fp=1013&fcp=1013&ja={"platformVersion":"2.87.1","grandCentralRelease":"pullrequest-2335-prod","userId":3000566,"url":"https://one.newrelic.com/%3Fnerdpacks%3Dlocal","urlLength":41,"routePath":"","routeDepth":0,"email":"SSantra@express-scripts.com","customer_user_id":3000566,"tessenVersionNumber":"1.2.2","guid":"b90685b6-42ac-481a-ba1b-1fab8c41d95d"}&jsonp=NREUM.setToken net::ERR_ABORTED 403 (Forbidden)

Access to fetch at ‘https://dbe2948b50a219802ae954cd9b4f1c55.nr-local.net:9973/nerdlets’ from origin ‘https://one.newrelic.com’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.

GET https://dbe2948b50a219802ae954cd9b4f1c55.nr-local.net:9973/nerdlets net::ERR_FAILED

Access to fetch at ‘https://dbe2948b50a219802ae954cd9b4f1c55.nr-local.net:5000/nerdlets’ from origin ‘https://one.newrelic.com’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.

GET https://dbe2948b50a219802ae954cd9b4f1c55.nr-local.net:5000/nerdlets net::ERR_FAILED

I’m surprised to see CORS errors. I don’t get those when testing locally, which I’ve just done

Can we start fresh so we have a solid understanding of the state of this nerdpack to help troubleshooting?

By that I mean, let’s get back to the beginning by

  1. cd your/nerdpack/directory

  2. nr1 nerdpacks:uuid -gf

  3. npm install

  4. nr1 nerdpack:serve OR npm start

  5. Log in to New Relic in a new browser, or incognito window, to check that any browser extensions or cache aren’t getting in the way

@RyanVeitch I have tried as mentioned by you, In chrome I’m getting same error " Local nerdpacks failed to load" and console having same error. Tried in incognito mode in chrome having same errors.
In Edge and IE when I’m trying to access the url, after login with my Email Id the page is loading ,nothing is coming.

I’m struggling to think of what could possibly be going on here to interrupt your ability to locally serve nerdpacks. I’m going to tag in @mfrederick & @dgolden who may have some thoughts on this

@RyanVeitch Is that the issue with my Account? Initially I have created one account with my official Email Id later My Organization created ESI-PROD and ESI-NONPROD account with the same id .

Accounts shouldn’t make a difference here. So long as the API key used to create the CLI profile is one which matches the user you are logging in as.

@RyanVeitch any update on this. I’m really stack here. Please help me to resolve this.

Hi @SSantra Sorry to hear you’re having trouble. Typically when we see CORS issues like this it means one of the following

  1. Your local development environment isn’t running (or there’s a port conflict)
  2. Your local SSL cert required for running the Nerdpacks locally, which is installed via the CLI, is not present, outdated, or corrupt
  3. There is a proxy/firewall settings that is preventing your browser from reaching <sub-domain>.nr-local.net or *.nr-ext-net`, which is where we serve-up the local content

Presumably your local dev environment is started and running with nr1 nerdpack:serve so I’d like to troubleshoot #3 with you.

First we need to find the sub-domain the CLI is using for you, this looks similar (it’s a UUID), but is different from the Nerdpack UUID. It occasionally will change to.

Can you start the server, and visit either https://dbe2948b50a219802ae954cd9b4f1c55.nr-local.net:9973/nerdlets or if you’re getting errors about a different sub-domain, replace/update dbe2948b50a219802ae954cd9b4f1c55 with the one you’re currently getting errors for?

You should get some JSON back that looks similar to this in structure:

{
  "packages": [
    {
      "EXPERIMENTAL_external": true,
      "id": "b4736d5c-dee1-4987-aaa7-c2f164b86881",
      "displayName": "GitHub Integration",
      "version": "0.6.4",
      "cliVersion": "1.22.1",
      "sdkVersion": 2,
      "description": "Create more context to your entities by having access to the GitHub repository, contributors and README.",
      "icon": "//cd12749b63ac3b8fbc6b81ee821d5ecc.nr-local.net:9973/b4736d5c-dee1-4987-aaa7-c2f164b86881.png",
      "artifacts": [
        {
          "schema": {
            "schemaType": "NERDLET",
            "id": "b4736d5c-dee1-4987-aaa7-c2f164b86881.github",
            "displayName": "GitHub Repo",
            "description": "GitHub integration to give every service its own About Page",
            "entities": [
              {
                "domain": "APM",
                "type": "APPLICATION"
              },
              {
                "domain": "BROWSER",
                "type": "APPLICATION"
              },
              {
                "domain": "MOBILE",
                "type": "APPLICATION"
              }
            ],
            "actionCategory": "troubleshoot",
            "pkgId": "b4736d5c-dee1-4987-aaa7-c2f164b86881",
            "nerdpackId": "b4736d5c-dee1-4987-aaa7-c2f164b86881",
            "artifactId": "github"
          },
          "js": [
            "//cd12749b63ac3b8fbc6b81ee821d5ecc.nr-local.net:9973/vendors~b4736d5c-dee1-4987-aaa7-c2f164b86881--vendors.js",
            "//cd12749b63ac3b8fbc6b81ee821d5ecc.nr-local.net:9973/b4736d5c-dee1-4987-aaa7-c2f164b86881--github.js"
          ],
          "css": [
            "//cd12749b63ac3b8fbc6b81ee821d5ecc.nr-local.net:9973/b4736d5c-dee1-4987-aaa7-c2f164b86881--styles.css"
          ],
          "icon": null
        }
      ]
    }
  ]
}
1 Like