-
Notifications
You must be signed in to change notification settings - Fork 114
TypeError: Cannot read property 'startsWith' of undefined #324
Comments
I'm trying to fix a coverage report that's outdated and ran into the same issue locally. Looks like Stack trace:
Notes
In my case, I opened a PR into a non-base branch and so This feels like a bug 🤔 Because if the codecov API returns |
Are there any known methods to fix this issue? Or do I just have to wait for the next update? Also, does the codecov Github action have the same problem or no? I might switch to just use that then |
Thanks for your thorough investigation, @jsjoeio. I'm not a maintainer of this project but your summary will certainly lead to a fix for this issue sooner for all of us. I'd like to correct you on your very last note. Given a defined string, String.prototype.split will return an array of at least size one wherein the first entry will be either: 1) the input string or, 2) if the string is splittable, the first segment of the splitted string. In terms of code: const example = 'Could not determine repo and owner';
// (1)
example.split('\n');
// => [ 'Could not determine repo and owner' ]
// (2)
example.split();
// => [ 'Could not determine repo and owner' ]
// (3)
example.split(example); // An exercise to the reader
// => …? Result of (3)The input string is splittable based on itself, unlike the previous two examples.[ '', '' ] |
I don't know the intention for why the body is being splitted to obtain the redirection URL but I suspect the logic is incorrect from a high level: Line 216 in 0ca520b
|
Oh wow...thank you for the simple example and the correction @RA80533 - I didn't realize that was how it would work! I was making guesses without testing.
Yeah, I think you're right. I tried pinging someone from codecov on Twitter but they never responded. I'll try again today. |
@jsjoeio any updates? |
@jonalexander sadly no :( The person from Codecov on Twitter never responded. I DM'd the Codecov brand account, nothing. Next steps, going to try getting in contact with the CEO 🤷♂️ |
I believe many of them are on vacation at the moment. @jonalexander, do you have the ability to point the version you're using to a separate repo or commit for the time being? |
One of the maintainers poked their head in to mention that they were on vacation. I believe it was in this very repository but I can't seem to find the comment. Additionally, I received a vacation response from a different team member at Codecov, indicating that they were also on vacation and would return on 2021-07-07. I imagine a lot of people are going to be taking an extra day or two off if they're in the U.S. since it's a holiday weekend. |
Thanks @RA80533 and @jsjoeio for researching this issue and contacting Codecov. In the meantime though, I just wanted to mention for the rest of us that the Github Action for Codecov still works for uploading code coverage reports, so if you use GitHub Actions for CI/CD you can use the Action instead of the npm package. |
@dragonejt good to know! Guess that will have to do in the meantime. P.S. saw you go to ASU — bear down 😜 |
Hey, @jsjoeio, did you ever get the response from Eli? What platform did you exchange messages with Jerrod? |
Hey y'all, stopping in here to say we have a big contingent of team back from vacation and jumping into this today. Sorry for delay! |
So any updates or is there a way for workaround ? |
Hi @danielsss, looking to deploy a fix for this later this week. Sorry for the delay here. |
I released |
I'm going to close this ticket out. If you are still experiencing this issue, feel free to comment back |
Were hoping it fixes this issue codecov/codecov-node#324
Were hoping it fixes this issue codecov/codecov-node#324
Since the last few weeks Codecov cannot upload coverage reports from Github Actions 100% of the time for some repositories. This causes a lot of work for us as all automated PRs like dependency updates must be merged manually.
We use the following command to upload our coverage:
The log from the CLI is the following:
The text was updated successfully, but these errors were encountered: