getsentry / sentry-java

A Sentry SDK for Java, Android and other JVM languages.
https://docs.sentry.io/
MIT License
1.14k stars 434 forks source link

Spring boot fresh project gives error 403 #2517

Closed abhinav-oyo closed 1 year ago

abhinav-oyo commented 1 year ago

Integration

sentry-spring-boot-starter

Java Version

8

Version

6.13.0

Steps to Reproduce

  1. Generate project through start.spring.io with Java 8, Maven, springboot-2.7.8 and Spring Web dependency.
  2. Create a sample controller and throw exception directly in default route.
  3. Add following properties to application.properties file -
    sentry.dsn=<redacted>
    sentry.debug=true
    sentry.exception-resolver-order=-2147483647
  4. Visit the route

I get following error in console -

ERROR: The transport failed to send the envelope with response code 403
ERROR: Envelope submission failed 
 java.lang.IllegalStateException: The transport failed to send the envelope with response code 403
java.lang.IllegalStateException: The transport failed to send the envelope with response code 403
    at io.sentry.transport.AsyncHttpTransport$EnvelopeSender.flush(AsyncHttpTransport.java:258)
    at io.sentry.transport.AsyncHttpTransport$EnvelopeSender.run(AsyncHttpTransport.java:197)

The full error log -

INFO: Initializing SDK with DSN: <redacted>
INFO: No outbox dir path is defined in options.
INFO: GlobalHubMode: 'false'
DEBUG: UncaughtExceptionHandlerIntegration enabled: true
DEBUG: UncaughtExceptionHandlerIntegration installed.
DEBUG: ShutdownHookIntegration installed.
2023-02-04 17:29:28.589  INFO 21463 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2023-02-04 17:29:28.597  INFO 21463 --- [           main] c.e.someproject.SomeprojectApplication   : Started SomeprojectApplication in 1.187 seconds (JVM running for 1.566)
2023-02-04 17:29:35.237  INFO 21463 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2023-02-04 17:29:35.238  INFO 21463 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2023-02-04 17:29:35.238  INFO 21463 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 0 ms
DEBUG: Capturing event: ee64cef82dac427aae97ea54cf0537d7
INFO: sentry-external-modules.txt file was not found.
INFO: Session is null on scope.withSession
2023-02-04 17:29:35.275 ERROR 21463 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: Oh Shitt] with root cause

java.lang.RuntimeException: Oh Shitt
    at com.example.someproject.MainController.getMain(MainController.java:11) ~[classes/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_202]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_202]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_202]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_202]
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) ~[spring-web-5.3.25.jar:5.3.25]
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150) ~[spring-web-5.3.25.jar:5.3.25]
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) ~[spring-webmvc-5.3.25.jar:5.3.25]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) ~[spring-webmvc-5.3.25.jar:5.3.25]
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.25.jar:5.3.25]
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.25.jar:5.3.25]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1071) ~[spring-webmvc-5.3.25.jar:5.3.25]
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:964) ~[spring-webmvc-5.3.25.jar:5.3.25]
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.25.jar:5.3.25]
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.3.25.jar:5.3.25]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:670) ~[tomcat-embed-core-9.0.71.jar:4.0.FR]
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.25.jar:5.3.25]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:779) ~[tomcat-embed-core-9.0.71.jar:4.0.FR]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) ~[tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.71.jar:9.0.71]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.71.jar:9.0.71]
    at io.sentry.spring.SentryUserFilter.doFilterInternal(SentryUserFilter.java:56) ~[sentry-spring-6.13.0.jar:na]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.25.jar:5.3.25]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.25.jar:5.3.25]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.25.jar:5.3.25]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.25.jar:5.3.25]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.25.jar:5.3.25]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.25.jar:5.3.25]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.25.jar:5.3.25]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.71.jar:9.0.71]
    at io.sentry.spring.SentrySpringFilter.doFilterInternal(SentrySpringFilter.java:71) ~[sentry-spring-6.13.0.jar:na]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.25.jar:5.3.25]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:177) ~[tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) [tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) [tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360) [tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399) [tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891) [tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784) [tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat-embed-core-9.0.71.jar:9.0.71]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.71.jar:9.0.71]
    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_202]

DEBUG: Serializing object: {
    "timestamp": "2023-02-04T11:59:35.258Z",
    "exception": {
        "values": [
            {
                "type": "RuntimeException",
                "value": "Oh Shitt",
                "module": "java.lang",
                "thread_id": 32,
                "stacktrace": {
                    "frames": [
                        {
                            "filename": "Thread.java",
                            "function": "run",
                            "module": "java.lang.Thread",
                            "lineno": 748,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "TaskThread.java",
                            "function": "run",
                            "module": "org.apache.tomcat.util.threads.TaskThread$WrappingRunnable",
                            "lineno": 61,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "ThreadPoolExecutor.java",
                            "function": "run",
                            "module": "org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker",
                            "lineno": 659,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "ThreadPoolExecutor.java",
                            "function": "runWorker",
                            "module": "org.apache.tomcat.util.threads.ThreadPoolExecutor",
                            "lineno": 1191,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "SocketProcessorBase.java",
                            "function": "run",
                            "module": "org.apache.tomcat.util.net.SocketProcessorBase",
                            "lineno": 49,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "NioEndpoint.java",
                            "function": "doRun",
                            "module": "org.apache.tomcat.util.net.NioEndpoint$SocketProcessor",
                            "lineno": 1784,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "AbstractProtocol.java",
                            "function": "process",
                            "module": "org.apache.coyote.AbstractProtocol$ConnectionHandler",
                            "lineno": 891,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "AbstractProcessorLight.java",
                            "function": "process",
                            "module": "org.apache.coyote.AbstractProcessorLight",
                            "lineno": 65,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "Http11Processor.java",
                            "function": "service",
                            "module": "org.apache.coyote.http11.Http11Processor",
                            "lineno": 399,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "CoyoteAdapter.java",
                            "function": "service",
                            "module": "org.apache.catalina.connector.CoyoteAdapter",
                            "lineno": 360,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "StandardEngineValve.java",
                            "function": "invoke",
                            "module": "org.apache.catalina.core.StandardEngineValve",
                            "lineno": 78,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "ErrorReportValve.java",
                            "function": "invoke",
                            "module": "org.apache.catalina.valves.ErrorReportValve",
                            "lineno": 92,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "StandardHostValve.java",
                            "function": "invoke",
                            "module": "org.apache.catalina.core.StandardHostValve",
                            "lineno": 135,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "AuthenticatorBase.java",
                            "function": "invoke",
                            "module": "org.apache.catalina.authenticator.AuthenticatorBase",
                            "lineno": 541,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "StandardContextValve.java",
                            "function": "invoke",
                            "module": "org.apache.catalina.core.StandardContextValve",
                            "lineno": 97,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "StandardWrapperValve.java",
                            "function": "invoke",
                            "module": "org.apache.catalina.core.StandardWrapperValve",
                            "lineno": 177,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "ApplicationFilterChain.java",
                            "function": "doFilter",
                            "module": "org.apache.catalina.core.ApplicationFilterChain",
                            "lineno": 162,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "ApplicationFilterChain.java",
                            "function": "internalDoFilter",
                            "module": "org.apache.catalina.core.ApplicationFilterChain",
                            "lineno": 189,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "OncePerRequestFilter.java",
                            "function": "doFilter",
                            "module": "org.springframework.web.filter.OncePerRequestFilter",
                            "lineno": 117,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "ApplicationFilterChain.java",
                            "function": "doFilter",
                            "module": "org.apache.catalina.core.ApplicationFilterChain",
                            "lineno": 162,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "ApplicationFilterChain.java",
                            "function": "internalDoFilter",
                            "module": "org.apache.catalina.core.ApplicationFilterChain",
                            "lineno": 189,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "OncePerRequestFilter.java",
                            "function": "doFilter",
                            "module": "org.springframework.web.filter.OncePerRequestFilter",
                            "lineno": 117,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "CharacterEncodingFilter.java",
                            "function": "doFilterInternal",
                            "module": "org.springframework.web.filter.CharacterEncodingFilter",
                            "lineno": 201,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "ApplicationFilterChain.java",
                            "function": "doFilter",
                            "module": "org.apache.catalina.core.ApplicationFilterChain",
                            "lineno": 162,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "ApplicationFilterChain.java",
                            "function": "internalDoFilter",
                            "module": "org.apache.catalina.core.ApplicationFilterChain",
                            "lineno": 189,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "OncePerRequestFilter.java",
                            "function": "doFilter",
                            "module": "org.springframework.web.filter.OncePerRequestFilter",
                            "lineno": 117,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "FormContentFilter.java",
                            "function": "doFilterInternal",
                            "module": "org.springframework.web.filter.FormContentFilter",
                            "lineno": 93,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "ApplicationFilterChain.java",
                            "function": "doFilter",
                            "module": "org.apache.catalina.core.ApplicationFilterChain",
                            "lineno": 162,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "ApplicationFilterChain.java",
                            "function": "internalDoFilter",
                            "module": "org.apache.catalina.core.ApplicationFilterChain",
                            "lineno": 189,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "OncePerRequestFilter.java",
                            "function": "doFilter",
                            "module": "org.springframework.web.filter.OncePerRequestFilter",
                            "lineno": 117,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "RequestContextFilter.java",
                            "function": "doFilterInternal",
                            "module": "org.springframework.web.filter.RequestContextFilter",
                            "lineno": 100,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "ApplicationFilterChain.java",
                            "function": "doFilter",
                            "module": "org.apache.catalina.core.ApplicationFilterChain",
                            "lineno": 162,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "ApplicationFilterChain.java",
                            "function": "internalDoFilter",
                            "module": "org.apache.catalina.core.ApplicationFilterChain",
                            "lineno": 189,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "OncePerRequestFilter.java",
                            "function": "doFilter",
                            "module": "org.springframework.web.filter.OncePerRequestFilter",
                            "lineno": 117,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "ApplicationFilterChain.java",
                            "function": "doFilter",
                            "module": "org.apache.catalina.core.ApplicationFilterChain",
                            "lineno": 162,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "ApplicationFilterChain.java",
                            "function": "internalDoFilter",
                            "module": "org.apache.catalina.core.ApplicationFilterChain",
                            "lineno": 189,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "WsFilter.java",
                            "function": "doFilter",
                            "module": "org.apache.tomcat.websocket.server.WsFilter",
                            "lineno": 53,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "ApplicationFilterChain.java",
                            "function": "doFilter",
                            "module": "org.apache.catalina.core.ApplicationFilterChain",
                            "lineno": 162,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "ApplicationFilterChain.java",
                            "function": "internalDoFilter",
                            "module": "org.apache.catalina.core.ApplicationFilterChain",
                            "lineno": 227,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "HttpServlet.java",
                            "function": "service",
                            "module": "javax.servlet.http.HttpServlet",
                            "lineno": 779,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "FrameworkServlet.java",
                            "function": "service",
                            "module": "org.springframework.web.servlet.FrameworkServlet",
                            "lineno": 883,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "HttpServlet.java",
                            "function": "service",
                            "module": "javax.servlet.http.HttpServlet",
                            "lineno": 670,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "FrameworkServlet.java",
                            "function": "doGet",
                            "module": "org.springframework.web.servlet.FrameworkServlet",
                            "lineno": 898,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "FrameworkServlet.java",
                            "function": "processRequest",
                            "module": "org.springframework.web.servlet.FrameworkServlet",
                            "lineno": 1006,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "DispatcherServlet.java",
                            "function": "doService",
                            "module": "org.springframework.web.servlet.DispatcherServlet",
                            "lineno": 964,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "DispatcherServlet.java",
                            "function": "doDispatch",
                            "module": "org.springframework.web.servlet.DispatcherServlet",
                            "lineno": 1071,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "AbstractHandlerMethodAdapter.java",
                            "function": "handle",
                            "module": "org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter",
                            "lineno": 87,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "RequestMappingHandlerAdapter.java",
                            "function": "handleInternal",
                            "module": "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter",
                            "lineno": 808,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "RequestMappingHandlerAdapter.java",
                            "function": "invokeHandlerMethod",
                            "module": "org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter",
                            "lineno": 895,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "ServletInvocableHandlerMethod.java",
                            "function": "invokeAndHandle",
                            "module": "org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod",
                            "lineno": 117,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "InvocableHandlerMethod.java",
                            "function": "invokeForRequest",
                            "module": "org.springframework.web.method.support.InvocableHandlerMethod",
                            "lineno": 150,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "InvocableHandlerMethod.java",
                            "function": "doInvoke",
                            "module": "org.springframework.web.method.support.InvocableHandlerMethod",
                            "lineno": 205,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "Method.java",
                            "function": "invoke",
                            "module": "java.lang.reflect.Method",
                            "lineno": 498,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "DelegatingMethodAccessorImpl.java",
                            "function": "invoke",
                            "module": "sun.reflect.DelegatingMethodAccessorImpl",
                            "lineno": 43,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "NativeMethodAccessorImpl.java",
                            "function": "invoke",
                            "module": "sun.reflect.NativeMethodAccessorImpl",
                            "lineno": 62,
                            "in_app": false,
                            "native": false
                        },
                        {
                            "filename": "NativeMethodAccessorImpl.java",
                            "function": "invoke0",
                            "module": "sun.reflect.NativeMethodAccessorImpl",
                            "in_app": false,
                            "native": true
                        },
                        {
                            "filename": "MainController.java",
                            "function": "getMain",
                            "module": "com.example.someproject.MainController",
                            "lineno": 11,
                            "in_app": true,
                            "native": false
                        }
                    ]
                },
                "mechanism": {
                    "type": "HandlerExceptionResolver",
                    "handled": false
                }
            }
        ]
    },
    "level": "fatal",
    "transaction": "GET /",
    "fingerprint": [],
    "modules": {},
    "event_id": "ee64cef82dac427aae97ea54cf0537d7",
    "contexts": {
        "runtime": {
            "name": "Oracle Corporation",
            "version": "1.8.0_202"
        }
    },
    "sdk": {
        "name": "sentry.java.spring-boot",
        "version": "6.13.0",
        "packages": [
            {
                "name": "maven:io.sentry:sentry",
                "version": "6.13.0"
            },
            {
                "name": "maven:io.sentry:sentry-spring-boot-starter",
                "version": "6.13.0"
            }
        ]
    },
    "request": {
        "url": "http://localhost:8080/",
        "method": "GET",
        "headers": {
            "sec-fetch-site": "none",
            "sec-fetch-user": "?1",
            "sec-ch-ua-mobile": "?0",
            "host": "localhost:8080",
            "upgrade-insecure-requests": "1",
            "connection": "keep-alive",
            "cache-control": "max-age=0",
            "sec-fetch-mode": "navigate",
            "accept-language": "en-GB,en-US;q=0.9,en;q=0.8",
            "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
            "sec-ch-ua": "\"Not_A Brand\";v=\"99\", \"Google Chrome\";v=\"109\", \"Chromium\";v=\"109\"",
            "sec-ch-ua-platform": "\"macOS\"",
            "accept-encoding": "gzip, deflate, br",
            "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
            "sec-fetch-dest": "document"
        }
    },
    "environment": "production",
    "platform": "java",
    "user": {},
    "server_name": "192.168.1.115",
    "breadcrumbs": [
        {
            "timestamp": "2023-02-04T11:59:35.242Z",
            "type": "http",
            "data": {
                "method": "GET",
                "url": "/"
            },
            "category": "http"
        }
    ]
}
ERROR: Request failed, API returned 403
ERROR: 

<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta name="robots" content="NONE,NOARCHIVE">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <link href="https://sentry.myorgdomain.io/_static/1675503790/sentry/images/favicon.ico" rel="shortcut icon" type="image/png"/>

  <link rel="icon" href="https://sentry.myorgdomain.io/_static/1675503790/sentry/images/icons/apple-touch-icon.png">
  <link rel="apple-touch-icon" href="https://sentry.myorgdomain.io/_static/1675503790/sentry/images/icons/apple-touch-icon.png">
  <link rel="apple-touch-icon" sizes="76x76" href="https://sentry.myorgdomain.io/_static/1675503790/sentry/images/icons/apple-touch-icon-76x76.png">
  <link rel="apple-touch-icon" sizes="120x120" href="https://sentry.myorgdomain.io/_static/1675503790/sentry/images/icons/apple-touch-icon-120x120.png">
  <link rel="apple-touch-icon" sizes="152x152" href="https://sentry.myorgdomain.io/_static/1675503790/sentry/images/icons/apple-touch-icon-152x152.png">

  <link rel="mask-icon" sizes="any" href="https://sentry.myorgdomain.io/_static/1675503790/sentry/images/icons/sentry-glyph-black.svg" color="#FB4226">

  <link href="/_static/1675503790/sentry/dist/sentry.css" rel="stylesheet"/>

  <title>CSRF Verification Failed | Sentry</title>

  <script>
    window.csrfCookieName = 'sc';
    window.__sentryGlobalStaticPrefix = '/_static/1675503790/sentry/dist/';
    window.__initialData = {"privacyUrl":null,"isOnPremise":true,"features":["auth:register"],"mediaUrl":"/_static/1675503790/sentry/","gravatarBaseUrl":"https://secure.gravatar.com","singleOrganization":true,"messages":[],"urlPrefix":"https://sentry.myorgdomain.io","dsn":"https://123@sentry.myorgdomain.io/1","needsUpgrade":false,"version":{"current":"9.1.2","build":"9.1.2","upgradeAvailable":true,"latest":"23.1.1"},"termsUrl":null,"user":null,"invitesEnabled":true,"statuspage":null,"supportEmail":"devops@myorgdomain.com","isAuthenticated":false,"lastOrganization":null};
    window.__languageCode = "en";
  </script>

<script>
  window.__SENTRY__OPTIONS = {
    dsn: 'https://123@sentry.myorgdomain.io/1',
    release: '9.1.2',
    whitelistUrls: ["*"]
  };
  window.__SENTRY__USER = {"ip_address":"10.25.13.205"} || undefined;
</script>

  <script src="/_static/1675503790/sentry/dist/vendor.js"></script>
  <script src="/_static/1675503790/sentry/dist/app.js"></script>

  <script>
    // if the ads.js file loads below it will mark this variable as false
    window.adblockSuspected = true;
  </script>
  <script src="/_static/1675503790/sentry/js/ads.js"></script>

</head>

<body class=" narrow">

  <div class="app">

<div id="blk_alerts" class="messages-container"></div>
<script>
$(function(){
  ReactDOM.render(React.createFactory(SentryApp.Alerts)({
     className: "alert-list"
  }), document.getElementById('blk_alerts'));
});
</script>
<div id="blk_indicators"></div>
<script>
$(function(){
  ReactDOM.render(React.createFactory(SentryApp.Indicators)({
     className: "indicators-container"
  }), document.getElementById('blk_indicators'));
});
</script>

    <div class="container">

      <div class="content">

<div class="pattern-bg"></div>
<section class="org-login">
  <div class="box box-modal">
    <div class="box-header">

        <a class="logo-with-action" href="/">

            <span class="icon-sentry-logo-full"></span>

        </a>

    </div>
    <div class="box-content with-padding">

    <section class="body">
        <div class="page-header">
            <h2>CSRF Verification Failed</h2>
        </div>

        <p>A required security token was not found or was invalid.</p>

        <p>If you're continually seeing this issue, try the following:</p>

        <ol>
          <li>Clear cookies (at least for Sentry's domain).</li>
          <li>Reload the page you're trying to submit (don't re-submit data).</li>
          <li>Re-enter the information, and submit the form again.</li>
        </ol>

          <p>You are seeing this message because Sentry requires a 'Referer
           header' to be sent by your Web browser, but none was sent. This header is
           required for security reasons, to ensure that your browser is not being
           hijacked by third parties.</p>

          <p>If you have configured your browser to disable 'Referer' headers, please
           re-enable them, at least for this site, or for HTTPS connections, or for
           'same-origin' requests.</p>

        <p>Read more about <a href="http://en.wikipedia.org/wiki/Cross-site_request_forgery">CSRF on Wikipedia</a>.</p>
    </section>

    </div>
  </div>
</section>

      </div>
    </div>
    <footer>
      <div class="container">

        <div class="pull-right">

          <a href="https://docs.sentry.io/hosted/api/">API</a>
          <a href="https://docs.sentry.io">Docs</a>
          <a href="https://github.com/getsentry/sentry" rel="noreferrer">Contribute</a>
          <a href="/out/">Migrate to SaaS</a>
        </div>
        <div class="version pull-left">Sentry 9.1.2 <a href="#" title="You're running an old version of Sentry, did you know 23.1.1 is available?" class="tip icon-circle-arrow-up">&nbsp;</a></div>
        <a href="/" class="icon-sentry-logo"></a>

      </div>
    </footer>
  </div>

  <script>
  $('.auto-select').click(function() {
    if (document.selection) {
      var range = document.body.createTextRange();
      range.moveToElementText(this.firstChild);
      range.select();
    } else if (window.getSelection) {
      var range = document.createRange();
      range.selectNode(this.firstChild);
      window.getSelection().addRange(range);
    }
  });
  </script>
  <script type="text/javascript">
  $(function() {
    // This is duplicated from <ProjectSelector>
    $('.project-dropdown').on('shown.bs.dropdown', function(event){
      $(event.target).find('input[type=text]').focus();
    });
  });
  </script>

</body>
</html>
ERROR: The transport failed to send the envelope with response code 403
ERROR: Envelope submission failed 
 java.lang.IllegalStateException: The transport failed to send the envelope with response code 403
java.lang.IllegalStateException: The transport failed to send the envelope with response code 403
    at io.sentry.transport.AsyncHttpTransport$EnvelopeSender.flush(AsyncHttpTransport.java:258)
    at io.sentry.transport.AsyncHttpTransport$EnvelopeSender.run(AsyncHttpTransport.java:197)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

Expected Result

It should send the exception without any errors

Actual Result

The exception resulted in Sentry not recording error and instead giving 403

adinauer commented 1 year ago

Hello @abhinav-oyo did you try sending an event right after just having created the project? If so, can you please retry. It may take some time before first events can be accepted.

adinauer commented 1 year ago

I tested using a DSN of a newly created project and wasn't able to reproduce the problem. Please reopen this issue if you still need help.