-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expressjs example is not working in launch.smarthealthit.org #115
Comments
Thank you for helping me realize that all of my server examples are somehow broken in a similar way (despite being frozen). In my case, it turns out that CodeSandbox is doing some weird routing now, making it impossible to properly resolve relative redirect URLs like "/app" to absolute ones on the same domain (which in turn messes up the cookies and the session). I have that fixed now. As for your case:
|
No problem and thank you for following up. I tried both options:
I tried to look at the Launcher code here (https://github.com/smart-on-fhir/smart-launcher) to find some hints or so but I am still in the find. |
@vlad-ignatov do you have a nodejs example that works fine as "EHR launch" with "Simulate launch within the EHR user interface" checked? |
@vlad-ignatov do you have any update on above issue? We are getting the exact same issue. |
We are trying to use the Expressjs example in here: https://codesandbox.io/s/c0che provided by @vlad-ignatov as a starting point to build a SoF application in our team at Anthem. We are facing an issue with the launching of the Example app using the launch.smarthealthit.org:
Steps:
Expected out put: browser to show a patient JSON object
Actual: The
/launch
path get executed but when the we are redirected to the/app
path it gets stuck in pending for a bit and fails to load any things. Also, the nodejs server logs the following error:To make it work, repeat the steps above but with "Simulate launch within the EHR user interface" being unchecked. The app launches without errors and shows the Patient JSON in the browser, see below:
We did debugging by putting break points in the code. In the case of failure, the express sessionID is different for the /launch and /app handlers. So, the
ready
method is not recognizing the launch state and shows the "Error: No state found! Please (re)launch the app" error as shown in the screenshot above. We suspected that it might relate to the application being rendered in an iframe (by keeping "Simulate launch within the EHR user interface" unchecked). We tried to setX-Frame-Options
header to allow the response content to be rendered in an iframe but we got no success with that.May anyone help out please?
Thank you
The text was updated successfully, but these errors were encountered: