syncing-server icon indicating copy to clipboard operation
syncing-server copied to clipboard

Cannot connect to hostname using iOS, IP works (HTTP)

Open yetdog opened this issue 4 years ago • 9 comments

When trying to connect to a hostname, I get "Oops, a server error occurred when trying to sign in. Please try again." When I switch to the IP address that that hostname resolves to, sign in works.

Now, I would prefer to use HTTPS, but currently I'm attempting this over HTTP as I'm unclear about how to get an SSL certificate installed in the docker container.

This is leveraging the MacOS app as well as iOS; same behavior. Using docker-compose

yetdog avatar Mar 18 '20 22:03 yetdog

I would first check if the hostname is in fact resolving to the IP address:

nslookup <your-hostname>

Additionally, you could manually edit your /etc/hosts file (on the host where you want to resolve the hostname) and specify it there.

johnny243 avatar Mar 18 '20 23:03 johnny243

Thanks for the response. Confirmed resolution. Does hostname-based access require https perhaps?

On Mar 18, 2020, at 4:23 PM, Johnny Almonte [email protected] wrote:



I would first check if the hostname is in fact resolving to the IP address:

nslookup

You could manually edit your /etc/hosts file (on the host where you want to resolve the hostname) and specify it there.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/standardnotes/syncing-server/issues/40#issuecomment-600906467, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABRHNAWFMVP3VGFACI34JI3RIFJVVANCNFSM4LO4B4UQ.

yetdog avatar Mar 19 '20 01:03 yetdog

Thanks for the response. Confirmed resolution. Does hostname-based access require https perhaps?

I don't think so, it should connect via http just fine.

May I know which port did you choose for the syncing-server?

johnny243 avatar Mar 19 '20 01:03 johnny243

On Mar 18, 2020, at 6:20 PM, Johnny Almonte [email protected] wrote:



Thanks for the response. Confirmed resolution. Does hostname-based access require https perhaps?

I don't think so, it should connect via http just fine.

May I know which port did you choose for the syncing-server?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/standardnotes/syncing-server/issues/40#issuecomment-600936996, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABRHNAVWUACVEWLLD2E3KHLRIFXMJANCNFSM4LO4B4UQ.

yetdog avatar Mar 19 '20 01:03 yetdog

Then you should be able to see the default page when you access it. Example:

image

Then in the Standard Notes app:

image

image

johnny243 avatar Mar 19 '20 01:03 johnny243

Yep - works just fine pulling up the "Not supposed to be here" in a web browser. Simply can not sign in with iOS whatsoever. And logs...yeah. Docker rules

yetdog avatar Mar 19 '20 02:03 yetdog

Ok folks - problem identified but not solved. In iOS, you can not connect without HTTPS. Here are the logs from the app itself, pulled from my device:

""The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.""

yetdog avatar Mar 19 '20 02:03 yetdog

I can open another issue on how to properly frontend this thing with https. Or would it just be a frontend nginx/letsencrypt box with its backend pointed at this system on port 3000?

yetdog avatar Mar 19 '20 02:03 yetdog

Sorry, I missed that you were using the iOS app, in which case it will not connect using a domain/subdomain unless it is HTTPS enabled.

You either connect to it using the IP address or setup HTTPS on your syncing-server.

I can open another issue on how to properly frontend this thing with https. Or would it just be a frontend nginx/letsencrypt box with its backend pointed at this system on port 3000?

You could setup a reverse proxy with nginx with HTTPS enabled.

johnny243 avatar Mar 19 '20 02:03 johnny243