Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log shows UnhandledPromiseRejection #77

Open
kroese opened this issue May 21, 2022 · 6 comments
Open

Log shows UnhandledPromiseRejection #77

kroese opened this issue May 21, 2022 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@kroese
Copy link

kroese commented May 21, 2022

  • rebalancing from A to B
  • remaining amount: 1,000,000
  • time left: 30 mins
    node:internal/process/promises:279
    triggerUncaughtException(err, true /* fromPromise */);
    ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "[object Array]".] {
code: 'ERR_UNHANDLED_REJECTION'
}

@itsneski itsneski added the bug Something isn't working label May 22, 2022
@itsneski
Copy link
Owner

itsneski commented May 26, 2022

related to #79, full exception stack will be printed once #79 is submitted.

@itsneski
Copy link
Owner

itsneski commented Jun 3, 2022

The changes for #79 have been pushed to prod. Could you do git pull and jet restart all then retry. Please copy & paste the exception stack if any. Thanks.

@itsneski itsneski self-assigned this Jun 3, 2022
@kroese
Copy link
Author

kroese commented Jun 3, 2022

I updated to the latest version:

When running jet monitor --status after a while it aborts with:

/app/api/analyze-fees.js:28
        let list = analyzeFees(c.name, c.peer, feeMap[c.peer].local, feeMap[c.peer].remote);
                                                              ^

TypeError: Cannot read properties of undefined (reading 'local')
    at /app/api/analyze-fees.js:28:63
    at Array.forEach (<anonymous>)
    at doIt (/app/api/analyze-fees.js:27:16)
    at rebalanceStatus (/app/api/analyze-fees.js:21:20)
    at runMonitorStatusLoop (/app/jet:625:13)
    at /app/jet:443:9
    at new Promise (<anonymous>)
    at Command._action (/app/jet:436:12)
    at Command._run (/app/node_modules/caporal/lib/command.js:483:42)
    at Program._run (/app/node_modules/caporal/lib/program.js:183:16)
    at Program.parse (/app/node_modules/caporal/lib/program.js:289:17)
    at Object.<anonymous> (/app/jet:614:5)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)

The rebalance logfiles for a channel shows error like this:

/app/api/rebalance.js:520
      n.channels = nodeInfo[n.id].num_channels;
                                  ^

TypeError: Cannot read properties of undefined (reading 'num_channels')
    at /app/api/rebalance.js:520:35
    at Array.forEach (<anonymous>)
    at printStats (/app/api/rebalance.js:517:11)
    at module.exports (/app/api/rebalance.js:475:3)
    at Object.apply (/app/node_modules/import-lazy/index.js:16:20)
    at Object.<anonymous> (/app/service/utils/rebalance-proc:38:1)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)

and

-------------------------------------------
unidentified error {
  "code": 503,
  "error": "UnexpectedErrorWhenPayingViaRoute",
  "original": [
    503,
    "UnexpectedErrorWhenPayingViaRoute",
    {
      "err": {
        "code": 2,
        "details": "permission denied",
        "metadata": {
          "content-type": [
            "application/grpc"
          ]
        }
      }
    }
  ]
}  exiting


All attempts show 'unidentifiedError' and status 'failed'

@itsneski
Copy link
Owner

itsneski commented Jun 3, 2022

an unknown peer might have caused it, basically, a node that disappeared where you still have a channel or by a newly established channel where the fee data has not yet been propagated by gossip. do either apply in your case?

@kroese
Copy link
Author

kroese commented Jun 3, 2022

Yes, I think so. I have resynced the graph and although im fully synced it has not yet retrieved the policies for all channels.

However when I first reported the issue there was nothing wrong with my graph or channels yet. So it could be that these errors are unrelated to my initial problem.

It would be really nice if Jet just ignored these channels instead of crashing.

@dannydeezy
Copy link

i have the same issue, the peer's policy is undefined)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants