stakwork / sphinx-win-linux-desktop

MIT License
49 stars 13 forks source link

"Cannot reach server..." on self hosted relay #123

Open wbobeirne opened 3 years ago

wbobeirne commented 3 years ago

Hey y'all, trying to setup Sphinx for the first time and having a bit of trouble. I was able to get started on desktop no problem, but when it comes to signing on the Android app, I'm getting

Cannot reach server... https://sphinx.chat

Quick glance at the code shows me that the url there is just hard coded, so it's not any issue communicating there. In my relay logs, I see the following on an attempted login:

=> generateToken called {
  body: { token: '[some-token]' }
  params: {},
  query: { pwd: '[some-pwd]' }
}
-> 2021-02-08 04:58:10: POST /contacts/tokens?pwd=[some-pwd] 400 5ms

Unfortunately I'm not able to gleam much more since all of the real information is console.log'd in a way I can't seem to get to. I'm using the same code that I used to setup the desktop client, Is it one time use? Is there an easy way to get at the console logs on Android, or will I have to run it in development myself to see the console.log'd errors? Thanks!

pitoi commented 3 years ago

Jesse - can you check into this for Will?

Evanfeenstra commented 3 years ago

@wbobeirne u will need to run it in dev.. theres some instructions in the readme. We remove console logs in production because it slows things down.

u will need to comment out the tranform-remove-console in babel.config.js

ascisco commented 3 years ago

I am having the same issue. I can connect to my node on desktop but not on android.

kn0wmad commented 3 years ago

+1 Is there any update on this? In logs I'm getting 'failure: invalid token'

Edit: I was able to fix this by uninstalling/reinstalling the relay and app.