react-native-branch-deep-linking-attribution icon indicating copy to clipboard operation
react-native-branch-deep-linking-attribution copied to clipboard

branch api returns 500 (https://api2.branch.io/v1/install)

Open mdtechcs opened this issue 4 years ago • 4 comments

Hello,

I have integrated the branch sdk in react native and I am getting 500 error for https://api2.branch.io/v1/install api when I check network request

Here is version info

    "react-native": "0.62.2",
    "react-native-branch": "^5.0.0-beta.1",

error:

error: {
 code: 500
 message: "The server could not complete your request as specified. Please try again at a later time."
}

image

mdtechcs avatar May 13 '20 08:05 mdtechcs

I've been receiving

{
  "error": {
    "code": 500,
    "message": "Unable to call cluster endpoint: No endpoints available"
  },
  "responseCode": 500
}

and

{
  "error": {
  "code":500,
  "message":"Max requests per destination 1024 exceeded for HttpDestination[http://linkifier]@59b7fec1,queue=1024,pool=DuplexConnectionPool[c=64/64,a=64,i=0]"
  },
  "responseCode":500
}

for the last 2 days.

HStokes avatar Jun 12 '20 21:06 HStokes

I also receive 5xx errors quite often when using https://api2.branch.io/v1/url...

feimosi avatar Nov 12 '20 20:11 feimosi

alguna novedad?

shadowdestiny avatar Dec 14 '20 22:12 shadowdestiny

is this fixed?

michtnt avatar Apr 20 '21 03:04 michtnt

Hi! I am having a similar issue but on https://api2.branch.io/v1/open.

Receiving in JS error.

error: {
 code: 500
 message: "The server could not complete your request as specified. Please try again at a later time."
}

And when I debug on Xcode I can see this error:

<NSHTTPURLResponse: 0x281570ba0> { URL: https://api2.branch.io/v1/open } { Status Code: 500, Headers {
    "Access-Control-Allow-Origin" =     (
        "*"
    );
    "Cache-Control" =     (
        "no-cache"
    );
    "Content-Length" =     (
        125
    );
    "Content-Type" =     (
        "application/json"
    );
    Date =     (
        "Thu, 25 Aug 2022 13:51:40 GMT"
    );
    "Strict-Transport-Security" =     (
        "max-age=31536000; includeSubDomains"
    );
    Via =     (
        "1.1 d7ce10131df3183f928b50a7e6c2d1c0.cloudfront.net (CloudFront)"
    );
    "x-amz-cf-id" =     (
        "bdN13UKnvIIhzi1lhE03GpTJRXkK06HhH-mUVkEeFGtqPoMx4u3vyw=="
    );
    "x-amz-cf-pop" =     (
        "MAD53-P1"
    );
    "x-branch-request-id" =     (
        "d7ce1dcc8f8b48d587c19e5ec33606b0-2022082513"
    );
    "x-cache" =     (
        "Error from cloudfront"
    );
} }

Seems to be a Cloudfront issue, any way to be able to work around it?

"react-native-branch": "5.5.0", iOS 15.6.1

Thank you!

tamarabernad avatar Aug 25 '22 13:08 tamarabernad

Hi @tamarinda,

We didn't see any widespread outage around the window you reported. If this is still occurring, can you open a new issue? Additionally please enable debug logging in react-native ios by [RNBranch enableLogging]; in your AppDelegate class. This would be to see what the parameters of the requests are in case it's relevant.

We can debug further in a new thread.

Thanks!

gdeluna-branch avatar Aug 25 '22 20:08 gdeluna-branch

Hi @gdeluna-branch, Thank you for responding so quickly!

I tested enabling the logging, but I could not find any additional information than what I shared on the first log. I debugged with breakpoints and there is where I found a bit more information about Cloudfront.

This made me think, that it was probably a caching issue and probably due to a mismatch between testing key and production. The devices where we were experiencing similar issues, were testing devices where we switch between environments without deleting the app, but installing "on top". After deleting the app and re-installing it was working. This might be due to v1/install was called before v1/open and that might have done the trick.

Leaving this explanation here in case it can help for any potential fixes. I am not going to open a new thread because I will not be able to provide additional information since it is working for us now, hope that is ok.

Tamara

tamarabernad avatar Aug 26 '22 11:08 tamarabernad

That's an interesting angle since the error message sounds almost like a timeout which may have been a cache miss due to the misconfiguration. Good to know this perspective. Thanks for the follow up!

gdeluna-branch avatar Aug 26 '22 19:08 gdeluna-branch