Chris Visser
02/18/2022, 8:32 PMErnie Francis
02/18/2022, 8:53 PMAshishkumar Pandey
02/18/2022, 9:25 PMErnie Francis
02/18/2022, 9:36 PM[ERROR] 30:45.93 OAuth - Error handling auth response., [Error: attributes+required%3A+%5Bemail%5D]
when trying to sign in to my app with google. i have the email attribute mapped from google.Ernie Francis
02/18/2022, 10:09 PMRoberto Novelo
02/19/2022, 3:58 AM/api
web request will throw an HTTP 500 error and nothing will get logged in cloudwatch. It started happening after upgrading from sst 0.59.0
. How could I further troubleshoot this, or force logging or similar?Sulaiman Baig
02/19/2022, 4:48 AMnpx create-serverless-stack@latest notes
after I run this command
npx sst start
I got error shown in the image. plz guide me why it is happening even I did not change any codeNoah D
02/19/2022, 6:58 AMRDS
construct? Getting the following error message
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Object
at new NodeError (internal/errors.js:322:7)
at write_ (_http_outgoing.js:722:11)
at ClientRequest.write (_http_outgoing.js:687:15)
at C:\Users\noahd\Documents\Code\MendHealth\node_modules\@serverless-stack\core\dist\runtime\server.js:110:25
at Layer.handle [as handle_request] (C:\Users\noahd\Documents\Code\MendHealth\node_modules\express\lib\router\layer.js:95:5)
at next (C:\Users\noahd\Documents\Code\MendHealth\node_modules\express\lib\router\route.js:137:13)
at rawParser (C:\Users\noahd\Documents\Code\MendHealth\node_modules\body-parser\lib\types\raw.js:58:7)
at Layer.handle [as handle_request] (C:\Users\noahd\Documents\Code\MendHealth\node_modules\express\lib\router\layer.js:95:5)
at next (C:\Users\noahd\Documents\Code\MendHealth\node_modules\express\lib\router\route.js:137:13)
at next (C:\Users\noahd\Documents\Code\MendHealth\node_modules\express\lib\router\route.js:131:14)
143141db-f31f-4f14-b96e-2f0e1dbf4a8a ERROR Error: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only file and data URLs are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
at new NodeError (internal/errors.js:322:7)
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:814:11)
at Loader.resolve (internal/modules/esm/loader.js:89:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:242:28)
at Loader.import (internal/modules/esm/loader.js:177:28)
at importModuleDynamically (internal/modules/cjs/loader.js:1028:27)
at exports.importModuleDynamicallyCallback (internal/process/esm_loader.js:30:14)
at DynamicFileMigrationProvider.getMigrations (C:\Users\noahd\Documents\Code\MendHealth\.sst\artifacts\noah-mend-storage-stack-MendCoreDB-MigrationFunction\Users\noahd\Documents\Code\MendHealth\node_modules\@serverless-stack\resources\dist\RDS_migrator\index.js:23226:115)
at async Migrator.resolveMigrations_fn (C:\Users\noahd\Documents\Code\MendHealth\.sst\artifacts\noah-mend-storage-stack-MendCoreDB-MigrationFunction\Users\noahd\Documents\Code\MendHealth\node_modules\@serverless-stack\resources\dist\RDS_migrator\index.js:22030:25)
at async Migrator.getMigrations (C:\Users\noahd\Documents\Code\MendHealth\.sst\artifacts\noah-mend-storage-stack-MendCoreDB-MigrationFunction\Users\noahd\Documents\Code\MendHealth\node_modules\@serverless-stack\resources\dist\RDS_migrator\index.js:21889:24)
Adrian Schweizer
02/20/2022, 5:29 PMAR
02/20/2022, 7:52 PMgraphql-stack
. leaving the rds database stack defaults as they are, i'm getting a
\"message\":\"FATAL: database \\\"acme\\\" does not exist; SQLState: 3D000\"
it looks like the aurora instance was created successfully with the DB identifier dev-acme-database-<cluster-id>
when i check in the aws console.
checking the SST console I also am getting a "No RDS clusters in this app" message. do I need to change that RDS_DATABASE
value inside the database stack migrator
function?Ernie Francis
02/20/2022, 10:28 PMconst table = new sst.Table(this, "Counter", {
fields: {
counter: sst.TableFieldType.STRING,
},
primaryIndex: { partitionKey: "counter" },
});
but that is just one field in a table, what if a field contains another object? only options i get are string, number or binary.justindra
02/21/2022, 1:29 AMsst:deploy
and it seems to run fine without issues, and then I ran sst:start
and also seems fine. But when I go to apply the one migration I have, it's coming with this error and after looking at it, doesn't seem like it was run at all.
ERROR TypeError: Unknown file extension ".ts" for /home/test-postgres/stacks/db-migrations/2022-02-20.ts
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /home/test-postgres/stacks/db-migrations/2022-02-20.ts
at new NodeError (internal/errors.js:322:7)
at Loader.defaultGetFormat [as _getFormat] (internal/modules/esm/get_format.js:71:15)
at Loader.getFormat (internal/modules/esm/loader.js:105:42)
at Loader.getModuleJob (internal/modules/esm/loader.js:243:31)
at async Loader.import (internal/modules/esm/loader.js:177:17)
at async DynamicFileMigrationProvider.getMigrations (/home/test-postgres/.sst/artifacts/dev-klic-weather-station-StatickStack-RDSCluster-MigrationFunction/home/test-postgres/node_modules/@serverless-stack/resources/dist/RDS_migrator/index.js:13236:27)
at async Migrator.resolveMigrations_fn (/home/test-postgres/.sst/artifacts/dev-klic-weather-station-StatickStack-RDSCluster-MigrationFunction/home/test-postgres/node_modules/@serverless-stack/resources/dist/RDS_migrator/index.js:12040:25)
at async Migrator.getMigrations (/home/test-postgres/.sst/artifacts/dev-klic-weather-station-StatickStack-RDSCluster-MigrationFunction/home/test-postgres/node_modules/@serverless-stack/resources/dist/RDS_migrator/index.js:11899:24)
at async Runtime.handler (/home/test-postgres/.sst/artifacts/dev-klic-weather-station-StatickStack-RDSCluster-MigrationFunction/home/test-postgres/node_modules/@serverless-stack/resources/dist/RDS_migrator/index.js:13220:12)
The migration file is just called 2022-02-20.ts
and contains the following:
import { Kysely, sql } from 'kysely';
export async function up(db: Kysely<any>): Promise<void> {
await sql`CREATE EXTENSION postgis`.execute(db);
}
export async function down(db: Kysely<any>): Promise<void> {
await sql`DROP EXTENSION extensionName;`.execute(db);
}
So looks like it's not transpiling that TS file before running the migration? Is this expected or is there something that I should be enabling?Steven Chandra
02/21/2022, 3:04 AMJack Tan
02/21/2022, 3:51 AMERROR (node:9) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
This happens because one of my dependencies use the deprecated Buffer (I don't know which dependencies...), and even though this error only shows up if Buffer() is used outside of node_modules, SST bundles my project, meaning my dependencies code is outside of node_modules, hence this error occurs I think.
Does anyone else have this problem? Because of this, I'm constantly getting HTTP 500 when I call my API. I'm trying to disable this error but to no avail...Steven Chandra
02/21/2022, 5:08 AMGreg
02/21/2022, 7:44 AMqueue
-url from within a sqs consumer? I would like to add an other message to the queue when the lambda is finished - I would like to chain commands this way.
So I’m looking to achieve the following functionality . Unfortunately this doesn’t work since Property 'setDefaultFunctionProps' does not exist on type 'Queue'.
const queue = new sst.Queue(this, "Queue", {
consumer: {
function: "src/consumer.main",
consumerProps: {
batchSize: 1,
},
},
})
queue.setDefaultFunctionProps({
environment: { queueUrl: queue.sqsQueue.queueUrl },
})
Mr.9715
02/21/2022, 1:38 PMRoss Gerbasi
02/21/2022, 3:31 PMSecretValue.secretsManager
to add secret refs into our builds but then changing the secret value will not cause a delta, which means they get out of sync.
We have been using a NONCE in a .env
file we can randomize to force some updates, which isn't horrible but also not great. Is there a cleaner way to ask a stack to refresh its SSM references?Ross Gerbasi
02/21/2022, 3:34 PMapp.setDefaultFunctionProps
an Api's defaultFunctionProps
play together. For example if I added read only permission to a table at the app
level, then added full permission to that same table at the Api
creation level, would they merge? Maybe both are applied? Same for ENV variables, are they overridden?Sulaiman Baig
02/21/2022, 4:18 PMBshr Ramadan
02/21/2022, 5:30 PMKristian Lake
02/21/2022, 6:56 PMjustindra
02/21/2022, 9:30 PMAccessDeniedException: User: arn:aws:sts::[account-id]:assumed-role/dev-StaticStack-TestFunctionServiceRole6AB-GP14VRU9OK1W/dev-StaticStack-TestFunction22AD90FC-WMZHGEQhE67G is not authorized to perform: secretsmanager:GetSecretValue on resource: arn:aws:secretsmanager:us-west-2:[account-id]:secret:AuroraClusterSecret12D1355B-B2VD4Q3XORvi-sYJj1G because no identity-based policy allows the secretsmanager:GetSecretValue action
The stack code
const cluster = new RDS(this, 'AuroraCluster', {
engine: 'postgresql10.14',
defaultDatabaseName: DATABASE_NAME,
migrations: 'stacks/migrations/dist',
});
new Function(this, 'TestFunction', {
handler: 'services/sample/index.handler',
environment: {
DATABASE_NAME,
DATABASE_CLUSTER_ARN: cluster.clusterArn,
DATABASE_SECRET_ARN: cluster.secretArn,
},
permissions: [cluster],
});
Sam Hulick
02/21/2022, 11:17 PM/some/path/**/*
in that function’s zipGarret Harp
02/22/2022, 3:17 AMMarcos Sampaio
02/22/2022, 3:55 AMFranco Gotusso
02/22/2022, 9:04 AMAWS_NODEJS_CONNECTION_REUSE_ENABLED
is on, so I'm kinda lost here. Any idea or suggestion on where to look at? Many thanks!Lucas
02/22/2022, 10:04 AMEmil Styrke
02/22/2022, 10:24 AM{
"data": {
"events": null
},
"errors": [
{
"path": [
"events"
],
"data": null,
"errorType": "Runtime.UnhandledPromiseRejection",
"errorInfo": null,
"locations": [
{
"line": 28,
"column": 3,
"sourceName": null
}
],
"message": "TypeError: Cannot read property 'join' of undefined"
}
]
}
Is this expected?Yap Yee Qiang
02/22/2022, 10:51 AM