Linking to a new repository with bitbucket is causing an infinite loop calling

I’ve been going through the process of migrating our sites over to a monorepo, and it has been difficult due to this particular bug. We are currently hosting our repo using bitbucket, and it seems when we land on the branch selection page there is a lot of network traffic to our bitbucket https://api.bitbucket.org/2.0/repositories/earlytrade/{repo-name-here}/refs/branches?pagelen=100&page=82.
and it seems to be incrementing through the pages infinitely.

This seems to be causing issues not allowing me to select the new branch and deploy correctly (it seems like it is timing out).

I’m not sure if it is a permissions because all of the repositories branches display fine in the drop down.

Any help here would be appreciated.

Hmm, could you tell me the site ID (you can find it on the general settings page and it is safe to share in public!) of the site you have this configured on which isn’t working well? I may have some advice but will need to examine your specific config for that site.

Hi @fool, unfortunately I’ve already used the netlify-cli to achieve this.

I’ll search through some other old sites and see if I can reproduce the issue. If I can I’ll post the site ID back here.

It seems this happens in for all our bitbucket repositories. The specific site name was earlytrade-nde but this seems irrelevant.

Steps to reproduce:

  1. Select a repository using Bitbucket.


2. Select any repository. The particular one I chose was netlify-test-playground because of the low number of commits.


3. On the screen that you select your branch, you can see in the console there are many requests to the same endpoint with incrementing page numbers in the query. I believe this also causes issues where clicking Deploy Site caused a timeout.

@fool I hope this helps.

Thanks! Definitely a weird bug on the unnecessary paginations; I’ll get it filed for us. Same thing happens to me during setup.

This is however unrelated to any deploys timing out; we don’t do those kinds of API calls during the deployment process, only during site config.

@fool the deployment itself wasn’t timing out. I suspect the request isn’t even made due to the app processing the pagination requests.

After several hundred pagination calls been made (which isn’t hard to achieve when searching for the correct branch to deploy), clicking the Deploy Site button (seen in the last screenshot) would hang and show a timeout related message.

Hmm, if you can give me more details (exact error message/screenshot/URL), it would inform the bug report. As it stands, I couldn’t reproduce anything like that so didn’t include it in the report - but we’ll get the repo linking fixed up at least, since that was obvious!

I have also been unable to reproduce this in my testing repo, and it doesn’t currently affect any of our sites. If it shows up again I’ll report it in more detail.

We got a bugfix pushed for the front-end issue shortly after your last response. Thanks again for the report!

1 Like