Field Kit 0.4.2 Testing

Am very keen to have this mobile app in production use, so -having just received email notification of version upgrade- i’ve upgraded to this new version 0.4.2 via TestFlight (running iOS 12.3.1 on iPhone 7).

Problem: will not load activities due from the server (first action i tried on startup), nor will it upload a new observation that i then created (with photo attached); upload arrow has turned into a spinning progress icon, which goes on spinning indefinitely. Have rebooted the app, tried a few times, etc.

[*] Note: Previous version did not have this problem, and seemed to perform its limited functions fine. I cannot now tell what version that was, because the upgrade deleted it… But from email exchanged with developer James Gaehring at time i joined the test program, i can see that install date was May 8, plus or minus a day -if that helps.

Hi @walt - thanks for testing! I think this bug you describe has just been fixed: https://github.com/farmOS/farmOS-client/issues/206 (although it hasn’t been packaged and released to the app stores yet).

But it would be good to make sure it’s the same bug and not something similar. I posted a link to this forum post in the comments on that issue so that @jgaehring is aware. Thanks again for the report!

Also just a reminder: the app is still in beta, so heed the following warning from the new page https://farmos.org/guide/app/:

Please note that all releases of farmOS Field Kit are currently in beta release and are not considered stable. If you use them, make sure to backup your data regularly to your farmOS server to avoid data loss.

(As long as a log is synced to the server, it is safe. The app does not delete logs from the server (at least not yet)).

Thanks @mstenta : as i replied on Github, i don’t believe this is a related issue, because my device was not offline at the time (nor is it now, and the upload “in progress” spinner is still spinning, now a day later. I’ve rebooted the app, of course). If @jgaehring wants help with debugging this, i am here, and i really look forward to getting it resolved.

Still: i recognise that this mobile app is not production-ready, so we’re just evaluating it right now to see if it satisfies our “MVP” (Minimum Viable Product) need, i.e.: the field worker should be able to (a) download logs of (over)due activities relevant to their case; and (b) create and upload new logs of activities they perform in the field (i.e. seedings, transplants, inputs, harvests) in-sitiu, without any need of ever having to visit the computer desktop. Until these evaluative criteria are met, all data we may enter via this tool must be considered disposable.

Thanks for the feedback, @walt, I’m looking into this.

Are the activities assigned to the same user that you logged in as on Field Kit?

Going to test the photo issue, just need to create a debuggable build first so I can test. I’ll keep you posted…

Yes @jgaehring : on login to desktop, i see two late tasks assigned to me that should be synced, i presume… But on login to farmOS mobile app, they do not sync on command; i just get the eternally spinning progress monitor.

As to photo issue: photo is not the problem; just happened to be a photo-bearing observation that i added, which also does not sync (problem manifests same as above)… But to be sure, i just added another Observation log without a photo, and it does the same thing: no sync.

Ok. And I assume you haven’t set any filters, right? Sounds more like a network error, but just to be sure.

Ah, good to know. I thought I’d seen similar behavior on an earlier build, but it only occurred when photos were attached. This must be different then. Probably the same network error preventing the logs from being sent from the server, too.

I haven’t been able to reproduce these issues with the newest build. I just pushed that update (0.4.3) to the App Store, just on the chance it might resolve this, but it will take 12-24hrs for Apple to approve it. One of the issues with the 0.4.2 build is that the process that handled sync errors wasn’t working properly (hence the infinite spin). At the very least, I hope the 0.4.3 build will give more meaningful feedback as to why these errors are occurring, so I have a better chance to debug. In the meantime, I will try reverting to 0.4.2 and attempt some more debugging.

Correct -no filters have been set.

So: i’ll wait for email notification of the 0.4.3 build availability (that’s how i found out about 0.4.2), and then download and test w/ that one. Thanks @jgaehring for prosecuting this issue so actively.

So (having received email notification sometime in the night) i’ve just installed the upgrade to 0.4.3, and the same problem persists -only now i get a nice error message that confirms your suspicion @jgaehring:

“Unable to sync, because the network is currently unavailalbe. Please try syncing again later.”

To be clear: there is no network problem AFAICT, inasmuch as my iPhone and Desktop are both with the same fast internet connection via my office WiFi router. Desktop machine is communicating with my FarmOS instance at Farmier (i.e. vdl.farmos.net) just fine in both directions… And my iPhone is communicating with other services (mail, etc… Also TestFlight app store, where i just downloaded Field Kit upgrade) also without problems. So if this is indeed a network problem, i guess it can only be related to the way this particular mobile app talks to the server software, or fails to do.

Also important to know: there was no such problem the version i initially installed back on May 8 (0.4.1, presumably?), through which i was posting & downloading logs to & from the same server, no problem.

Also noteworthy: i engaged a colleague with an Android phone to test the app, through which he posted a set of 8 logs back on July 11, i now see… But that also predates the 0.4.2 release, right? I can find out what version he is running and/ have him test again, if it matters. ?

I’m beginning to wonder if this could be related to some major changes we made after 0.3.9, which is probably the last version of the app you had. Basically, we migrated to a whole new database and we held off releasing a few versions to make sure we had things right. It’s possible that some data got corrupted migrating between versions and that could be causing the server to reject the requests. It’s not quite the error message I would have expected, but it still seems like a strong possibility. We anticipated there could be some hiccups like this.

With that in mind, do you think you could try uninstalling and reinstalling the app?

Also worth noting, we shouldn’t have a big, breaking change like this again… that’s part of our reason for the migration in the first place. Our first database made it hard to ensure stability, but going forward we have a clear path for making these sorts of migrations. This was one of the milestones we needed to reach before releasing officially to the app stores.

That solved it, @jgaehring : i uninstalled & reinstalled (same version), and was immediately able to both download and upload logs -including a photo attachment with the observation log uploaded, so no worries about that issue also.

Still, i would like to be clear what you are saying about the database change, and what this implies for future upgrades. Are you saying that, since you swapped out the old database engine for the one in this version, that this species of problem should not be happening in connection with any future upgrades?

Great!

That is correct. To get into the nitty-gritty, we originally created the app with WebSQL, but its versioning API was poorly documented and hard to use, so for much of development up til now, a change to the table schema meant breaking changes to the app. We explored different solutions to this, and ultimately decided to just migrate everything to IndexedDB instead, which has very good documentation on its version management and is generally more tolerant of schema changes. Version 0.4.1 marked the move from WebSQL to IDB, so from here on, there will be no breaking changes like this one.

1 Like

Sounds good @jgaehring -but now i wonder why i’m getting a slightly different network error message, when i try to log into my same instance via the Progressive Web App? Using Chrome browser on my iPhone -same one as above, where the FieldKit is now working- i tried to log in with the same credentials, but it failed with this message:

Unable to reach the server. Please check that you have the correct URL and that your device has a network connection. Status: Network Error

Of course i’ve ensured that my iPhone <-> Internet connection is working (as above), and i’ve even quit the FieldKit app and rebooted the Chrome browser, in case that might have some effect… But no, i still get this error msg. Can you shed any light on this problem, and how it might be resolved?

I think that’s because https://farmOS.app hasn’t been updated to v0.4.3 yet… we’re still getting our release process in place for the app - hopefully we can automate some of these things in the near future!

That’s possible. I just pushed 0.4.3 up to the site. You may need to refresh a couple times to clear the cache.

1 Like

I just tried: no luck. Didn’t know if you meant cache on client side or server side, @jgaehring, so i rebooted my browser/ resubmitted credentials a couple of times: resulting in the same error msg each time, FYI.

@walt, what url are you entering into the address bar? Is your site set up for https:// (SSL)?

Btw, thanks for all your patience identifying and troubleshooting these bugs. It’s a huge help that will go a long ways towards improving the software and is greatly appreciated!

In Chrome browser (Version 75.0.3770.103) on my iPhone (as above), i am entering (after the https:// prefix) vdl.farmos.net ; this is the same address that i use on my desktop, with https, and there it works (of course, it’s hosted at farmier, so you can be sure @mstenta keeps up w/ current web standards :slight_smile:

It is generally a pleasure, @jgaehring, though bugs are of course annoying; i am motivated to work through them, because without the Field Kit, farmOS is like the sound of one hand clapping for me (i.e. a lot of work, but ultimately ineffectual). I can’t expect my field workers to go to their desktops for more work after a hard day in the field, so we really need an interface our people can use on mobile,

1 Like

I may have successfully replicated this a bit earlier… still looking into the cause, but I was able to fix it by logging out and logging back in.

FYI @jgaehring : Having just received email notification of the new version, i upgraded to FieldKit 0.4.4, and it worked without a hitch… So i guess that problem caused by change of database engine is behind us now.

But as to your last comment:

-i am not clear what problem you are referring to; the sync problem seems to be no more, as i have just said… But if you are referring to the problem with Progressive Web App, it persists, AFAICT: just tried again, and i get that same network error msg last cited above. However, in IRC chat w/ @mstenta last week, he mentioned something about having a theory of cause for this problem… But then he said no more. If you haven’t discussed this with him, you might want to do that.

Great, glad to know 0.4.4 rolled out nice and smoothly!

Yes, that’s the one I meant (sorry that was vague, it was late when I saw the bug and I just wanted to document it quick). Looking at it more closely, I realize I was looking at the My Logs screen when I got a similar (but not the same) error. You’re getting the error at login though, correct? The last thing I would probably recommend is to go into your browser settings and clear the storage for “farmos.app”. Could be there’s a stale token that’s not getting swapped out, but tough to say since I can’t exactly reproduce the error.