"No state found! Please (re)launch the app." error with ExpressJs example

22 views
Skip to first unread message

Kevin G

unread,
May 30, 2025, 12:54:57 PMMay 30
to SMART on FHIR
Trying to implement my SMART on FHIR app using the ExpressJs example: https://github.com/smart-on-fhir/client-js-examples/blob/master/server/express/index.js

It works when I try to utilize the SMART Launcher from https://launch.smarthealthit.org/, but when I select the "Simulate launch within the EHR UI (launch within an iFrame)" option, I keep encountering the "No state found! Please (re)launch the app." error.

It's able to pass the /launch page, and move onto the /redirect page. It fails specifically within the ready() function here: https://github.com/smart-on-fhir/client-js/blob/9969e0ac59d2edb7bb41aebc65cac11b34dc89d5/dist/lib/smart.js#L463

The same thing occurs when I try the eCW EHR self-service (they use iframes).

I see the issue reported here with no fix: https://github.com/smart-on-fhir/client-js/issues/115

Any suggestions?

Jason Salsiccia

unread,
Jun 19, 2025, 1:28:29 PMJun 19
to SMART on FHIR
I think this is caused by 3rd party cookies not being sent by the browser in an iFrame context.  You can see this in the Chrome developer tools, if you look at the request to your application callback url and see something like this

Screenshot 2025-06-19 at 1.25.55 PM.png
Reply all
Reply to author
Forward
0 new messages