Closed rohendra closed 1 month ago
@rohendra We're looking into this issue. In the meantime, as a temporary work-around, you can pin the version 4.2.5 as it doesn't have this issue.
Add this to serverless.yml
frameworkVersion: "4.2.5"
Hi there - we're hitting this same bug - ~I tried pinning to 4.2.5
as suggested but same error. Any other workarounds or suggestions at this time?~ My mistake - I pinned it incorrectly. Working fine with frameworkVersion
of 4.2.5
- thanks
@skierkowski Still getting same error.
We had already pinned version 4.2.5 in serverless config. See below. I have also uninstalled serverless and installed 4.2.5 version, still I get 4.3.2 when I do sls -v. See screenshot.
import type { AWS } from "@serverless/typescript"; import functions from "@functions"; import documentation from "./documentation";
const serverlessConfiguration: AWS = { org: "foundercrateti", app: "foundercrate-app", service: "foundercrate-api", frameworkVersion: "4.2.5", plugins: [ "serverless-offline", "serverless-domain-manager", "serverless-plugin-split-stacks", "serverless-openapi-security", "serverless-prune-plugin", "./disable-outputs.js", ],
@rohendra ~Please follow this guide to pin the version~.
edit: Sorry I haven't noticed you already added frameworkVersion
to the config.
@rohendra @jacobmaurer The fix has just been released in v4.3.3. Please give it a try and let us know if you’re still experiencing the issue.
@czubocha Thanks. Issue is resolved.
@rohendra @jacobmaurer The fix has just been released in v4.3.3. Please give it a try and let us know if you’re still experiencing the issue.
Appreciate the quick fix and heads up - confirming it's resolved as well.
Issue description
I have suddenly started getting below error since last 2 days. Even if I use the same code & config which has been successfully deployed earlier, still I get the same error.
✖ str2.indexOf is not a function TypeError: str2.indexOf is not a function at Object.validate (file:///home/ubuntu/.serverless/releases/4.3.2/package/dist/sf-core.js:369:30496) at Object.isArnInParam (file:///home/ubuntu/.serverless/releases/4.3.2/package/dist/sf-core.js:382:368405) at features.constructor.features.constructor.setupRequestListeners (file:///home/ubuntu/.serverless/releases/4.3.2/package/dist/sf-core.js:385:1503) at features.constructor.features.constructor.addAllRequestListeners (file:///home/ubuntu/.serverless/releases/4.3.2/package/dist/sf-core.js:354:83397) at features.constructor.features.constructor.makeRequest (file:///home/ubuntu/.serverless/releases/4.3.2/package/dist/sf-core.js:354:82515) at operation.authtype.svc. [as putObject] (file:///home/ubuntu/.serverless/releases/4.3.2/package/dist/sf-core.js:354:91878)
at file:///home/ubuntu/.serverless/releases/4.3.2/package/dist/sf-core.js:686:2786
at persistentRequest (file:///home/ubuntu/.serverless/releases/4.3.2/package/dist/sf-core.js:686:1969)
at Object.promiseGenerator (file:///home/ubuntu/.serverless/releases/4.3.2/package/dist/sf-core.js:686:2585)
at Queue2._dequeue (file:///home/ubuntu/.serverless/releases/4.3.2/package/dist/sf-core.js:388:48096)
at file:///home/ubuntu/.serverless/releases/4.3.2/package/dist/sf-core.js:388:47690
at new Promise ()
at Queue2.add (file:///home/ubuntu/.serverless/releases/4.3.2/package/dist/sf-core.js:388:47446)
at awsRequest (file:///home/ubuntu/.serverless/releases/4.3.2/package/dist/sf-core.js:686:2577)
at AwsProvider.request (file:///home/ubuntu/.serverless/releases/4.3.2/package/dist/sf-core.js:702:32353)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Context
Summary Report -----------------
Service Overview
Command
deploy --verbose true,--stage prod,--config serverless-v4.ts
Error Message
str2.indexOf is not a function
Error Stacktrace