Countly CORS error

I have Countly instance installed on AWS, and i have stage and dev app both using same Countly app, in Countly i have created 2 projects for web stage and dev, i have set headers in settings as follows

Additional API HTTP Response headers: {

X-Frame-Options:deny
X-XSS-Protection:1; mode=block
Access-Control-Allow-Origin: *

}

on web staging everything seems to work fine, yet on dev i got constant CORS errors, but some request are passing with 200 status yet near 50% are failing with CORS error, can anyone point me what can be wrong?

0

Comments

14 comments
  • Official comment

    Hi Andrii,

    I hope you're doing well and I'm sorry for the late reply.

    After discussing your question with our development team, we believe that the root cause of the issue might be caching headers or overwriting them as they're delivered. It also explains the disappearance of the errors.

     

    Comment actions Permalink
  • Anyone?

    UPD: Somehow this errors disappeared, might be some AWS issue, but i still need assist on what could be possible issue.

    0
    Comment actions Permalink
  • I have managed to reproduce error with CORS and got this in console. Any thoughts? Pic attached below, please take a look.

    0
    Comment actions Permalink
  • 0
    Comment actions Permalink
  • 0
    Comment actions Permalink
  • left are headers i see in browser and right ones are one in countly logs, somehow pics uploaded are blurry, tell if you need txt file with headers

    0
    Comment actions Permalink
  • Hi Andrii,

    Requests that pass to Countly are not a problem, they work as expected. We would need to see the requests that does not work, which fails CORS and what is the response from server in that case.

    It's possible that there are some middle server in between that in some cases is sending responses instead of Countly and thus did not have such headers. The way to determine it is:

    1. Open the dev console on browser
    2. Check the Network tab
    3. Find the request that fails and check the response from the server
    4. Spot if the server is Countly or not.
     
     

     

     

    0
    Comment actions Permalink
  • Well yes, i have included photo of requests which fails. Countly marks this request as duplicate and it fails. Yet for now we got this error only on Production server, dev server works stable for now, also please note we are using AWS so i believe there is tons of stuff in between countly and app and its very hard to know what exactly to look in to.

    0
    Comment actions Permalink
  • 0
    Comment actions Permalink
  • Hi Andrii,

    Kindly note that duplicate is not failed, it actually means that Countly already received it and processed it.

    Countly is on receiving end, so if Countly received request, it means already request did make through. I would like to know more information about requests that did not come through.

    So, in short, to better understand this, I would need to know about the requests that did not reach Countly.

    0
    Comment actions Permalink
  • Hi Kevin!

    The requests that reach/not reach Countly are identical. 
    We receive this error time to time. 
    Could we schedule a meeting where we can provide all required information to solve this issue?

    0
    Comment actions Permalink
  • Hi Oleg,

    I already talked to our DevOps team, and we can sure schedule a call for this. We're free every day from 10:00 to 13:00 UTC. Let me know when you guys are available.

    0
    Comment actions Permalink
  • Thanks Kevin!

    Lets schedule a call on Friday 07/02 10:00 UTC.

    0
    Comment actions Permalink
  • Hi Oleg,

    07/02 @ 10:00 UTC works for us.

    I already sent the calendar invite to your email.

    0
    Comment actions Permalink

Please sign in to leave a comment.