SMART on FHIR - Growth Chart App - Unable to run in my local machine

871 views
Skip to first unread message

Ram Mittala

unread,
Mar 2, 2017, 9:31:22 AM3/2/17
to SMART on FHIR
Hi,

I have downloaded the SMART on FHIR  - Growth  Chart APP from Git Hub repository (https://github.com/smart-on-fhir/growth-chart-app) and followed the instructions in GIT HUB. However, I am not able to run the app in my local and

Getting the following error.

 

Can you pls help me / suggest me to fix this issue and run the app in my local ?

  

Here is Log :

Microsoft Windows [Version 10.0.10586]

(c) 2015 Microsoft Corporation. All rights reserved.

 

C:\Users\212579350>node -version

node: bad option: -version

 

C:\Users\212579350>node --version

v7.7.1


 

C:\Users\212579350\Desktop\growth-chart-app-master>npm install

npm WARN growt...@0.1.0 No repository field.

npm WARN growt...@0.1.0 No license field.

 

C:\Users\212579350\Desktop\growth-chart-app-master>npm run serve

 

> growt...@0.1.0 serve C:\Users\212579350\Desktop\growth-chart-app-master

> ./node_modules/http-server/bin/http-server -p 8000 -c-1 .

 

'.' is not recognized as an internal or external command,

operable program or batch file.

 

npm ERR! Windows_NT 10.0.10586

npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "serve"

npm ERR! node v7.7.1

npm ERR! npm  v4.1.2

npm ERR! code ELIFECYCLE

npm ERR! growt...@0.1.0 serve: `./node_modules/http-server/bin/http-server -p 8000 -c-1 .`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the growt...@0.1.0 serve script './node_modules/http-server/bin/http-server -p 8000 -c-1 .'.

npm ERR! Make sure you have the latest version of node.js and npm installed.

npm ERR! If you do, this is most likely a problem with the growthchart package,

npm ERR! not with npm itself.

npm ERR! Tell the author that this fails on your system:

npm ERR!     ./node_modules/http-server/bin/http-server -p 8000 -c-1 .

npm ERR! You can get information on how to open an issue for this project with:

npm ERR!     npm bugs growthchart

npm ERR! Or if that isn't available, you can get their info via:

npm ERR!     npm owner ls growthchart

npm ERR! There is likely additional logging output above.

 

npm ERR! Please include the following file with any support request:

npm ERR!     C:\Users\212579350\Desktop\growth-chart-app-master\npm-debug.log

Nikolai Schwertner

unread,
Mar 3, 2017, 9:41:37 AM3/3/17
to smart-...@googlegroups.com
I was able to reproduce your problem on Windows. The problem is that the http-server package contains a linux shell script which simply won't run in the standard Windows shell (unless you install a linux shell of sorts). A workaround that worked for me was to intall http-server globally and then run it directly by:

    1. Open a command prompt with admin privileges
    2. Execute "npm install -g http-server"
    3. Run "http-server -p 8000 -c-1 ." in the directory of the app

In any case, all that http-server does is serve the contents of the app directory on port 8000. You can get the same behavior with any other HTTP server of your choice.

-Nikolai
--
You received this message because you are subscribed to the Google Groups "SMART on FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smart-on-fhi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Ram Mittala

unread,
Mar 3, 2017, 10:28:56 AM3/3/17
to SMART on FHIR
Thanks for your reply,

I am able to start the server with your suggesting. However, Now I can see only Loading error message.

Console log:

Loading error Arguments[1]0: "No 'state' parameter found in authorization response."callee: onError()length: 1Symbol(Symbol.iterator): values()__proto__: Object
gc-app.js:837 Failed.

Regards
Ram Mittala

Nikolai Schwertner

unread,
Mar 3, 2017, 11:45:51 AM3/3/17
to smart-...@googlegroups.com
Which SMART on FHIR server are you trying the app against?

Ram Mittala

unread,
Mar 3, 2017, 4:06:31 PM3/3/17
to SMART on FHIR
Hi Nikolai,

I haven't changed the FHIR Server URL. Should it be default one in the Growth Chart product?

Do I need to update any configuration JS to change the FHIR Server? 


Regards
RAM

Travis Cummings

unread,
Mar 8, 2017, 3:04:53 PM3/8/17
to SMART on FHIR
How are you launching the Growth Chart?  It does need to be launched using the SMART on FHIR launch flow (ex: launched from sandbox.smarthealthit.org or similar).

Ram Mittala

unread,
Mar 24, 2017, 7:27:09 PM3/24/17
to SMART on FHIR

Thanks Nikolai Schwertner  for your help. 

Now I am able to run in my local and initiate the launch sequence. However I am having following error, can you pls help me ?



Error :
Failed to discover authorization URL given Object {client: Object, response_type: "code", server: "https://localhost:9443/CentricityPracticeFHIRServer/secure-fhir"}


My FHIR Metadata repsone is :

{
  "resourceType": "Conformance",
  "text": {
    "status": "generated"
  },
  "publisher": "Not provided",
  "date": "2017-03-24T16:20:07-07:00",
  "kind": "instance",
  "software": {
    "name": "HAPI FHIR Server",
    "version": "2.1"
  },
  "fhirVersion": "1.0.2",
  "acceptUnknown": "extensions",
  "format": [
    "application/xml+fhir",
    "application/json+fhir"
  ],
  "rest": [
    {
      "mode": "server",
      "security": {
        "extension": [
          {
            "url": "oauth-uris",
            "extension": [
              {
                "url": "token",
              },
              {
                "url": "authorize",
              },
              {
                "url": "register",
              }
            ]
          }
        ],



I am now sure , why grouth chart application is not able to recoginze the authorize url in metadata?

Regards
Ram

Michele Mottini

unread,
Mar 24, 2017, 7:46:32 PM3/24/17
to Ram Mittala, SMART on FHIR
 

  - Michele
  CareEvolution Inc

--
You received this message because you are subscribed to the Google Groups "SMART on FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smart-on-fhir+unsubscribe@googlegroups.com.

Ram Mittala

unread,
Mar 24, 2017, 7:52:09 PM3/24/17
to Michele Mottini, SMART on FHIR
Hi Michele,

I have noticed just now and correct it.


Now metadata is :

{"resourceType":"Conformance","text":{"status":"generated"},"publisher":"Not provided","date":"2017-03-24T16:49:29-07:00","kind":"instance","software":{"name":"HAPI FHIR Server","version":"2.1"},"fhirVersion":"1.0.2","acceptUnknown":"extensions","format":["application/xml+fhir","application/json+fhir"],"rest":[{"mode":"server","security":{"extension":[{"url":"http://fhir-registry.smarthealthit.org/StructureDefinition/oauth-uris","extension":[{"url":"token","valueUri":"https://localhost:9443/CentricityPracticeAPIServer/oauth2/token"},{"url":"authorize","valueUri":"https://localhost:9443/CentricityPracticeAPIServer/oauth2/authorize"},{"url":"register","valueUri":"https://localhost:9443/CentricityPracticeAPIServer/oauth2/registration"}]}],"service":[{"coding":[{"system":"http://hl7.org/fhir/restful-security-service","code":"SMART-on-FHIR","display":"SMART-on-FHIR"}],"text":"SMART-on-FHIR"}]},"resource":[{"type"


Here is the  error log and attached screenshot too.

XMLHttpRequest cannot load https://localhost:9443/CentricityPracticeFHIRServer/secure-fhir/metadata. The 'Access-Control-Allow-Origin' header contains multiple values 'http://127.0.0.1:8000, http://127.0.0.1:8000, *', but only one is allowed. Origin 'http://127.0.0.1:8000' is therefore not allowed access.
fhir-client.js:17202 Failed to discover authorization URL given Object
  1. Access-Control-Allow-Credentials:
    true
  2. Access-Control-Allow-Credentials:
    true
  3. Access-Control-Allow-Origin:
  4. Access-Control-Allow-Origin:
    *
  5. Access-Control-Allow-Origin:
  6. Access-Control-Expose-Headers:
    Content-Location,Location
  7. Access-Control-Expose-Headers:
    Content-Location,Location



Regards
Ram



2017-03-24_16-49-51.png

Michele Mottini

unread,
Mar 24, 2017, 8:00:59 PM3/24/17
to SMART on FHIR
For some reason your Web server is returning every header twice, and this cause CORS to fail.

  - Michele
  CareEvolution Inc

davi...@gmail.com

unread,
Oct 18, 2017, 3:13:12 PM10/18/17
to SMART on FHIR
Hi Ram, I got this error ("No 'state'..) too while running locally. May I know how you solved it? Thank you!

My setting is
launch url:   http://localhost:3000/launch.html 
redirect url:  http://localhost:3000/
Reply all
Reply to author
Forward
0 new messages