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.

GitHub App lambda failing on dev, sometimes

See original GitHub issue

Describe the bug Seeing errors in the logs like this:

errorType": "TypeError",
    "errorMessage": "Cannot read property 'full_name' of undefined",
    "stack": [
        "TypeError: Cannot read property 'full_name' of undefined",
        "    at processEvent (/var/task/index.js:121:44)",
        "    at Runtime.exports.handler (/var/task/index.js:174:5)",
        "    at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"
    ]

Anecdotally, adding repos doesn’t work in dev, although deleting branches does work for existing entities.

Steps to reproduce (I think, just reporting, haven’t tried it)

  1. Install GitHub app
  2. Add a .dockstore.yml

Additional context Note that dev is on an older version of the lambda, at master branch on commit ca214b6.

Seeing this sort of payload (truncated and redacted):

{
  "action": "added",
  "installation": {
  "repositories_added": [
    {
      "id": xxx,
      "node_id": "yyy",
      "name": "zzz",
      "full_name": "goo/foo",
      "private": false
    }
  ],
  "repositories_removed": [

  ],
 
}

This sort of error in the logs:

{
    "errorType": "TypeError",
    "errorMessage": "Cannot read property 'full_name' of undefined",
    "stack": [
        "TypeError: Cannot read property 'full_name' of undefined",
        "    at processEvent (/var/task/index.js:121:44)",
        "    at Runtime.exports.handler (/var/task/index.js:174:5)",
        "    at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"
    ]
}

Looks like index.js is looking for body.repository.full_name, but may need to look for body.repositories_added[i].full_name?

┆Issue is synchronized with this Jira Story ┆Issue Type: Story ┆Fix Versions: Dockstore 1.9 ┆Sprint: Sprint 35 Jellyfish ┆Issue Number: DOCK-1338

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
coverbeckcommented, May 7, 2020

I thought for @garyluu adding workflows via .dockstore.yml wasn’t working on dev. I researched it, found these errors and created a ticket. These particular messages may have been a red herring, but I don’t know if things are working overall.

BTW, latest deploy on dev has this fix.

1reaction
agduncan94commented, May 7, 2020

This is not a real error. Pretty much push events return a set of messages, but we only care about a subset. That subset has some expected fields which are not necessarily present in the rest of the set. The lambda didn’t know this, so it was checking for some fields in the rest of the set that are not actually there. The rest of the set is now ignored, so the error message shouldn’t occur anymore.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when deploy lambda error after sam application manually
Describe the bug. Trying to deploy sam application manually after deploy the lambda crash. To Reproduce Steps to reproduce the behavior: Environment Vars:....
Read more >
Causes app to fail startup on AWS Lambda · Issue #384 - GitHub
This works fine in a local development environment, but putting it on Lambda using Zappa, the app fails with a somewhat cryptic log:....
Read more >
Deployment Fails with "ResourceConflictException" in Lambda
Just re-confirmed that neither site has the add aws:states:opt-out as the lambda description workaround set. Both sites are using a github ...
Read more >
.NET ARM Lambda function using .NET 7 RC1 fails to start ...
Digging into the logs in CloudWatch show that the function is failing to start. ... This appears to be due to the AWS...
Read more >
Appsync Lambda Go: failed: Error: The stack named ... - GitHub
This means when upgrading you're running into the issues related to the topics here and here, please read through these docs to understand...
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