js-glaze icon indicating copy to clipboard operation
js-glaze copied to clipboard

Unhandled promise reject when creating definitions

Open Schwartz10 opened this issue 3 years ago • 1 comments

(node:32812) UnhandledPromiseRejectionWarning: null
(Use `node --trace-warnings ...` to show where the warning was created)
(node:32812) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:32812) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Code looks like:

await idx.createDefinition({
        name: "profile",
        schema: schemas.BasicProfile,
      }),

Where schemas.BasicProfile is "ceramic://bagcqcera4jj6ienfkpazjc4dczxnayxqy34fgt6zagx7ncxht4wnva"

Fwiw - the definition does come back seemingly ok - "profile":"ceramic://bagcqceraynhpmkz6vtermrsyvbqx2sow2sv3lfkj4smhg3e32iozak4nyeea"

I'm running:

identity-wallet: 2.0.0-alpha.5 @ceramicnetwork/ceramic-http-client: 0.5.12 @ceramicnetwork/ceramic-cli: 0.6.0, local commit: 7c75fff1917239086526763eee5303e33efb5482 (pulled develop today) js-idx on commit 1a2b66159f3375974177f70662e90324878ae9a8 js-idx-schemas on commit 99f671f8a3f160e4f7b59b716b26ebd697d30185

Schwartz10 avatar Sep 16 '20 15:09 Schwartz10

Hey @Schwartz10 sorry I missed this issue. Do you have more details about what is causing it please? If it's happening in the background and the definition DocID is returned, it might be coming from some Ceramic internals, I see similar warnings when running the tests.

PaulLeCam avatar Sep 22 '20 07:09 PaulLeCam