arabold / serverless-sentry-plugin

This plugin adds automatic forwarding of errors and exceptions to Sentry (https://sentry.io) and Serverless (https://serverless.com)
MIT License
155 stars 27 forks source link

Plugin defines a validation schema that is invalid #54

Closed mutahira-hafeez-qbatch closed 2 years ago

mutahira-hafeez-qbatch commented 2 years ago

I am trying to integrate Sentry with serverless:

Serverless Version: Framework Core: 3.1.0 Plugin: 6.0.0 SDK: 4.3.0

Serverless Sentry Plugin Version:

Production Dependency: "serverless-sentry-lib": "^2.4.0", "@sentry/node": "^6.17.9"

Dev Dependency:

"serverless-sentry": "^2.4.0",

It returns the following error:

At least one of the plugins defines a validation schema that is invalid. Try disabling plugins one by one to identify the problematic plugin and report it to the plugin maintainers.

If I remove the sentry plugin then it works fine.

zdziczkowski commented 2 years ago

We just bumped into this same problem when upgrading the Serverless Framework to v3 (previously v2). When we comment out serverless-sentry from the plugins section of our serverless.yml, we are able to successfully run sls package as before.

Here are the versions we are running:

When attempting to run sls package..., we get the following error message:

Error:
At least one of the plugins defines a validation schema that is invalid. Try disabling plugins one by one to identify the problematic plugin and report it to the plugin maintainers.

1 deprecation found: run 'serverless doctor' for more details
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

If we run sls doctor as directed, we get the following instructions:

Running "serverless" from node_modules 1 deprecation triggered in the last command:

CLI options definitions were upgraded with "type" property (which could be one of "string", "boolean", "multiple"). Below listed plugins do not predefine type for introduced options:

  • ServerlessOffline for "apiKey", "corsAllowHeaders", "corsAllowOrigin", "corsDisallowCredentials", "corsExposedHeaders", "disableCookieValidation", "enforceSecureCookies", "hideStackTraces", "host", "httpPort", "httpsProtocol", "lambdaPort", "noPrependStageInUrl", "noAuth", "ignoreJWTSignature", "noTimeout", "prefix", "printOutput", "resourceRoutes", "useChildProcesses", "useWorkerThreads", "websocketPort", "webSocketHardTimeout", "webSocketIdleTimeout", "useDocker", "layersDir", "dockerReadOnly", "functionCleanupIdleTimeSeconds", "allowCache", "dockerHost", "dockerHostServicePath", "dockerNetwork" Please report this issue in plugin issue tracker. Starting with next major release, this will be communicated with a thrown error. More info: https://serverless.com/framework/docs/deprecations/#CLI_OPTIONS_SCHEMA_V3

I am exploring disabling the deprecations from the new v3 schema and will update if a workaround solution is found.

davidjung1977 commented 2 years ago

Anything new here? I have the same issue.

pomelo-rich commented 2 years ago

Yep could do with some assistance on this too. I'm on serverless 3.11.0, node 14 and sentry plugin 2.4.0. This is the only thing that's stopping me using sls 3 now. Not sure how I can work around it, I need sentry.

pierot commented 2 years ago

Yep could do with some assistance on this too. I'm on serverless 3.11.0, node 14 and sentry plugin 2.4.0. This is the only thing that's stopping me using sls 3 now. Not sure how I can work around it, I need sentry.

You could use this guide to set up Sentry. Works perfectly. You might miss on some feature the plugin provided. But for basic error logging it has all the features you might need.

Udit-K commented 2 years ago

Same error. Dependencies I have - serverless - 3.11.0 serverless-sentry - 2.4.0 serverless-sentry-lib - 2.4.0 serverless-sentry-lib - 2.4.0 @sentry/node - 6.19.6

Thank you @pierot for the quickfix. This should do the trick for now but hopefully we see this being addressed in near future.

neslihankara commented 2 years ago

Having the same issue here. Could anyone with a workaround please share it with us? 👀

DonaldoLog commented 2 years ago

you could use npm i --save-dev arabold/serverless-sentry-plugin#pull/56/head while the PR is checked

dominik-meissner commented 2 years ago

@DonaldoLog thanks a lot for your work! @arabold it would be great if you release this one and we can go ahead with serverless v3

Gemineye commented 2 years ago

Any news here?

arabold commented 2 years ago

I've merged in the fix by @DonaldoLog and added another feature by @jonmast to upload source maps.

Gemineye commented 2 years ago

@arabold npm still shows 2.4.0. Do you have to publish it?

arabold commented 2 years ago

You're right. The publish aborted without me noticing. Sorry for that.