Completed

Request canceled: Duplicate request

Hello!

 

While adding a new feature my newly added events were not showing up in Countly dashboard and I turned on debuggin logs on Android

`config.setLoggingEnabled(true);`

I saw these logs:

```

2020-06-14 12:30:36.785 D/Countly: [Connection Processor] code:[200], response:[{"result":"Request ignored: Duplicate request"}], request: app_key=xxx&timestamp=1592123106887&hour=10&dow=0&tz=120&sdk_version=20.04&sdk_name=java-native-android&begin_session=1&metrics=%7B%22_device%22%3A%22device%22%2C%22_os%22%3A%22Android%22%2C%22_os_version%22%3A%2210%22%2C%22_carrier%22%3A%22carrierde%22%2C%22_resolution%22%3A%221080x2016%22%2C%22_density%22%3A%22XXHDPI%22%2C%22_locale%22%3A%22de_DE%22%2C%22_app_version%22%3A%22x.x.x%22%7D&aid=%7B%22adid%22%3A%2247fbff0b-1c65-45df-9eea-47b3a2c90932%22%7D&device_id=e431bd36e40e9ff2
2020-06-14 12:30:36.789 I/Countly: [Connection Processor] Starting to run, there are [86] requests stored
2020-06-14 12:30:36.934 D/Countly: [Connection Processor] code:[200], response:[{"result":"Request ignored: Duplicate request"}], request: app_key=xxx&timestamp=1592123106887&hour=10&dow=0&tz=120&sdk_version=20.04&sdk_name=java-native-android&begin_session=1&metrics=%7B%22_device%22%3A%22device%22%2C%22_os%22%3A%22Android%22%2C%22_os_version%22%3A%2210%22%2C%22_carrier%22%3A%22carrierde%22%2C%22_resolution%22%3A%221080x2016%22%2C%22_density%22%3A%22XXHDPI%22%2C%22_locale%22%3A%22de_DE%22%2C%22_app_version%22%3A%22x.x.x%22%7D&aid=%7B%22adid%22%3A%2247fbff0b-1c65-45df-9eea-47b3a2c90932%22%7D&device_id=e431bd36e40e9ff2
2020-06-14 12:30:36.937 I/Countly: [Connection Processor] Starting to run, there are [86] requests stored
2020-06-14 12:30:37.298 D/Countly: [Connection Processor] code:[200], response:[{"result":"Request ignored: Duplicate request"}], request: app_key=xxx&timestamp=1592123106887&hour=10&dow=0&tz=120&sdk_version=20.04&sdk_name=java-native-android&begin_session=1&metrics=%7B%22_device%22%3A%22device%22%2C%22_os%22%3A%22Android%22%2C%22_os_version%22%3A%2210%22%2C%22_carrier%22%3A%22carrierde%22%2C%22_resolution%22%3A%221080x2016%22%2C%22_density%22%3A%22XXHDPI%22%2C%22_locale%22%3A%22de_DE%22%2C%22_app_version%22%3A%22x.x.x%22%7D&aid=%7B%22adid%22%3A%2247fbff0b-1c65-45df-9eea-47b3a2c90932%22%7D&device_id=e431bd36e40e9ff2
2020-06-14 12:30:37.302 I/Countly: [Connection Processor] Starting to run, there are [86] requests stored
2020-06-14 12:30:37.427 D/Countly: [Connection Processor] code:[200], response:[{"result":"Request ignored: Duplicate request"}], request: app_key=xxx&timestamp=1592123106887&hour=10&dow=0&tz=120&sdk_version=20.04&sdk_name=java-native-android&begin_session=1&metrics=%7B%22_device%22%3A%22device%22%2C%22_os%22%3A%22Android%22%2C%22_os_version%22%3A%2210%22%2C%22_carrier%22%3A%22carrierde%22%2C%22_resolution%22%3A%221080x2016%22%2C%22_density%22%3A%22XXHDPI%22%2C%22_locale%22%3A%22de_DE%22%2C%22_app_version%22%3A%22x.x.x%22%7D&aid=%7B%22adid%22%3A%2247fbff0b-1c65-45df-9eea-47b3a2c90932%22%7D&device_id=e431bd36e40e9ff2
2020-06-14 12:30:37.430 I/Countly: [Connection Processor] Starting to run, there are [86] requests stored
2020-06-14 12:30:37.629 D/Countly: [Connection Processor] code:[200], response:[{"result":"Request ignored: Duplicate request"}], request: app_key=xxx&timestamp=1592123106887&hour=10&dow=0&tz=120&sdk_version=20.04&sdk_name=java-native-android&begin_session=1&metrics=%7B%22_device%22%3A%22device%22%2C%22_os%22%3A%22Android%22%2C%22_os_version%22%3A%2210%22%2C%22_carrier%22%3A%22carrierde%22%2C%22_resolution%22%3A%221080x2016%22%2C%22_density%22%3A%22XXHDPI%22%2C%22_locale%22%3A%22de_DE%22%2C%22_app_version%22%3A%22x.x.x%22%7D&aid=%7B%22adid%22%3A%2247fbff0b-1c65-45df-9eea-47b3a2c90932%22%7D&device_id=e431bd36e40e9ff2
2020-06-14 12:30:37.632 I/Countly: [Connection Processor] Starting to run, there are [86] requests stored
2020-06-14 12:30:37.991 D/Countly: [Connection Processor] code:[200], response:[{"result":"Request ignored: Duplicate request"}], request: app_key=xxx&timestamp=1592123106887&hour=10&dow=0&tz=120&sdk_version=20.04&sdk_name=java-native-android&begin_session=1&metrics=%7B%22_device%22%3A%22device%22%2C%22_os%22%3A%22Android%22%2C%22_os_version%22%3A%2210%22%2C%22_carrier%22%3A%22carrierde%22%2C%22_resolution%22%3A%221080x2016%22%2C%22_density%22%3A%22XXHDPI%22%2C%22_locale%22%3A%22de_DE%22%2C%22_app_version%22%3A%22x.x.x%22%7D&aid=%7B%22adid%22%3A%2247fbff0b-1c65-45df-9eea-47b3a2c90932%22%7D&device_id=e431bd36e40e9ff2
2020-06-14 12:30:37.995 I/Countly: [Connection Processor] Starting to run, there are [86] requests stored
2020-06-14 12:30:38.205 D/Countly: [Connection Processor] code:[200], response:[{"result":"Request ignored: Duplicate request"}], request: app_key=xxx&timestamp=1592123106887&hour=10&dow=0&tz=120&sdk_version=20.04&sdk_name=java-native-android&begin_session=1&metrics=%7B%22_device%22%3A%22device%22%2C%22_os%22%3A%22Android%22%2C%22_os_version%22%3A%2210%22%2C%22_carrier%22%3A%22carrierde%22%2C%22_resolution%22%3A%221080x2016%22%2C%22_density%22%3A%22XXHDPI%22%2C%22_locale%22%3A%22de_DE%22%2C%22_app_version%22%3A%22x.x.x%22%7D&aid=%7B%22adid%22%3A%2247fbff0b-1c65-45df-9eea-47b3a2c90932%22%7D&device_id=e431bd36e40e9ff2

```

As one can see the requests are being ignored, and sent again just a few hundred ms later. After reinstalling the Android app the issue was gone. Then I checked Countly request logs (Countly - Utility - Request logs) and see rows upon rows of the same issue every ten seconds from users around the world.

 

How can this issue be solved by updating my Android app?

 

Thanks!

0

Comments

6 comments
  • Official comment

    From what I can tell, there probably isn't a issue with your app.

    Probably during the testing the SDK sent a request to the server and before processing the respone, the app was killed. This cause the situation of the server having processed the request but the SDK not knowing that. After which the SDK continues sending it, even while receiving a HTTP 200 response, due to a logic error in how the responses are handled. The requests are getting ignored because the same identicaly requests are sent.

    I'll fix faulty logic in a update, which I'll release probably at the end of next week. The versin you have to look out for is 20.04.4

    Comment actions Permalink
  • I think code formatting is disabled so I put the logs in a gist for better readability: https://gist.github.com/benjaminglatzeder/2a524337457d3922789493aed0b0d948

    0
    Comment actions Permalink
  • Very much appreciate your reply on a Sunday!! I'll look out for the SDK update and will report back once I updated my mobile app with the 20.04.4 update.

    0
    Comment actions Permalink
  • Hello Arturs,

     

    hope you are well! I haven't seen any new release yet and the last commit is nearly three weeks ago. I was wondering if this is still on your radar?!

     

    Thanks!

    0
    Comment actions Permalink
  • Hello! Yes, it still is. We just want to combine it with additional fixes and improvements. Targeting the end of this week.

    0
    Comment actions Permalink
  • OK, no worries. Thank you for the update and have a great day!

    0
    Comment actions Permalink

Please sign in to leave a comment.