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

Unable to open local html file in inappbrowser: net::ERR_CONNECTION_REFUSED #197

Closed
expcapitaldev opened this issue Oct 19, 2018 · 2 comments

Comments

@expcapitaldev
Copy link

I'm trying to open local html file via inappbrowser. The file is stored in www (root) folder. As expected, opening file was impossible after upgrade from version 1.2.1, however I'm not able to make it work. Initially I simply passed file name to browser

const url = "form.html?";

After updating web view I've changed it to

const url = (<any>window).Ionic.WebView.convertFileSrc("form.html");

I'm still getting The webpage at http://localhost:8080/form.html could not be loaded because net::ERR_CONNECTION_REFUSED. I've also tried using

const url = (<any>window).Ionic.WebView.convertFileSrc("file://form.html");

but nothing changed. Am I missing something?

@davec21
Copy link

davec21 commented Oct 19, 2018

I too am getting this issue, not sure if it's because in-app browser runs outside of the ionic app? I ended up just creating a new view that is effectively just an iframe/viewer to make it work.

@jcesarmobile
Copy link
Member

Duplicate of #178

@jcesarmobile jcesarmobile marked this as a duplicate of #178 Nov 6, 2018
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

3 participants