If no session file available "kbox start" fails #565

Closed
reynoldsalec opened this Issue Oct 6, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@reynoldsalec
Contributor

reynoldsalec commented Oct 6, 2015

Received this error on running "kbox start":

Cannot read property 'name' of undefined
TypeError: Cannot read property 'name' of undefined
    at /Users/alec/kalabox/apps/cvt-working/plugins/kalabox-plugin-pantheon/lib/env.js:254:44
    at /usr/local/bin/lib/core/events.js.jx:147:11
    at /usr/local/bin/lib/core/events.js.jx:146:24
    at /usr/local/bin/lib/core/events.js.jx:130:23
    at process._tickCallback (node.js:812:13)

Doing a little debugging, it looks like kalabox-plugin-pantheon fails to retrieve a session file and can't retrieve the "name" attribute to assign to the git info.

I'm guessing this was because a session file wasn't available in ~/.kalabox/terminus/session and kbox start doesn't re-auth (unlike kbox pull, which appears to).

Adding a reAuthSession() to getSession() in client.js seems necessary, but I think that'd necessitate promise-ifying getSession(), which is called numerous times, so wanted to get professional opinions from @pirog and @bcauldwell before leaping into that and making a hot mess...

To Replicate

  • Remove session file from ~/.kalabox/terminus/session
  • Try "kbox start"
@pirog

This comment has been minimized.

Show comment
Hide comment
@pirog

pirog Oct 6, 2015

Member

Nice. solid bug report.

On Tue, Oct 6, 2015 at 1:20 PM, reynoldsalec notifications@github.com
wrote:

Received this error on running "kbox start":

Cannot read property 'name' of undefined
TypeError: Cannot read property 'name' of undefined
at /Users/alec/kalabox/apps/cvt-working/plugins/kalabox-plugin-pantheon/lib/env.js:254:44
at /usr/local/bin/lib/core/events.js.jx:147:11
at /usr/local/bin/lib/core/events.js.jx:146:24
at /usr/local/bin/lib/core/events.js.jx:130:23
at process._tickCallback (node.js:812:13)

Doing a little debugging, it looks like kalabox-plugin-pantheon fails to
retrieve a session file and can't retrieve the "name" attribute to assign
to the git info.

I'm guessing this was because a session file wasn't available in
~/.kalabox/terminus/session and kbox start doesn't re-auth (unlike kbox
pull, which appears to).

Adding a reAuthSession() to getSession() in client.js seems necessary, but
I think that'd necessitate promise-ifying getSession(), which is called
numerous times, so wanted to get professional opinions from @pirog
https://github.com/pirog and @bcauldwell https://github.com/bcauldwell
before leaping into that and making a hot mess...

To Replicate

  • Remove session file from ~/.kalabox/terminus/session
  • Try "kbox start"


Reply to this email directly or view it on GitHub
#565.

Mike

Mike Pirog
Co-Founder, Products
http://kalamuna.com

Stay connected with Kalamuna on: Twitter
http://t.sidekickopen01.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs1pwYhxW8qlTmx64kckdW8pTc_456dT6hf3BRzQ602?t=http%3A%2F%2Ftwitter.com%2Fkalamuna&si=5428072445640704&pi=f16b515d-1f50-46c7-aebf-11a0c79916b9
, Linkedin
http://t.sidekickopen01.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs1pwYhxW8qlTmx64kckdW8pTc_456dT6hf3BRzQ602?t=http%3A%2F%2Fwww.linkedin.com%2Fcompany%2F2584606&si=5428072445640704&pi=f16b515d-1f50-46c7-aebf-11a0c79916b9,
and Facebook
http://t.sidekickopen01.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs1pwYhxW8qlTmx64kckdW8pTc_456dT6hf3BRzQ602?t=http%3A%2F%2Fwww.facebook.com%2Fkalamunatech&si=5428072445640704&pi=f16b515d-1f50-46c7-aebf-11a0c79916b9

Member

pirog commented Oct 6, 2015

Nice. solid bug report.

On Tue, Oct 6, 2015 at 1:20 PM, reynoldsalec notifications@github.com
wrote:

Received this error on running "kbox start":

Cannot read property 'name' of undefined
TypeError: Cannot read property 'name' of undefined
at /Users/alec/kalabox/apps/cvt-working/plugins/kalabox-plugin-pantheon/lib/env.js:254:44
at /usr/local/bin/lib/core/events.js.jx:147:11
at /usr/local/bin/lib/core/events.js.jx:146:24
at /usr/local/bin/lib/core/events.js.jx:130:23
at process._tickCallback (node.js:812:13)

Doing a little debugging, it looks like kalabox-plugin-pantheon fails to
retrieve a session file and can't retrieve the "name" attribute to assign
to the git info.

I'm guessing this was because a session file wasn't available in
~/.kalabox/terminus/session and kbox start doesn't re-auth (unlike kbox
pull, which appears to).

Adding a reAuthSession() to getSession() in client.js seems necessary, but
I think that'd necessitate promise-ifying getSession(), which is called
numerous times, so wanted to get professional opinions from @pirog
https://github.com/pirog and @bcauldwell https://github.com/bcauldwell
before leaping into that and making a hot mess...

To Replicate

  • Remove session file from ~/.kalabox/terminus/session
  • Try "kbox start"


Reply to this email directly or view it on GitHub
#565.

Mike

Mike Pirog
Co-Founder, Products
http://kalamuna.com

Stay connected with Kalamuna on: Twitter
http://t.sidekickopen01.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs1pwYhxW8qlTmx64kckdW8pTc_456dT6hf3BRzQ602?t=http%3A%2F%2Ftwitter.com%2Fkalamuna&si=5428072445640704&pi=f16b515d-1f50-46c7-aebf-11a0c79916b9
, Linkedin
http://t.sidekickopen01.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs1pwYhxW8qlTmx64kckdW8pTc_456dT6hf3BRzQ602?t=http%3A%2F%2Fwww.linkedin.com%2Fcompany%2F2584606&si=5428072445640704&pi=f16b515d-1f50-46c7-aebf-11a0c79916b9,
and Facebook
http://t.sidekickopen01.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs1pwYhxW8qlTmx64kckdW8pTc_456dT6hf3BRzQ602?t=http%3A%2F%2Fwww.facebook.com%2Fkalamunatech&si=5428072445640704&pi=f16b515d-1f50-46c7-aebf-11a0c79916b9

@pirog

This comment has been minimized.

Show comment
Hide comment
@pirog

pirog Oct 6, 2015

Member

This will be fixed in 0.10.3.

Member

pirog commented Oct 6, 2015

This will be fixed in 0.10.3.

@pirog pirog closed this Oct 6, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment