question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'target' of null

See original GitHub issue

I’ve probably misconfigured something, but when I simply run backport --verbose it fails with:

✖ Loading commits...
TypeError: Cannot read property 'target' of null
    at Object.fetchCommitsByAuthor (/Users/rkorving/Projects/redacted/node_modules/backport/dist/services/github/fetchCommitsByAuthor.js:95:31)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)

which translates to https://github.com/sqren/backport/blob/2a100ccfe1c339ead0f3c985e920e19bcd4d11f3/src/services/github/fetchCommitsByAuthor.ts#L108

When I look in the verbose log, the last steps I see are:

2019-10-08T07:56:48.850Z verbose: {
  "repoOwner": "redacted-but-correct",
  "repoName": "redacted-but-correct",
  "commitsCount": 10,
  "authorId": "redacted-but-some-correct-looking-hash",
  "historyPath": null
}
2019-10-08T07:56:49.303Z verbose: {
  "data": {
    "repository": {
      "ref": null
    }
  }
}

I use github.com, a private repo, and I know I have commits in its history. I enabled these scopes when creating a token for it:

image

My project’s .backportrc.json file:

{
  "upstream": "myorg/myrepo",
  "branches": ["v0-master"],
  "all": true,
  "fork": true,
  "multipleCommits": true,
  "multipleBranches": true,
  "labels": ["backport"]
}

(I’ve tried with "all": false as well, but same result)

Backport v4.7.3.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sqrencommented, Oct 17, 2019

@ronkorving I’ve started a PR in #160. You can try it out by installing the beta version

yarn global add backport@beta or npm install -g backport@beta

LMK how it goes 🤞

0reactions
ronkorvingcommented, Oct 10, 2019

@sqren Assuming you’re onboard, shall we make a new issue for this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'target' of undefined - Stack Overflow
By when I try to load page with this component, I get error. Cannot read property 'target' of undefined. What am I doing...
Read more >
Cannot read property 'target' of null · Issue #10686 - GitHub
EDIT: I recognized that this is not the right way to build jquery (it needs to be checked out from github repo, and...
Read more >
Uncaught TypeError: Cannot read property of null - iDiallo
This error occurs when you read a property or call a method on a null object . That's because the DOM API returns...
Read more >
T159374 Getting error "Cannot read property 'target' of ...
Observe that, there is an error "Cannot read property 'target' of undefined" that appears briefly in the console. If I add something more...
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found