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

Could not ping localhost:5000 #961

Closed
carlosporta opened this issue Dec 16, 2016 · 5 comments
Closed

Could not ping localhost:5000 #961

carlosporta opened this issue Dec 16, 2016 · 5 comments

Comments

@carlosporta
Copy link

carlosporta commented Dec 16, 2016

I'm trying to use webview bootstrap but I get this message on my log:

25908 25953 V WebViewLoader: Could not ping localhost:5000

And my app stucks on Loading window.

This is my code:
`from flask import Flask
app = Flask(name)

@app.route('/')
def main_page():
return 'hello world'

app.run(debug=False, host='0.0.0.0')
`

If I open my browser on my phone or on my pc I can access my phone's IP on port 5000 and I am able to see the message 'Hello world'. So the flask server on my phone is working, but my app just show the loading message.

Am I doing something wrong?

@minglethepringle
Copy link

+1 I'm experiencing this problem too. I'm using Flask + Socket.IO in Python, and using the command to build a WebView application.

I put the python file in a folder, and specified that folder in the long p4a command. The python file can run by using python ___.py, no FLASK_APP=___.py flask run necessary. So I would think that when I open the APK app, it'll run automatically.

@inclement
Copy link
Member

I haven't been able to reproduce this, but some following some discussion yesterday it seems that some people have problems with the packaged python installation.

Would you be able to paste the adb logcat log (http://python-for-android.readthedocs.io/en/latest/troubleshooting/#debugging-on-android) during the app start?

@inclement
Copy link
Member

Closing as lacking a response.

@minglethepringle
Copy link

Forgot about this entirely, sorry lol.

@ghost
Copy link

ghost commented Jan 31, 2019

@minglethepringle if this still going on and you're interested in helping us find the culprit just let us know, we can reopen in that case

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