AndrewKeig/advanced-express-application-development

Github Commits - Fatal error: Cannot convert null to object

Closed this issue · 3 comments

Hello. When running test on completion of the Commits feature ending on page 39, I get the following error:

Fatal error: Cannot convert null to object

I have copy/pasted from source, but I still get the same error. Running tests from the source work, so I'm not sure where I've made a mistake.

I've tried logging out the response, commits, etc, but that's not really getting me anywhere. From what I can tell, the response text for 'project/:id/commits' is coming back as [], but when I log the response or commits variables, I get no output, which means their null.

I can copy the source from the repo over, but I'd really like to know where my mistake is, and would appreciate if you could take a look.

Thank you!

Hey, does your repo have this code? I'll take a look. Thanks

Yes, my latest is checked in. I've logged out quite a few of the variables
and followed the execution path, but I can't seem to find where commits
is being set as Null.

Thanks for taking the time to look!
On Feb 10, 2014 6:40 PM, "Andrew Keig" notifications@github.com wrote:

Hey, does your repo have this code? I'll take a look. Thanks

Reply to this email directly or view it on GitHubhttps://github.com//issues/8#issuecomment-34706432
.

Hey

A couple of points:

  • When creating a project add a repository which you own; node-plates you don't own:

var proj = {
name: "test name",
deleted: false,
user: login.user,
token: login.token,
repositories: ["vision"]
};

  • Increase the timeout if time exceeded; your connection may be slow:
    this.timeout(7000);
  • The following may not work for your repositories; dump the payload and check:

assert(.has(commit, 'login'));
assert(
.has(commit, 'avatar_url'));