Stripe tests are failing with "A network error has occurred, and you have not been charged"



Hey, ever since Friday, Mar 4th last week, our Stripe tests have been failing.
They fail with "A network error has occured …"
I have rebuilt a previously passing test, and now it is failing on the Stripe test.
Is there anything that could have changed in CircleCI over the weekend that could be affecting this?
Let me know if you think of anything.
for staff, you can see this in my build number 3302. It was the passing test that now, re run, is failing.


I was just about to post this issue as well. We’ve run into the same problem, also starting on the 4th, and haven’t found a solution.


good to know I’m not the only one. What have you tried so far?
I tried to add event.preventDefault() to the form submit part of my Stripejs handler. That didn’t do anything.
I tried to see if the code hit the back end after submitting the form, but it did not reach the back end.
Found the error message in the Stripe.js file. It seems to time out when trying to fetch the token from Stripe.


Honestly, we knew that it was code that we haven’t touched in awhile and our local test suite (and our production site) are fine, so we assumed the failure was due to a change on CircleCI. I haven’t had the time to dig into it much further than that… I’ll let you know if we find a solution on our end.


likewise from here


here is the response from Stripe support that we got


I’d not recommend making out of network requests in your continuous integration tests, but you’re welcome to do so. I suspect there could be a problem with the configuration there though. There’s no outages or anything that would suggest that there should be a network interruption.
Might I suggest trying to get the Stripe-Reachability [1] project to somehow run from within CircleCI? That might give you some insight as to what’s going wrong. Perhaps also try reaching out to the CircleCI team. They’re very knowledgeable (I know because I’ve worked with them in the past for my own projects). They may have some insight for you.
I know that’s probably not the answer you wanted, but I do hope it still helped. Please let me know if you have any more questions or concerns I can address for you. I’m always happy to help where I can.


Hey there, I’m wondering if you ever found a solution for this. We’ve noticed this problem in our repos as well, also starting last Friday. I’ve run the stripe reachability test and it seems to work fine when sshing into a circle box.


I also tried the stripe-reachability in ssh, but it seemed to be connecting fine.
I have emailed the CI team, and will hopefully get some attention on this issue.
Still no solution for this, if you find something, let us know


We were able to fix this by upgrading phantomJS to 2.1 (we were on phantom JS 1.9)
It seems like a stripe js change must have made it incompatible with the prior versions of webkit/phantomjs we were using. It kept failing at tokenizing a card.


Awesome! Nice work. Thanks for finding a solution.
I found this forum topic on how to change phantomjs to 2.1.1
Circle CI has 1.9 installed by default, and they will upgrade to 2.1 at some point.
Here is how you can do it.

    - sudo curl --output /usr/local/bin/phantomjs

check out these articles for more.


This was not a solution for me.
I was able to update phantomjs to 2.1.1, but my Stripe tests still failed in the same manner.

Too bad :frowning: