-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Field Kit Logs With Images Not Uploading to Server #365
Comments
Thanks @vital-agro. Am I correct that you're also getting duplicate logs sent to your server? Are you getting any error messages in Field Kit when you try to sync? |
Yes, I synced all the logs twice and the test cache log was duplicated.
Also the “test withour service” didnt upload. I was next to an Arable Mark
weather station during data collection and upload, could that be
interfering? There were no error messages.
Mason
On Thu, Jul 30, 2020 at 10:26 AM Jamie Gaehring ***@***.***> wrote:
Thanks @vital-agro <https://github.com/vital-agro>. Am I correct that
you're also getting duplicate logs sent to your server? Are you getting any
error messages in Field Kit when you try to sync?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#365 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APXNOFXR5LYSGQ544XTIK3DR6GUKRANCNFSM4POEM2IA>
.
--
Mason Lanphear
Founder, Vital Agronomics LLC
Email: mason@vital-agronomics.com
Cell: (206)-422-2911
|
Also, I just noticed some bizarre behavior when testing on iPad right now, after coming out of airplane mode, the sync button was non-responsive for a moment, no error messages. This was resolved when I went to the home screen and then reopened the app. Perhaps this might work for you?
Hm, this makes me think there could be an issue with a database migration, possibly some corrupt data. Were you on a different version before 0.5.1? If so, do you happen to recall the version number? If you don't have any data you need to save, it might help to logout and login again. That will clear the database and start fresh. |
I think I was using 0.5.1. I logged in and out but logs still aren't uploading, so it may be a data migration issue. Thanks |
Jamie: I reinstalled the home screen PWA and now the logs are showing up on the server, but after turning cellular service and WiFi off and on, any new logs won't upload. |
Hm, I'm having trouble reproducing. The only issue I'm experiencing by coming in and out of airplane mode is the behavior I explained above, where the sync button, and all other buttons, are non-responsive for a time, until I go back to the home screen and reopen the app. Could this be what happens to you? When you say new logs won't upload, what is the exact behavior? Do the cloud icons for each unsynced log become spinners? For how long do they spin? Or are you seeing no visual response to tapping the sync button? And you're still seeing no error messages? |
I deleted the PWA from the home screen and then reinstalled it, which enabled me to upload several logs but once I went offline and then online (turning off WiFi and Cellular) I could no longer sync logs. I don't get unresponsive sync icons, and it runs the sync icon for about a second. Still no error messages I logged out and reinstalled the home screen app again to reproduce the issue and it's definitely the act of turning off cell service or WiFi that triggers the issue. |
Update: after several reinstall attempts it seems to be working online and offline for now. |
Jamie: I think I found the issue. It only fails to upload when I try to upload an image that was captured via the app while creating the log. I was able to upload previously captured images. Let me know if you can reproduce that. |
Oh that's interesting. Hm, I still can't reproduce. Are there any other specific attributes on the log? What log type are you sending? |
It's an activity log with gps coordinates and an image attachment. |
Hmm. Now I can't upload logs with any photos. |
Hmm, very strange. Do you have many logs with photos in the app? At this point we're not doing much to optimize how they're stored, so there could be a limit to how many you can have stored at one time. I don't know how that would affect uploading, but maybe if you tried deleting some first? Sorry, kinda grasping at straws here, since I still haven't reproduced what you're seeing. 😕 |
I deleted all cached logs on my device and I still can't upload any logs with images, so I don't think that's the issue. I was able to upload more logs without images but they start to duplicate once I try to add logs with images. Also the app tends to be unresponsive at times until I close and reopen it. |
I'm starting to wonder if this might be something to do with how your server is configured. @mstenta, do you think there's any reason why
Ok, yea, this is what I see from time to time too. Doing a little research now, it seems like this is a known bug: https://bugs.webkit.org/show_bug.cgi?id=211018. Bummer 😕 Btw, thanks for sticking with this, Mason, I really appreciate the feedback. Hopefully we can get this resolved soon! |
@paul121 mentioned something about our server configuration in relation to this issue |
Ah hmm, nothing comes to mind - but I wonder... @vital-agro it might be worth testing uploading to test.farmos.net, and see if that behaves the same or not. @paul121 can give you credentials to it. If you have the chance, that might be a good way to see if it's a server issue or a Field Kit issue. |
Thanks @mstenta, looks like it's a server issue. I was able to upload image logs to the test server. |
Good to hear that it was not a Field Kit issue! Happy to help figure out the server issue! |
I'm able to replicate this using latest FK in Firefox on Android. It's worth noting that the farmOS server is still on v1.4. This should be OK with FK v0.5.1 though? I just applied this commit to allow OPTIONS to `farm/areas/geojson' thinking it might be related (if that request fails, would the rest of the sync process fail?) but it doesn't seem to have fixed the problem. What's interesting are the farmOS server logs... when I create a log in FK that has an image, no POST request is ever sent to the server. Logs without images go through fine. See logs below. This seems weird - @mstenta anything server side that might be causing this?
|
Aha! @mstenta diagnosed the problem and prescribed a solution 👏 The problem was file uploads were limited to 1MB and being blocked by the proxy. The images we were testing were > 5MB, but I was able to upload a 500kb image from Field Kit. To fix I made the following changes on the server:
https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size Add the following PHP settings:
|
After syncing three test logs, I noticed that only the logs that were created offline were uploaded to our farmOS server. See screenshots attached.
Logs were created using iOS PWA saved to the home screen.FK version 0.5.1 on iOS 13.6 with safari 13.
The text was updated successfully, but these errors were encountered: