-
Notifications
You must be signed in to change notification settings - Fork 34
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
Trips not recorded on iOS #377
Comments
@MythriNagaraju none of the changes to update the SDK to 26 applied to iOS, so I have not tested or released a new iOS version. I can't think of any obvious reasons why the plugin updates (the only changes to iOS) should have broken tracking, but you might want to try syncing to tag 2.7.1 (https://github.com/e-mission/e-mission-phone/releases/tag/v2.7.1) and rebuilding on iOS. That is the version currently in the stores and being tested by users. If that also does not work for you, let me know and I can help you troubleshoot. |
Thanks @shankari , I'll try doing that. I am using cordova version 8.0.0. Could that be a problem? |
@MythriNagaraju I don't think so - the README recommends using cordova 8.0.0 since Jan 2018 |
Okay, this time I double checked that the location tracking button was on and both iOS and android apps are recording trips. Although nothing is being logged on the server. I emailed you the log. Would you be able to take a look please? Thanks! |
@MythriNagaraju I checked your logs and there was an network error while connecting to the server.
|
@MythriNagaraju You can check the logs yourself and confirm. There is documentation on how to make the emailed database human readable in You can also browse logs using the Profile -> Developer Zone -> Check Log |
Thank you - I am looking at the .csv file now. I was connected to the server when I force-synced. And force-sync worked from the android app at the same time. |
But was your iPhone connected to WiFi or a data plan? |
Yes! |
were you able to access the server (https://....) from safari on the iPhone? |
Yes, I was able to. Also, I see this error in the logs while trying to push data to the server: Error Domain=com.google.HTTPStatus Code=413 ""(null)"" Have you seen this before? |
hm, status code 413 is "Payload Too Large" That is basically a dup of #283 They submitted a doc fix (#47) I requested changes, but haven't received a response yet. But you can use the doc fix directly :) |
I am not quite sure about why you should be hitting this though. The previous team that ran into this was returning survey results, and our speculation was that the survey result sizes were big. But you are not using surveys. Let me take a closer look. |
But you should definitely bump up the max size in the short-term because I know that will fix it. |
I did bump up the max size in cfc_webapp.py , but that will not work because the server is behind a reverse proxy. I cannot use that doc fix though because in my case the web server is on a windows server and behind a IIS webserver proxy. |
I am looking into how I can increase request size in IIS webserver proxy |
I also took a slightly closer look at this, and there were apparently two failures because of internet connectivity issues.
And then after that was resolved, we started getting the 413 error
Looking at the actual data sent for the last two calls, we find
Those don't seem to be abnormally high. |
thanks for looking into this @shankari. I'll try that. So far, I tried bumping up the max size and re-starting the server , but haven't taken any trips since. |
@MythriNagaraju you don't need to take any more trips - all the data from your previous trips is still cached in the app. You can try "Force sync" and see if the push works this time. |
Did not work. Same error again **CommunicationHelper : Got response org.apache.http.message.BasicHttpResponse@23a5fa6 with statusHTTP/1.1 413 Request Entity Too Large ServerSyncAdapter : IO Error java.io.IOException while posting converted trips to JSON** On iOS , I get this error additionally. Fails on this line I also noticed that the trip ends are not detected correctly on iOS but they are on Android. Is that expected. |
Could be also related to this ? #333 |
in that case you have not bumped up the max size correctly. Have you bumped up the max size on the reverse proxy? the max size on e-mission should be fine.
Well, I don't think that is an additional error. The force sync is failing, and you are getting an error popup. I would defer the investigation of #378 until you get the force sync to actually work. |
sorry, I meant on Android I don't get an error on Force Sync but on iOS I do. |
@MythriNagaraju no I don't think this is related to #333 since according to the iOS documentation, it uses UTF-8 by default. And you are not using a locale that would generate non-ASCII characters. And even if it were, we would get error 500, not error 413. You just have to figure out how to bump up the max size on your reverse proxy. |
@MythriNagaraju a quick way to confirm whether the issue is with the app or with the reverse proxy is to configure the app to connect directly to the e-mission server, skipping the reverse proxy. This may only work when you are on the LBL campus, connected to the local network, but you can use "Force Sync" at work, for example.
|
@MythriNagaraju if I don't get updates from you on this by EOD, I plan to close this issue since it is not related to the platform in general, but rather to your specific configuration. |
I still haven't tried connecting to the e-mission-server directly, but I am going to try now. Thank you for that IIS link! |
@MythriNagaraju what was the result of the test? |
I bumped up the size and I no longer get the http 413 error, but I still don't see trips in the usercache on the server. Doing some more testing. Will report back. |
Now, connection to server is timing out! |
Trying another config change. Since this is all specific to IIS webserver, if you want , you can close this issue. Or when I get it to work, I can document what worked. |
would be great if you could document what worked! |
I modified the config on the IIS server to increase the max size and I am no longer running into the HTTP 413 error, although now I see a 403 forbidden error. The app server is up and running without any issues. I can also see "inserting entry" in the web server logs. Have you run into this before? |
@MythriNagaraju "403 forbidden" typically means that the authentication is not working properly. Are your phone and server authentications consistent? Just because you can see "inserting entry" in the web server logs doesn't mean that the data is getting to the server - we also insert entries for the server api time, for example. You need to look at the messages around auth and the mapping from the email to the uuid at |
@shankari how do I make sure that the phone and server authentications are consistent? |
@shankari Is there anything in the logs apart from the 403 error that you think is unusual? |
@MythriNagaraju you should have configured the phone and server authentications using |
@MythriNagaraju I would suggest doing further debugging on the server, not the phone.
|
thanks @shankari . Currently, the auth method in conf/net/api/webserver.conf is "skip" and the auth method in connectionConfig.json is "prompted-auth". Is that correct? |
that should be fine (it is basically no authentication). What do you see in
|
I see this:
It never finds/returns the UUID? |
did you register to this server with the username If not, please log out and log in again. |
That worked @shankari !
I am now able to see the 'background/location' entries in the usercache table for that user too. Thanks so much! Going to test on iOS now. |
Yay! obviously, in your real deployment, your users would go through the onboarding on the correct server, so this would not be an issue :) |
Right! |
@shankari Are the modes of the trips written to any of the tables in the MongoDB database? Or can they be inferred from the data in the tables in any way? |
https://github.com/e-mission/e-mission-server#experimenting-with-loaded-data Also, did you look for prior issues - e.g. |
closing this for now, since trip recording on iOS has obviously been resolved. |
You may also find this useful. |
@shankari : After I merged changes to update the sdk to 26 and switch dynamic permissions, the iOS app is not recording trips at all. I also do not see any errors in the XCode log. Is anyone else running into this issue?
The text was updated successfully, but these errors were encountered: