Skip to content
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

TypeError: Cannot read property 'substr' of undefined at stripTrailingSlash #22

Closed
dwilhel1 opened this issue Feb 19, 2018 · 9 comments
Closed

Comments

@dwilhel1
Copy link

I receive a somewhat vague error when using this client to communicate with an auth server:

TypeError: Cannot read property 'substr' of undefined at stripTrailingSlash

From what I can tell, this is caused by fhirServiceUrl missing a value. Would it be possible to catch for an error here, and produce a more useful error message?

@kperveen
Copy link

kperveen commented Apr 17, 2018

@dwilhel1 Was this fixed?

@bhupesh-sf
Copy link

I am facing the same. Any solution yet?

@kperveen
Copy link

kperveen commented Apr 19, 2018

@bhupesh-sf It worked for me by putting a / at the end of launch url.

@bhupesh-sf
Copy link

bhupesh-sf commented Apr 19, 2018

This is the line being called

var server = urlParam("iss") || urlParam("fhirServiceUrl");

And inside urlParam() function

var query = location.search.substr(1);

And query is always empty so it is returning undefined as location.search has nothing.

@bhupesh-sf
Copy link

@kperveen When I put / at the end of URL it gives 404

@metapink
Copy link

metapink commented Dec 3, 2018

Ran into this issue when following the cerner tutorial :/ https://engineering.cerner.com/smart-on-fhir-tutorial/#app-launch because I tried to launch before running the app, as described in https://engineering.cerner.com/smart-on-fhir-tutorial/#test-your-app

@lmiller1990
Copy link

I too am having this problem

vlad-ignatov added a commit that referenced this issue Jan 25, 2019
@vlad-ignatov
Copy link
Collaborator

Sorry for the late reply. This should be fixed in [email protected]. If the launch URL is not loaded properly the launch will fail, but instead of showing such useless errors, there will be a warning in the console:
screenshot_20190125_125543

@dwilhel1
Copy link
Author

Many thanks @vlad-ignatov!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants