Hi there! Here's the issue I'm facing. I'm at the step where I've deployed FastAPI to an AWS Lambda...
a

adyus3380

about 3 years ago
Hi there! Here's the issue I'm facing. I'm at the step where I've deployed FastAPI to an AWS Lambda function via Mangum, with Supertokens successfully running (returns hello from /hello), the Lambda function accessing the API database, and the frontend accessing the API. All of these are tested. Unfortunately, I get a cryptic error in the post-signup handler:
response = await api_implementation.sign_up_post(
  File \"/var/task/app/users/utils.py\", line 93, in sign_up_post
    response = await original_sign_up_post(form_fields, api_options, user_context)
  File \"/var/lang/lib/python3.9/site-packages/supertokens_python/recipe/emailpassword/api/implementation.py\", line 199, in sign_up_post
    result = await api_options.recipe_implementation.sign_up(
  File \"/var/lang/lib/python3.9/site-packages/supertokens_python/recipe/emailpassword/recipe_implementation.py\", line 123, in sign_up
    response = await self.querier.send_post_request(
  File \"/var/lang/lib/python3.9/site-packages/supertokens_python/querier.py\", line 167, in send_post_request
    return await self.__send_request_helper(path, \"POST\", f, len(self.__hosts))
  File \"/var/lang/lib/python3.9/site-packages/supertokens_python/querier.py\", line 246, in __send_request_helper
    raise_general_exception(e)
  File \"/var/lang/lib/python3.9/site-packages/supertokens_python/exceptions.py\", line 25, in raise_general_exception
    raise GeneralError(msg) from None
supertokens_python.exceptions.GeneralError
Now, I've tried running the same FastAPI locally (sans Lambda), passing the same Supertokens instance and same API database in production (just the API running locally in uvicorn). I was able to successfully create a new user! Then, I was able to successfully sign in as that user via the frontend hitting the Lambda API 🤯 This tells me that the Lambda function does have access to the Supertokens deployment for signin functions, but mysteriously fails for signup.
Getting the following error when trying to send a verification e-mail: ```[INFO] 05:38:57 ts-node-d...
c

corgitaco

over 1 year ago
Getting the following error when trying to send a verification e-mail:
[INFO] 05:38:57 ts-node-dev ver. 2.0.0 (using ts-node ver. 10.9.2, typescript ver. 4.9.5)
API Server listening on port 3001
Error: 140384285034368:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:
where my smtp settings are:
ts
let smtpSettings = {
    host: "mail.privateemail.com",
    authUsername: "no-reply@website.com",
    password: "password",
    port: 587,
    from: {
        name: "Website No Reply",
        email: "no-reply@website.com"
    },
    secure: true
}
Tried switching to port 465 as well but that times out the connection w/ a 504 error and has the following server side error after 2 minutes:
Error: Connection timeout
    at SMTPConnection._formatError (/app/node_modules/nodemailer/lib/smtp-connection/index.js:790:19)
    at SMTPConnection._onError (/app/node_modules/nodemailer/lib/smtp-connection/index.js:776:20)
    at Timeout.<anonymous> (/app/node_modules/nodemailer/lib/smtp-connection/index.js:235:22)
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7)
I tried testing it in java like so and this does work: Ran some [tests]() on . so not sure what I'm doing entirely wrong on the NodeJS back end not sure if relevant at all but I am using NameCheap's mail service (
privateemail.com
) with the DNS handled through Cloudflare. Followed the instructions Namecheap provides [here]() & [here]() Hope that's everything you might need to assist me with my issue