Exceptionless.JavaScript icon indicating copy to clipboard operation
Exceptionless.JavaScript copied to clipboard

Testing New JavaScript Workspaces Packages

Open polluterofminds opened this issue 4 years ago • 4 comments

Browser

  • [x] Can submit log
  • [x] Can submit error
  • [x] Errors stacking
  • [x] Unhandled errors sent to Exceptionless

React

  • [x] Can submit log
  • [x] Can submit error
  • [x] Errors stacking
  • [x] Unhandled errors sent to Exceptionless

Node

  • [x] Can submit log
  • [ ] Can submit error
  • [ ] Errors stacking
  • [ ] Unhandled errors sent to Exceptionless
  • [ ] 404s automatically sent to Exceptionless

Angular

  • [ ] Can submit log
  • [ ] Can submit error
  • [ ] Errors stacking
  • [ ] Unhandled errors sent to Exceptionless

polluterofminds avatar Apr 27 '21 13:04 polluterofminds

Node Errors

  • [ ] Exceptionless.createUnhandledException failing with Error running plugin "ErrorPlugin": self._createParsedCallSite is not a function. Discarding Event.
  • [ ] Exceptionless.submitException failing with Error running plugin "ErrorPlugin": self._createParsedCallSite is not a function. Discarding Event.

The error seems to be thrown in the error plugin here:

const result = await parser.parse(context, exception);

This is as a result of the client configuration not having errorParser defined:

const config = context.client.config;
const parser = config.services.errorParser;

polluterofminds avatar Apr 27 '21 13:04 polluterofminds

@polluterofminds is Exceptionless.startup() being called? That service is set inside of startup. https://github.com/exceptionless/Exceptionless.JavaScript/blob/feature/workspaces/packages/node/src/NodeExceptionlessClient.ts#L22

niemyjski avatar Apr 29 '21 12:04 niemyjski

@niemyjski Yep it is.

await Exceptionless.startup((c) => {
  c.apiKey = "TEST KEY";
  // c.serverUrl = "http://localhost:5000";
  c.useDebugLogger();

  c.defaultTags.push("Example", "Node");

  // set some default data
  c.defaultData["SampleUser"] = {
    id: 1,
    name: "Blake",
    password: "123456",
    passwordResetToken: "a reset token",
    myPasswordValue: "123456",
    myPassword: "123456",
    customValue: "Password",
    value: {
      Password: "123456",
    },
  };
});

Steps to repro coming...

polluterofminds avatar May 04 '21 13:05 polluterofminds

Exceptionless Node Bug in Express App:

NodeJS Version: v14.15.0 NPM version: 7.10.0

  1. cd example
  2. cd express
  3. Open example/express/app.js
  4. Make sure API key and server URL is properly configured
  5. npm run dev or npm run start
  6. Make a get request to http://localhost:3000/trycatch

polluterofminds avatar May 04 '21 13:05 polluterofminds

This has been fixed in the 2.0 release.

niemyjski avatar Feb 21 '23 13:02 niemyjski