getsentry / sentry-cli

A command line utility to work with Sentry.
https://docs.sentry.io/cli/
BSD 3-Clause "New" or "Revised" License
898 stars 221 forks source link

Sentry-CLI Explain says that source is already mapped #1714

Closed calvin-chan-smf closed 1 year ago

calvin-chan-smf commented 1 year ago

Environment

Steps to Reproduce

  1. Source maps were automatically set up using npx @sentry/wizard@latest -i sourcemaps
  2. Sentry was set up and I'm getting issues in our sentry console with no source maps configured
  3. Installed Sentry-Cli using curl command as per: https://docs.sentry.io/product/cli/installation/?original_referrer=https%3A%2F%2Fwww.google.com%2F
  4. sentry-cli --auth-token=XXX sourcemaps explain 8676c293e0e4431fa8c4a3dc6994cdee --org=XXX --project=XXX

Expected/Actual Result

Expected: Explanation of why the exception was not sourcemapped to a Nuxt3/Vue3 File

Actual: Console says that the exception is already source mapped and points to minified js file

✔ Fetched data for event: 8676c293e0e4431fa8c4a3dc6994cdee
✔ Event has release name: c1bededf6e608f688f09debd5a38ceca1cc2df26
✔ Event has a valid exception present
✔ Event has a valid stacktrace present
⚠ Exception is already source mapped and first resolved frame points to:

> {snip} eof e=="string")return new Lc(e);if(CC(e))return e;const a=new Lc(e.message??e.statusMessage,e.cause?{cause:e.cause}:void 0);if("stack"in e) {snip}
    * vue-router v4.2.2
    * (c) 2023 Eduardo San Martin Morote
    * @license MIT
  {snip} ,force:!0}),i.options.scrollBehavior=l1.scrollBehavior}catch(_){await e.runWithContext(()=>Q3(_))}}),{provide:{router:i}}}}),Bz=!1,Oz=!0;/*!
    * pinia v2.1.4

Logs

INFO 2023-08-09 12:19:52.674223 -07:00 Loaded config from /Users/cchan/.sentryclirc DEBUG 2023-08-09 12:19:52.674701 -07:00 sentry-cli version: 2.20.4, platform: "darwin", architecture: "arm64" INFO 2023-08-09 12:19:52.674734 -07:00 sentry-cli was invoked with the following command line: "sentry-cli" "--auth-token=XXX" "sourcemaps" "explain" "471b773f4a254e2c936ccb12a6817077" "--org=XXX" "--project=XXX" "--log-level=debug" DEBUG 2023-08-09 12:19:52.675913 -07:00 request GET https://sentry.io/api/0/projects/XXX/XXX/events/471b773f4a254e2c936ccb12a6817077/json/ DEBUG 2023-08-09 12:19:52.676133 -07:00 using token authentication DEBUG 2023-08-09 12:19:52.676375 -07:00 retry number 0, max retries: 0 DEBUG 2023-08-09 12:19:52.875007 -07:00 > GET /api/0/projects/XXX/XXX/events/471b773f4a254e2c936ccb12a6817077/json/ HTTP/1.1 DEBUG 2023-08-09 12:19:52.875052 -07:00 > Host: sentry.io DEBUG 2023-08-09 12:19:52.875057 -07:00 > Accept: / DEBUG 2023-08-09 12:19:52.875062 -07:00 > Connection: TE DEBUG 2023-08-09 12:19:52.875066 -07:00 > TE: gzip DEBUG 2023-08-09 12:19:52.875071 -07:00 > User-Agent: sentry-cli/2.20.4 DEBUG 2023-08-09 12:19:52.875498 -07:00 > Authorization: Bearer f7e1e62b** DEBUG 2023-08-09 12:19:53.098135 -07:00 < HTTP/1.1 200 OK DEBUG 2023-08-09 12:19:53.098234 -07:00 < Server: nginx DEBUG 2023-08-09 12:19:53.098247 -07:00 < Date: Wed, 09 Aug 2023 19:19:53 GMT DEBUG 2023-08-09 12:19:53.098257 -07:00 < Content-Type: application/json DEBUG 2023-08-09 12:19:53.098272 -07:00 < Content-Length: 12515 DEBUG 2023-08-09 12:19:53.098285 -07:00 < Connection: keep-alive DEBUG 2023-08-09 12:19:53.098291 -07:00 < Vary: Accept-Encoding DEBUG 2023-08-09 12:19:53.098297 -07:00 < vary: Accept-Encoding,Accept-Language, Cookie DEBUG 2023-08-09 12:19:53.098304 -07:00 < allow: GET, HEAD, OPTIONS DEBUG 2023-08-09 12:19:53.098326 -07:00 < access-control-allow-methods: GET, HEAD, OPTIONS DEBUG 2023-08-09 12:19:53.099292 -07:00 < access-control-allow-headers: X-Sentry-Auth, X-Requested-With, Origin, Accept, Content-Type, Authentication, Authorization, Content-Encoding, sentry-trace, baggage, X-CSRFToken DEBUG 2023-08-09 12:19:53.099304 -07:00 < access-control-expose-headers: X-Sentry-Error, Retry-After DEBUG 2023-08-09 12:19:53.099310 -07:00 < access-control-allow-origin: DEBUG 2023-08-09 12:19:53.099316 -07:00 < x-sentry-rate-limit-remaining: 39 DEBUG 2023-08-09 12:19:53.099323 -07:00 < x-sentry-rate-limit-limit: 40 DEBUG 2023-08-09 12:19:53.099329 -07:00 < x-sentry-rate-limit-reset: 1691608793 DEBUG 2023-08-09 12:19:53.099335 -07:00 < x-sentry-rate-limit-concurrentremaining: 24 DEBUG 2023-08-09 12:19:53.099344 -07:00 < x-sentry-rate-limit-concurrentlimit: 25 DEBUG 2023-08-09 12:19:53.099543 -07:00 < content-language: en DEBUG 2023-08-09 12:19:53.099550 -07:00 < x-frame-options: deny DEBUG 2023-08-09 12:19:53.099555 -07:00 < x-content-type-options: nosniff DEBUG 2023-08-09 12:19:53.099561 -07:00 < x-xss-protection: 1; mode=block DEBUG 2023-08-09 12:19:53.099571 -07:00 < content-security-policy: object-src 'self'; img-src blob: data:; script-src 'self' 'unsafe-inline' 'report-sample' 'unsafe-eval' s1.sentry-cdn.com js.sentry-cdn.com browser.sentry-cdn.com statuspage-production.s3.amazonaws.com static.zdassets.com aui-cdn.atlassian.com connect-cdn.atl-paas.net js.stripe.com ssl.google-analytics.com 'strict-dynamic' cdn.pendo.io data.pendo.io pendo-io-static.storage.googleapis.com pendo-static-5634074999128064.storage.googleapis.com; connect-src ; font-src data:; style-src 'unsafe-inline'; default-src ; frame-ancestors 'self' .sentry.io; base-uri 'none'; report-uri https://o1.ingest.sentry.io/api/54785/security/?sentry_key=f724a8a027db45f5b21507e7142ff78e&sentry_release=4a855563a8f13eec16deeb8858b9e509050eb45a DEBUG 2023-08-09 12:19:53.099729 -07:00 < x-envoy-attempt-count: 1 DEBUG 2023-08-09 12:19:53.099736 -07:00 < x-envoy-upstream-service-time: 116 DEBUG 2023-08-09 12:19:53.099742 -07:00 < x-served-by: getsentry-web-default-common-production-d558ff87-7bg97 DEBUG 2023-08-09 12:19:53.099749 -07:00 < x-served-by: frontend-default-5494b6bc88-vwplk DEBUG 2023-08-09 12:19:53.099755 -07:00 < strict-transport-security: max-age=31536000; includeSubDomains; preload DEBUG 2023-08-09 12:19:53.099761 -07:00 < Strict-Transport-Security: max-age=31536000; includeSubDomains; preload DEBUG 2023-08-09 12:19:53.099979 -07:00 response status: 200 DEBUG 2023-08-09 12:19:53.100004 -07:00 body: {"event_id":"471b773f4a254e2c936ccb12a6817077","project":4505675851825152,"release":"93c00f8c8e618af8a046d26326084f1694e0dfb4","dist":null,"platform":"javascript","message":"","datetime":"2023-08-09T18:02:55+00:00","tags":[["browser","Chrome 115.0.0"],["browser.name","Chrome"],["device","Mac"],["device.family","Mac"],["environment","production"],["handled","no"],["level","error"],["mechanism","onunhandledrejection"],["os","Mac OS X >=10.15.7"],["os.name","Mac OS X"],["release","93c00f8c8e618af8a046d26326084f1694e0dfb4"],["user","ip:172.218.174.55"],["url","https://tickets2024.staging.shambhalamusicfestival.com/products/tickets"]],"_metrics":{"bytes.ingested.event":3454,"bytes.stored.event":15095},"breadcrumbs":{"values":[{"timestamp":1691604170.52,"type":"default","category":"console","level":"info","message":"later","data":{"arguments":["later"],"logger":"console"}},{"timestamp":1691604170.624,"type":"http","category":"fetch","level":"info","data":{"method":"GET","status_code":200,"url":"/products/lodging/_payload.json"}},{"timestamp":1691604170.641,"type":"http","category":"fetch","level":"info","data":{"method":"GET","status_code":200,"url":"/_payload.json"}},{"timestamp":1691604170.641,"type":"http","category":"fetch","level":"info","data":{"method":"GET","status_code":200,"url":"/products/addons/_payload.json"}},{"timestamp":1691604170.642,"type":"http","category":"fetch","level":"info","data":{"method":"GET","status_code":200,"url":"/order/checkout/_payload.json"}},{"timestamp":1691604175.553,"type":"default","category":"ui.click","level":"info","message":"button.font-bold.text-sm.rounded-full.px-6.uppercase.h-10.hoverEffects.disabled:bg-gray-400.disabled:text-gray-500.bg-primary.text-secondary.hover:text-primary.hover:bg-secondary.add-to-cart-btn"}]},"contexts":{"browser":{"name":"Chrome","version":"115.0.0","type":"browser"},"device":{"family":"Mac","model":"Mac","brand":"Apple","type":"device"},"os":{"name":"Mac OS X","version":">=10.15.7","type":"os"},"trace":{"trace_id":"8197f2f1a8cf493ea484109383c1c6f5","span_id":"87ec0960caea45ea","status":"unknown","type":"trace"}},"culprit":"bc(entry)","debug_meta":{"images":[{"code_file":"https://tickets2024.staging.shambhalamusicfestival.com/_nuxt/entry.e8a8b43e.js","debug_id":"8c980774-6217-4eba-865a-12c311dee2e8","type":"sourcemap"}]},"environment":"production","errors":[{"type":"js_no_source","symbolicator_type":"missing_sourcemap","url":"https://tickets2024.staging.shambhalamusicfestival.com/_nuxt/entry.e8a8b43e.js"}],"exception":{"values":[{"type":"Error","value":"Invalid response from server","stacktrace":{"frames":[{"function":"async Object.$addCartItemQty","module":"entry","filename":"/_nuxt/entry.e8a8b43e.js","abs_path":"https://tickets2024.staging.shambhalamusicfestival.com/_nuxt/entry.e8a8b43e.js","lineno":812,"colno":29340,"pre_context":["{snip} ransactions)?((typeof SENTRY_DEBUG>\"u\"||SENTRY_DEBUG)&&i2.warn(Event dropped due to being matched by \\ignoreTransactions\option.","{snip} ,!0):ae2(e,a.denyUrls)?((typeof __SENTRY_DEBUG__>\"u\"||__SENTRY_DEBUG__)&&i2.warn(Event dropped due to being matched by \denyUrls\\ option.","Event: ${S3(e)}.","{snip} e,a.allowUrls)?!1:((typeof SENTRY_DEBUG>\"u\"||SENTRY_DEBUG)&&i2.warn(Event dropped due to not being matched by \\allowUrls\option.","Event: ${S3(e)}."],"context_line":"{snip} uantity});return}c.$showLoader();const{data:e2,pending:n2}=await n.$updateCartItemQty(t.value,P,l.value.code,X);throw c.$handleResponse(n2,e {snip}","post_context":["","//# debugId=8c980774-6217-4eba-865a-12c311dee2e8"],"in_app":true},{"function":"Object.$updateCartItemQty","module":"entry","filename":"/_nuxt/entry.e8a8b43e.js","abs_path":"https://tickets2024.staging.shambhalamusicfestival.com/_nuxt/entry.e8a8b43e.js","lineno":812,"colno":23374,"pre_context":["{snip} ransactions)?((typeof __SENTRY_DEBUG__>\"u\"||__SENTRY_DEBUG__)&&i2.warn(Event dropped due to being matched by \ignoreTransactions\\ option.","{snip} ,!0):ae2(e,a.denyUrls)?((typeof SENTRY_DEBUG>\"u\"||SENTRY_DEBUG)&&i2.warn(Event dropped due to being matched by \\denyUrls\option.","Event: ${S3(e)}.","{snip} e,a.allowUrls)?!1:((typeof __SENTRY_DEBUG__>\"u\"||__SENTRY_DEBUG__)&&i2.warn(Event dropped due to not being matched by \allowUrls\\ option.","Event: ${S3(e)}."],"context_line":"{snip} g:m,error:d,status:u}=await A1(i,l,\"$v47p7LL11G\");return t.$evaluateFetchStatus(u,d,\"Something went wrong while updating the cart items\"),{d {snip}","post_context":["","//# debugId=8c980774-6217-4eba-865a-12c311dee2e8"],"in_app":true},{"function":"Object.$evaluateFetchStatus","module":"entry","filename":"/_nuxt/entry.e8a8b43e.js","abs_path":"https://tickets2024.staging.shambhalamusicfestival.com/_nuxt/entry.e8a8b43e.js","lineno":812,"colno":20070,"pre_context":["{snip} ransactions)?((typeof SENTRY_DEBUG>\"u\"||SENTRY_DEBUG)&&i2.warn(Event dropped due to being matched by \\ignoreTransactions\option.","{snip} ,!0):ae2(e,a.denyUrls)?((typeof __SENTRY_DEBUG__>\"u\"||__SENTRY_DEBUG__)&&i2.warn(Event dropped due to being matched by \denyUrls\\ option.","Event: ${S3(e)}.","{snip} e,a.allowUrls)?!1:((typeof SENTRY_DEBUG>\"u\"||SENTRY_DEBUG)&&i2.warn(Event dropped due to not being matched by \\allowUrls\option.","Event: ${S3(e)}."],"context_line":"{snip} nTitle\"),bodyText:t.$t(\"poorConnectionBody\")}),a.$emit(Se),q1({statusCode:500,statusMessage:\"Invalid response from server\"});return a.$emit( {snip}","post_context":["","//# debugId=8c980774-6217-4eba-865a-12c311dee2e8"],"in_app":true},{"function":"q1","module":"entry","filename":"/_nuxt/entry.e8a8b43e.js","abs_path":"https://tickets2024.staging.shambhalamusicfestival.com/_nuxt/entry.e8a8b43e.js","lineno":1,"colno":111058,"context_line":"{snip} (e&&typeof e==\"object\"&&\"__nuxt_error\"in e),q1=e=>{const a=bc(e);return a.__nuxt_error=!0,a},w5={NuxtError:e=>q1(e),EmptyShallowRef:e=>D4(e= {snip}","post_context":[" * vue-router v4.2.2"," * (c) 2023 Eduardo San Martin Morote"," * @license MIT","{snip} ,force:!0}),i.options.scrollBehavior=l1.scrollBehavior}catch(_){await e.runWithContext(()=>Q3(_))}}),{provide:{router:i}}}}),Bz=!1,Oz=!0;/*!"," * pinia v2.1.4"],"in_app":true},{"function":"bc","module":"entry","filename":"/_nuxt/entry.e8a8b43e.js","abs_path":"https://tickets2024.staging.shambhalamusicfestival.com/_nuxt/entry.e8a8b43e.js","lineno":1,"colno":107897,"context_line":"{snip} eof e==\"string\")return new Lc(e);if(CC(e))return e;const a=new Lc(e.message??e.statusMessage,e.cause?{cause:e.cause}:void 0);if(\"stack\"in e) {snip}","post_context":[" * vue-router v4.2.2"," * (c) 2023 Eduardo San Martin Morote"," * @license MIT","{snip} ,force:!0}),i.options.scrollBehavior=l1.scrollBehavior}catch(_){await e.runWithContext(()=>Q3(_))}}),{provide:{router:i}}}}),Bz=!1,Oz=!0;/*!"," * pinia v2.1.4"],"in_app":true}]},"raw_stacktrace":{"frames":[{"function":"async Object.$addCartItemQty","filename":"/_nuxt/entry.e8a8b43e.js","abs_path":"https://tickets2024.staging.shambhalamusicfestival.com/_nuxt/entry.e8a8b43e.js","lineno":812,"colno":29340,"pre_context":["{snip} ransactions)?((typeof __SENTRY_DEBUG__>\"u\"||__SENTRY_DEBUG__)&&i2.warn(Event dropped due to being matched by \ignoreTransactions\\ option.","{snip} ,!0):ae2(e,a.denyUrls)?((typeof SENTRY_DEBUG>\"u\"||SENTRY_DEBUG)&&i2.warn(Event dropped due to being matched by \\denyUrls\option.","Event: ${S3(e)}.","{snip} e,a.allowUrls)?!1:((typeof __SENTRY_DEBUG__>\"u\"||__SENTRY_DEBUG__)&&i2.warn(Event dropped due to not being matched by \allowUrls\\ option.","Event: ${S3(e)}."],"context_line":"{snip} uantity});return}c.$showLoader();const{data:e2,pending:n2}=await n.$updateCartItemQty(t.value,P,l.value.code,X);throw c.$handleResponse(n2,e {snip}","post_context":["","//# debugId=8c980774-6217-4eba-865a-12c311dee2e8"],"in_app":true},{"function":"Object.$updateCartItemQty","filename":"/_nuxt/entry.e8a8b43e.js","abs_path":"https://tickets2024.staging.shambhalamusicfestival.com/_nuxt/entry.e8a8b43e.js","lineno":812,"colno":23374,"pre_context":["{snip} ransactions)?((typeof SENTRY_DEBUG>\"u\"||SENTRY_DEBUG)&&i2.warn(Event dropped due to being matched by \\ignoreTransactions\option.","{snip} ,!0):ae2(e,a.denyUrls)?((typeof __SENTRY_DEBUG__>\"u\"||__SENTRY_DEBUG__)&&i2.warn(Event dropped due to being matched by \denyUrls\\ option.","Event: ${S3(e)}.","{snip} e,a.allowUrls)?!1:((typeof SENTRY_DEBUG>\"u\"||SENTRY_DEBUG)&&i2.warn(Event dropped due to not being matched by \\allowUrls\option.","Event: ${S3(e)}."],"context_line":"{snip} g:m,error:d,status:u}=await A1(i,l,\"$v47p7LL11G\");return t.$evaluateFetchStatus(u,d,\"Something went wrong while updating the cart items\"),{d {snip}","post_context":["","//# debugId=8c980774-6217-4eba-865a-12c311dee2e8"],"in_app":true},{"function":"Object.$evaluateFetchStatus","filename":"/_nuxt/entry.e8a8b43e.js","abs_path":"https://tickets2024.staging.shambhalamusicfestival.com/_nuxt/entry.e8a8b43e.js","lineno":812,"colno":20070,"pre_context":["{snip} ransactions)?((typeof __SENTRY_DEBUG__>\"u\"||__SENTRY_DEBUG__)&&i2.warn(Event dropped due to being matched by \ignoreTransactions\\ option.","{snip} ,!0):ae2(e,a.denyUrls)?((typeof SENTRY_DEBUG>\"u\"||SENTRY_DEBUG)&&i2.warn(Event dropped due to being matched by \\denyUrls\option.","Event: ${S3(e)}.","{snip} e,a.allowUrls)?!1:((typeof __SENTRY_DEBUG__>\"u\"||__SENTRY_DEBUG__)&&i2.warn(Event dropped due to not being matched by \allowUrls\\ option.","Event: ${S3(e)}."],"context_line":"{snip} nTitle\"),bodyText:t.$t(\"poorConnectionBody\")}),a.$emit(Se),q1({statusCode:500,statusMessage:\"Invalid response from server\"});return a.$emit( {snip}","post_context":["","//# debugId=8c980774-6217-4eba-865a-12c311dee2e8"],"in_app":true},{"function":"q1","filename":"/_nuxt/entry.e8a8b43e.js","abs_path":"https://tickets2024.staging.shambhalamusicfestival.com/_nuxt/entry.e8a8b43e.js","lineno":1,"colno":111058,"context_line":"{snip} (e&&typeof e==\"object\"&&\"__nuxt_error\"in e),q1=e=>{const a=bc(e);return a.__nuxt_error=!0,a},w5={NuxtError:e=>q1(e),EmptyShallowRef:e=>D4(e= {snip}","postcontext":[" vue-router v4.2.2"," (c) 2023 Eduardo San Martin Morote"," * @license MIT","{snip} ,force:!0}),i.options.scrollBehavior=l1.scrollBehavior}catch(){await e.runWithContext(()=>Q3(_))}}),{provide:{router:i}}}}),Bz=!1,Oz=!0;/!"," pinia v2.1.4"],"in_app":true},{"function":"bc","filename":"/_nuxt/entry.e8a8b43e.js","abs_path":"https://tickets2024.staging.shambhalamusicfestival.com/_nuxt/entry.e8a8b43e.js","lineno":1,"colno":107897,"context_line":"{snip} eof e==\"string\")return new Lc(e);if(CC(e))return e;const a=new Lc(e.message??e.statusMessage,e.cause?{cause:e.cause}:void 0);if(\"stack\"in e) {snip}","postcontext":[" vue-router v4.2.2"," (c) 2023 Eduardo San Martin Morote"," * @license MIT","{snip} ,force:!0}),i.options.scrollBehavior=l1.scrollBehavior}catch(){await e.runWithContext(()=>Q3(_))}}),{provide:{router:i}}}}),Bz=!1,Oz=!0;/!"," pinia v2.1.4"],"in_app":true}]},"mechanism":{"type":"onunhandledrejection","handled":false}}]},"fingerprint":["{{ default }}"],"grouping_config":{"enhancements":"eJybzDRxc15qeXFJZU6qlZGBkbGugaGuoeEEAHJMCAM","id":"newstyle:2023-01-11"},"hashes":["27d85048caca94059fe2330c1c621238"],"ingest_path":[{"version":"23.7.2","public_key":"XE7QiyuNlja9PZ7I9qJlwQotzecWrUIN91BAO7Q5R38"}],"key_id":"3310666","level":"error","location":"/_nuxt/entry.e8a8b43e.js","logger":"","metadata":{"display_title_with_tree_label":false,"filename":"/_nuxt/entry.e8a8b43e.js","function":"bc","type":"Error","value":"Invalid response from server"},"nodestore_insert":1691604195.944773,"received":1691604175.722048,"request":{"url":"https://tickets2024.staging.shambhalamusicfestival.com/products/tickets","headers":[["User-Agent","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"]]},"sdk":{"name":"sentry.javascript.browser","version":"7.62.0","integrations":["InboundFilters","FunctionToString","TryCatch","Breadcrumbs","GlobalHandlers","LinkedErrors","Dedupe","HttpContext"],"packages":[{"name":"npm:@sentry/browser","version":"7.62.0"}]},"timestamp":1691604175.63,"title":"Error: Invalid response from server","type":"error","user":{"ip_address":"172.218.174.55","geo":{"country_code":"CA","city":"Richmond","subdivision":"British Columbia","region":"Canada"}},"version":"7"}

calvin-chan-smf commented 1 year ago

I resolved my own issue by enabling client-side sourcemaps for a static site built in nuxt. But the error here was deceiving as it indicated that I may have had nothing else to try,

kamilogorek commented 1 year ago

Duplicate of https://github.com/getsentry/sentry-cli/issues/1694 Will close this one to track the issue in one place.