-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
access-api stacktraces in sentry are not working #623
Comments
related: #367 these starters from toucan-js seem like a promising direction. https://github.com/robertcepa/toucan-js#examples |
As long as we use d1 which requires After removing d1, we may be able to go back to |
I just learned some things:
I noticed this issue #254
So what I will try is upgrading toucan-js to >= 3.x, as suggested by #254 |
|
Motivation: * #623 * test theory that things will work if we upgrade to toucan-js@3, which is a rewrite that sends source maps in a new way
|
I've been trying to figure out what to try next, and just noticed:
|
oooh I should try what @olizilla did here (It's funny, I was reading this toucan-js issue thread and organically stumbled upon an @olizilla robertcepa/toucan-js#54 (comment) ) |
I should also try not using
I did just notice that this error, and the last one too, show more info if I click '...' and then check the 'minified' checkbox on the stack trace. Then I can see that this error is coming from inside a
|
) Motivation: * #623 (comment) * this was suggested by toucan-js author as no longer being needed in 3.0.0.
Motivation: * #623 - see if errors from this show up different than errors from ucanto HandlerExceptionError
I wondered if any part of it was due to the way I was triggering the error that got into sentry, which was a ucanto So I added a simple route that will throw an error (as oli had done while testing this type of thing). minified raw stack trace
If I uncheck 'minified'
Why would this be? (!!!) Brainstorms (I will think over weekend and ask for advice from @olizilla et al)
Other things worth trying:
|
-- Ideas
|
|
Motivation: * #623 * test theory that things will work if we upgrade to toucan-js@3, which is a rewrite that sends source maps in a new way
) Motivation: * #623 (comment) * this was suggested by toucan-js author as no longer being needed in 3.0.0.
Motivation: * #623 - see if errors from this show up different than errors from ucanto HandlerExceptionError
…gler bundling (#739) Motivation: * #623 * verify our assumption that we have to use `no_bundle=true` along with d1. Experiment * I wanted to try some new ways of building and whether they would work, but without risking staging, so I used the 'dev' environment from wrangler.toml to try some deploys from local. * I made access-api use of wrangler more like toucan-js@3 [wrangler-basic](https://github.com/robertcepa/toucan-js/blob/master/examples/wrangler-basic/wrangler.toml) * I did a sample deploy from my laptop to 'dev' workers environment, with the sentry/toucan `release` called `bengo-dev-0` [sentry errors here](https://protocol-labs-it.sentry.io/issues/?query=+release%3Abengo-dev-0&referrer=issue-list&statsPeriod=14d) * trigger error via `GET /.debug/error` * expectation: this to lead to an in-route error and show up in sentry with helpful stack traces - because this is what [example](https://github.com/robertcepa/toucan-js/blob/master/examples/wrangler-basic/wrangler.toml) implies should work * trigger error via route that uses d1 binding (e.g. ucanto routes [triggered via w3up+ucanto observable pointing to dev env](https://observablehq.com/d/a76545064f82a998)) * expectation: d1 error - because supposedly `no_bundle=false` (or omitting `no_bundle`) is incompatible with wrangler d1 bindings Findings: * omg it works! * [error triggered by GET /.debug/error (no d1)](https://protocol-labs-it.sentry.io/issues/4078173859/?query=+release%3Abengo-dev-0&referrer=issue-stream&statsPeriod=14d&stream_index=3) * [error triggered by using d1 via access protocol via observable](https://protocol-labs-it.sentry.io/issues/4078175792/?query=is%3Aunresolved+release%3Abengo-dev-0&referrer=issue-stream&statsPeriod=14d&stream_index=2) * The error did not happen in the `access/authorize` handler. That worked fine, and I got an email from dev env. The error happened when I clicked the email (invoking `access/confirm`), when the `access/confirm` invoacation handler tried to write to d1 * It got a D1_ERROR, but I could see from the sentry report > Error: ERROR 9009: SQL prepare error: no such table: delegations_v3 * which makes sense, because `dev` doesn't have latest migrations applied that created that table. So I provisioned a new d1 database for this dev env, and ran `npx wrangler --env=dev d1 migrations apply __D1_BETA__`. This would error every couple migrations, but if I re-ran it it would make progress and error again (`Internal error [code: 7501]`), but eventually it would succeed at all migrations. * then I re-triggered things via the observable, get email, click email. I saw 'email validated'! 🎉 * I continued using the observable to invoke `access/claim` (reads from D1), and got no error all the way through invoking from second device <details><img width="578" alt="Screenshot 2023-04-10 at 5 48 41 PM" src="https://user-images.githubusercontent.com/171782/231026937-25bd396b-8261-4a4e-9c8f-141ef9d2bbf8.png"></details>
🤖 I have created a release *beep* *boop* --- ## [6.1.0](access-api-v6.0.0...access-api-v6.1.0) (2023-04-14) ### Features * change access-api wrangler.toml to be no_bundle=false. use wrangler bundling ([#739](#739)) ([d659516](d659516)) ### Bug Fixes * access-api cli.js build does sourcemap=external instead of true ([#731](#731)) ([d1a35b7](d1a35b7)) * add /.debug/error route ([#732](#732)) ([2ca5de8](2ca5de8)) * change access-api src/index.js 'export default' to be an immediately-defined object in hopes stack traces will work better ([#733](#733)) ([a509313](a509313)), closes [#623](#623) * toucan-js in access-api does not use RewriteFrame integration ([#729](#729)) ([eeb90e6](eeb90e6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
bring in new `plan/set` invocation API from `w3up-client` and `access`
🤖 I have created a release *beep* *boop* --- ## [2.1.0](storacha/w3ui@core-v2.0.2...core-v2.1.0) (2024-02-01) ### Features * upgrade `core` dependencies for `plan/set` ([storacha#623](storacha/w3ui#623)) ([823b0ef](storacha/w3ui@823b0ef)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
bring in new `plan/set` invocation API from `w3up-client` and `access`
🤖 I have created a release *beep* *boop* --- ## [2.1.0](storacha/w3ui@core-v2.0.2...core-v2.1.0) (2024-02-01) ### Features * upgrade `core` dependencies for `plan/set` ([storacha#623](storacha/w3ui#623)) ([b48a864](storacha/w3ui@b48a864)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
No description provided.
The text was updated successfully, but these errors were encountered: