Become a beta tester for farmOS Field Kit on iOS (et al)

Hi @scissors, according to Apple, Testflight only requires iOS 8 or higher. Are you unable to install Testflight?

2 Likes

Yes, but the Field Kit app asks for a new version of iOS.

1 Like

Ah, I see. Hm, I’m not sure there’s much we can do there. Our build process is dependent on a third-party library (Cordova) which handles the iOS side of things. I don’t know if there’s anything we can do to target older versions of iOS. :slightly_frowning_face:

2 Likes

Ah well, thanks for trying!
Let me know if this changes at all.

Will do. Next time I’m packaging a release I’ll look into the Cordova docs and see if there are some options for targeting older OS’s that I might have overlooked before. I definitely foresee you not being the only one with an older device they want to put to use with Field Kit.

2 Likes

Hi I am running my farmOS on my local server. That means it has no https cert fro the local ip.
I have problems to connect my server with the Android app (probably because the farmOS is https by default). Is there any option I could log in with a loacl IP without https?

Hi @Lars, sorry to hear you’re having trouble. I’ll try to look back into it, but I believe both web and Android/iOS versions of the app restrict us from connecting to plain http servers without SSL certificates. This is a security measure built in to web browsers and the Cordova platform, respectively, that restricts what’s called “mixed content” requests (ie, http to https or vice versa). I wonder if a self-signed cert might do the trick? Perhaps @mstenta has some suggestions.

Hi @jgaehring, thank you very much for your reply. I can access farmOS on the home network or VPN (from outside) using Chrome using http. For other applications I have a https cert on the server but this is not used (cant be used?) for internal IPs. For my setup it would be very useful to capture data in the field and sync at home (saving mobile data). This would be exactly what the mobile app appears to be.

So are you just running your server on localhost and connecting over LAN to the device’s numeric IP address (something like http://192.168.1.5)?

I think it should be possible to serve that with a self-signed cert. Let’s Encrypt has a good article on it here: https://letsencrypt.org/docs/certificates-for-localhost/. I haven’t tried it out though. Perhaps someone else can chime in if they’ve had experience with this.

Yes. I running it on a fixed local IP and connect via LAN or VPN.
From the link (thank you for pointing that out) it looks like it would not need a SSL cert.
" Fortunately, modern browsers consider http://127.0.0.1:8000/ to be a “potentially trustworthy” URL because it refers to a loopback address. Traffic sent to 127.0.0.1 is guaranteed not to leave your machine, and so is considered automatically secure against network interception. That means if your web app is HTTPS, and you offer a native app web service on 127.0.0.1 , the two can happily communicate via XHR. Unfortunately, localhost doesn’t yet get the same treatment. Also, WebSockets don’t get this treatment for either name."
The question would be if the background app process of the Android app also default to http if 127.0.0.1 is used?

Hmm, I’m not sure if I know quite what you mean by “background app process.” We use a Cordova plugin that allows us to connect to most addresses, though like I said, I’ve observed that this still does not allow us to connect to farmOS servers running on http. I’m trying to track down the old issue now…

I can’t find the old issue. When I get a chance, I’ll try to set a testing environment with a debugging build to see if I can re-diagnose what’s going on. I think it had something to do with Content Security Policy, IIRC, but that seems like it might provide some workarounds. :crossed_fingers:

Actually, @Lars, in the meantime, would you mind opening up an issue on GitHub?

It’s the best way to guarantee this issue gets dealt with, once I’m able to test, and that it’s then documented for later reference.

Yes thats what I meant with “background” from the letsencryptlink I assumed that if I use a specific IP not localhost:port it would not need a SSL cert. This appears not to be the case with the Cordova plugin.

My setup might be unusual but it appears to be more secure to me :wink:
Just to be sure:
https://127.0.0.1/farmOS/ should let me login on the app right?
currently I am trying
my login URL from the web browser http://127.0.0.1/farmOS/
like 127.0.0.1/farmOS/
and it does not connect (there is also no error message, it just sits there turning)

I will try to get the issue on GitHub.
Thank you very much for your help!

Yes, that should be correct, if that’s where you navigate to get to your farmOS homepage from the browser.

For those trying to set up farmOS for local testing with https, I’d recommend mkcert and a reverse proxy. I’ve documented one strategy for combining these things in this pull request.

2 Likes

Excellent! Thanks, @Symbioquine!

I would love to try that but it requires a installation in docker.
My installation is directly on a server (and it took me a while to get it setup)

What are the advantages of the installation in docker vs. directly on the server?
Are there any disadvantages?
Would the docker container need a lot of RAM especially as the database grows with lots of pictures and data?

Great Docker questions! It might make sense to break some of this discussion out into new forum topics though, what do you think?

We could have a topic for SSL certificate setup, and one for Docker vs non-Docker.

That way we can keep this issue focused on the Field Kit beta testing.

1 Like