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

Amplify status: providers is not iterable #13400

Closed
7 of 14 tasks
harrynguyenangle opened this issue Nov 9, 2023 · 7 comments
Closed
7 of 14 tasks

Amplify status: providers is not iterable #13400

harrynguyenangle opened this issue Nov 9, 2023 · 7 comments
Labels
pending-response Issue is pending response from the issue author pending-triage Issue is pending triage platform Issues tied to the general CLI platform

Comments

@harrynguyenangle
Copy link

Description

Suddenly I have this issue below when running command locally Amplify status
I did upgrade latest version of Amplify

Current Environment: prod

│ Category │ Resource name │ Operation │ Provider plugin │
│ Analytics │ *************** │ No Change │ awscloudformation │
│ Api │ ************* │ No Change │ awscloudformation │
│ Auth │ ************* │ No Change │ awscloudformation │
│ Storage │************* │ No Change │ awscloudformation │

🛑 providers is not iterable

Resolution: Please report this issue at https://github.com/aws-amplify/amplify-cli/issues and include the project identifier from: 'amplify diagnose --send-report'
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/

Session Identifier: f3ef178a-b41d-4494-8a9d-e440029aa27b
⠋ Creating Zip
The "path" argument must be of type string. Received undefined
✖ Creating Zip

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Notifications (Push)
  • Storage

Steps to Reproduce

Running command: "Amplify status"

Screenshots

No response

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

3.13.9

Amplify Flutter Version

1.6.

Deployment Method

Amplify CLI

Schema

No response

@Jordan-Nelson Jordan-Nelson added the pending-triage Issue is pending triage label Nov 9, 2023
@Jordan-Nelson Jordan-Nelson transferred this issue from aws-amplify/amplify-flutter Nov 9, 2023
@ykethan
Copy link
Member

ykethan commented Nov 9, 2023

Hey @harrynguyen2510, in the amplify/.config folder could you open the project-config file, as this should contain the providers for the project. could you provide us the contents of the file. note: the .config folder may be hidden in vscode, at the top the project could you open the .vscode/settings.json and set amplify/.config as false.
Could you try running amplify configure project, select Project information and go through the cli flow and then try running the command?
Additionally, could you try running amplify status --debug and provide us the output?

@ykethan ykethan added platform Issues tied to the general CLI platform pending-response Issue is pending response from the issue author labels Nov 9, 2023
@harrynguyenangle
Copy link
Author

harrynguyenangle commented Nov 10, 2023

After setting it false like this
{ "files.exclude": { "amplify/.config": false, "amplify/**/*-parameters.json": true, "amplify/**/amplify.state": true, "amplify/**/transform.conf.json": true, "amplify/#current-cloud-backend": true, "amplify/backend/amplify-meta.json": true, "amplify/backend/awscloudformation": true } }

And running command: amplify configure project
This is output:
`Project information
| Name: undefined
| Environment: prod
| Default editor: vscode
| App type: javascript
| Javascript framework: none
| Source Directory Path: src
| Distribution Directory Path: dist
| Build Command: npm run-script build
| Start Command: npm run-script start

Advanced: Container-based deployments
| Leverage container-based deployments: No

? Which setting do you want to configure? Project information
? Enter a name for the project Projectname
? Choose your default editor: Visual Studio Code
✔ Choose the type of app that you're building · flutter
Please tell us about your project
? Where do you want to store your configuration file? ./lib/
Using default provider awscloudformation
Error occurred during configuration.
TypeError: Cannot read properties of undefined (reading 'includes')
at configProviders (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/config-steps/c2-configProviders.js:44:30)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.run (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/commands/configure.js:81:13)
at async Object.executeAmplifyCommand (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/index.js:194:9)
at async executePluginModuleCommand (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:139:5)
at async executeCommand (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:37:9)
at async Object.run (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/index.js:121:5)
`

Running amplify status --debug
`Resolution: Please report this issue at https://github.com/aws-amplify/amplify-cli/issues and include the project identifier from: 'amplify diagnose --send-report'
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/

UnknownFault: providers is not iterable
at genericErrorToAmplifyException (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/amplify-exception-handler.js:126:49)
at handleException (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/amplify-exception-handler.js:27:28)
at process. (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/index.js:52:93)
at process.emit (node:events:513:28)
at process._fatalException (node:internal/process/execution:149:25)

providers is not iterable
TypeError: providers is not iterable
at AmplifyToolkit.showHelpfulProviderLinks (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/extensions/amplify-helpers/show-helpful-provider-links.js:36:32)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.run (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/commands/status.js:55:9)
at async Object.executeAmplifyCommand (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/index.js:194:9)
at async executePluginModuleCommand (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:139:5)
at async executeCommand (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:37:9)
at async Object.run (/snapshot/amplify-cli/build/node_modules/@aws-amplify/cli-internal/lib/index.js:121:5)

Session Identifier: f19a0421-dc25-46d1-b4ab-1558a48df56b
⠋ Creating Zip
The "path" argument must be of type string. Received undefined
✖ Creating Zip
`

in .config folder, I have three file

  • local-aws-info.json
    { "prod": { "configLevel": "amplifyAdmin" }, "dev": { "configLevel": "amplifyAdmin" } }

  • local-env-info.json
    { "prod": { "configLevel": "amplifyAdmin" }, "dev": { "configLevel": "amplifyAdmin" } }

  • project-config.json
    { "frontend": "javascript", "javascript": { "framework": "none", "config": { "SourceDir": "amplify-codegen-temp" } } }

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Nov 10, 2023
@ykethan
Copy link
Member

ykethan commented Nov 10, 2023

Hey @harrynguyen2510, thank you for the information. The project-config.json seems to missing the providers.

could you modify the file to have a similar structure as follows, modified the from javascript to flutter as it does appears you are trying to use this in a flutter app.

{
  "providers": [
    "awscloudformation"
  ],
  "projectName": "<Projectname>",
  "version": "3.1",
  "frontend": "flutter",
  "flutter": {
    "config": {
      "ResDir": "./lib/"
    }
  }
}

then try running amplify status

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Nov 10, 2023
@harrynguyenangle
Copy link
Author

@ykethan it works, so I just remove old json?

{ "frontend": "javascript", "javascript": { "framework": "none", "config": { "SourceDir": "amplify-codegen-temp" } } }

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Nov 15, 2023
@ykethan
Copy link
Member

ykethan commented Nov 16, 2023

Hey @harrynguyen2510, glad to hear you were able to mitigate the issue. you should be able to remove the old file.

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Nov 16, 2023
@josefaidt
Copy link
Contributor

Closing due to inactivity

@josefaidt josefaidt closed this as not planned Won't fix, can't repro, duplicate, stale Feb 2, 2024
Copy link

github-actions bot commented Feb 2, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-response Issue is pending response from the issue author pending-triage Issue is pending triage platform Issues tied to the general CLI platform
Projects
None yet
Development

No branches or pull requests

4 participants