Skip to content
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

future/auth crashes with RPError #3761

Closed
lostra01 opened this issue May 13, 2024 · 0 comments
Closed

future/auth crashes with RPError #3761

lostra01 opened this issue May 13, 2024 · 0 comments

Comments

@lostra01
Copy link
Contributor

When using future/auth with SSTv2, on the callbacks, the site/route crashes with a timeout.

It seems like SST is trying to initialise adapters that are not in use, and due to the missing IDs and URLs, the connection times out, which in turn crashes the route. Refreshing the page 3-4 times solves it, but this is obviously not a solution that can go in a production build.

Attached is a log from an SSTv2 project that uses future/auth with only the codeAdapter and nothing else set up:

ERROR    Unhandled Promise Rejection     
{
    "errorType": "Runtime.UnhandledPromiseRejection",
    "errorMessage": "RPError: outgoing request timed out after 3500ms",
    "reason": {
        "errorType": "RPError",
        "errorMessage": "outgoing request timed out after 3500ms",
        "name": "RPError",
        "stack": [
            "RPError: outgoing request timed out after 3500ms",
            "    at file:///var/task/frontend/weave/portal/dist/server/entry.mjs:56335:17",
            "    at runNextTicks (node:internal/process/task_queues:60:5)",
            "    at listOnTimeout (node:internal/timers:538:9)",
            "    at process.processTimers (node:internal/timers:512:7)",
            "    at async Issuer.discover (file:///var/task/frontend/weave/portal/dist/server/entry.mjs:59171:27)",
            "    at async node_modules/.pnpm/[email protected]_@[email protected]/node_modules/sst/node/future/auth/adapter/google.js (file:///var/task/frontend/weave/portal/dist/server/entry.mjs:59444:14)"
        ]
    },
    "promise": {},
    "stack": [
        "Runtime.UnhandledPromiseRejection: RPError: outgoing request timed out after 3500ms",
        "    at process.<anonymous> (file:///var/runtime/index.mjs:1276:17)",
        "    at process.emit (node:events:517:28)",
        "    at emit (node:internal/process/promises:149:20)",
        "    at processPromiseRejections (node:internal/process/promises:283:27)",
        "    at processTicksAndRejections (node:internal/process/task_queues:96:32)",
        "    at runNextTicks (node:internal/process/task_queues:64:3)",
        "    at listOnTimeout (node:internal/timers:538:9)",
        "    at process.processTimers (node:internal/timers:512:7)"
    ]
}

The adapter that's crashing the route is always different. After adding Google to the list of available adapters, the Apple adapter is the one that's crashing instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant