SEPIA-Framework / sepia-html-client-app

Application to communicate with SEPIA via browser, iOS and Android. Works as chat messenger with personal-assistant, ASR and TTS integration.
https://sepia-framework.github.io/
MIT License
62 stars 15 forks source link

Can't log into home server via app, can via website #31

Closed undrwater closed 3 years ago

undrwater commented 3 years ago

I'm trying to use the android app to login to my server: The address to log in to the website is: https://<ip_address>:20726/sepia/assist/app/index.html

The address I typed into the app on android: https://<ip_address>:20726/sepia/ user is @sepia.local pass is my password

The user has been added to whitelist, and I can log in to the website. I can't seem to find a URL that will allow me to log in to the android app.

Here's what I get when I run: run-sepia.sh

Elasticsearch is already running
Waiting for Elasticsearch on port 20724 ...

Elasticsearch is ready for action.
Checking Elasticsearch setup ...
Elasticsearch looks GOOD.

Starting SEPIA servers ...

Running SEPIA Assist (sepia-assist-v2.5.1.jar)
SUCCESS
Running SEPIA WebSocket Chat (sepia-chat-v1.3.1.jar)
Running SEPIA Teach (sepia-teach-v2.2.1.jar)

---- Wait a second (or 5) ----

---- Testing cluster ----

-----Assist API-----

SUCCESS
OK

-----Teach API-----

SUCCESS
OK

-----Chat API - WebSocket Server-----

SUCCESS
OK

-----Proxy-----

.
.FAIL
Info: Proxy seems to be OFFLINE! (Checked via 'localhost:20726/sepia/assist/' route)

-----Database: Elasticsearch-----

OK

DONE - If you made it this far the basic setup looks GOOD, but please double-check the output.

You should be able to reach your SEPIA server via:
raspberrypi.local or 192.168.1.213

Example1: http://raspberrypi.local:20721/tools/index.html
Example2: http://<IP_address:20721/tools/index.html
Example3: http://IP_address:20721/app/index.html

If you've installed NGINX proxy with self-signed SSL try:
Example4: https://raspberrypi.local:20726/sepia/assist/tools/index.html
Example5: https://raspberrypi.local:20726/sepia/assist/app/index.html

Please note: if this is a virtual machine the hostname might not work to contact the server!

For more info about secure context and microphone access in the SEPIA client see: 
https://github.com/SEPIA-Framework/sepia-docs/wiki/SSL-for-your-Server

Regardless if I use the SSL or plain login, I get the following message: Login failed! Sorry, but it seems the server does not answer :-( I'm using the exact URL from the browser app.

fquirin commented 3 years ago

Hi @undrwater ,

The address I typed into the app on android: https://:20726/sepia/

The HTTPS here might give you some troubles. Are you using self-signed certificates? Did you try http://<ip_address>:20726/sepia/, http://<ip_address>:20721 or simply <ip_address>? As long as you are in your own network using simply the IP address should be the safest way assuming that you didn't block the ports 20721-20723 (this might make sense if you want to use only 20726 which is the Nginx proxy).

.FAIL Info: Proxy seems to be OFFLINE! (Checked via 'localhost:20726/sepia/assist/' route)

This message indicates that you are not running Nginx proxy on your SEPIA server or Nginx might miss the SEPIA config file. Did you install Nginx during the setup process? (It should have been a point in the setup). The other option can be that Nginx or any other proxy is managing the paths in your network but that would have required some kind of advanced setup on your side.

I'm using the exact URL from the browser app.

Is the app working in the browser? That point isn't fully clear to me.

undrwater commented 3 years ago

Is the app working in the browser? That point isn't fully clear to me.

Yes. I can manage everything via the browser app. I am using self-signed certs.

The ports shouldn't be an issue, since the webapp is working fine. Is there a log on either the phone app, or perhaps the sepia server that might give me some kind of clue?

Did you try http://:20726/sepia/, http://:20721 or simply ?

I tried all of these combinations and more.

fquirin commented 3 years ago

Yes. I can manage everything via the browser app. I am using self-signed certs.

Maybe you have to import the SSL certificate to Android: https://github.com/SEPIA-Framework/sepia-docs/issues/40#issuecomment-631731775

But using just the IP should work in any case unless your Server cannot be reached without HTTPS anymore!? Can you check the "server connections" page in the settings again please (right under skin selection), there you will get all the paths your app is trying to open in more detail.

.FAIL Info: Proxy seems to be OFFLINE! (Checked via 'localhost:20726/sepia/assist/' route)

This part in your server start-up confuses me. Are you managing the SSL certificates on a different proxy or computer in your network?

Is there a log on either the phone app, or perhaps the sepia server that might give me some kind of clue?

App logs are only visible if you go into Android developer mode, connect your phone to a PC with Android Studio and check the console output there. The relevant server log is ~/SEPIA/sepia-assist-server/log.out but if the app says it can't reach the server then there shouldn't be any message.

When you check the URLs those are the two things that have to work from any PC in your network: https://:20726/sepia/assist/app/ -> host for app: <ip_address>:20726/sepia/ http://:20721/app/ -> host for app: <ip_address>