Open ykethan opened 1 year ago
I am seeing the same behavior with both the npm-installed amplify cli (12.4.0 and 12.2.3) and the script-installed amplify cli from https://github.com/aws-amplify/amplify-cli/issues/13104#issuecomment-1675137697.
I am attempting to init a new xcode/ios project. Xcode 14.3.1 is installed.
$ amplify pull --appId <app id> --envName staging
Opening link: https://us-east-1.admin.amplifyapp.com/admin/<app id>/staging/verify/?loginVersion=1
β Confirm login in the browser or manually paste in your CLI login key:
Successfully received Amplify Studio tokens.
Amplify AppID found: <app id>. Amplify App name is: Hush
Backend environment staging found in Amplify Console app: Hush
? Choose your default editor: Xcode (macOS only)
β Choose the type of app that you're building Β· ios
? Do you plan on modifying this backend? Yes
β Successfully pulled backend environment staging from the cloud.
β
β
Successfully pulled backend environment staging from the cloud.
Run 'amplify pull' to sync future upstream changes.
Updating Xcode project:
π« xcodeProject:
-- Caused by: notFound(path: "/Users/<user>")
π Command failed with exit code 1: /Users/<user>/.amplify/lib/aws-amplify-amplify-frontend-ios/resources/amplify-xcode import-config --path=/Users/<user>
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: fd397e50-186d-4cd3-8af1-efe79881f986
β An unexpected error has occurred, opt in to send an error report to AWS Amplify with non-sensitive project configuration files. Confirm (y/N) Β· no
Same here any solution or any hint on what is the issue? It seems for me there is some issue related with Swift Package Manager. With codegen the models are generated but then I get the same error from this issue (see below).
amplify codegen models --model-schema /Users/<user>/path/to/schema.graphql
Successfully generated models. Generated models can be found in /Users/<user>/<project-root-folder>/amplify/generated/models
Updating Xcode project:
π« xcodeProject:
-- Caused by: The element XCLocalSwiftPackageReference is not supported.
π Command failed with exit code 1: /Users/<user>/.amplify/lib/aws-amplify-amplify-frontend-ios/resources/amplify-xcode import-models --path=/Users/<user>/<project-root-folder>
Note: I also get the same error with
amplify pull --appId <appId> --frontend
so it is not related toamplify codegen models
Proposed resolution does not help since I am in a frontend project following multi-frontend approach so there is no backend folder and amplify diagnose
fails.
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/
amplify diagnose --send-report
Learn more at https://docs.amplify.aws/cli/reference/diagnose/
β Creating Zip
File at path: '<project-root-folder>/amplify/backend/backend-config.json' does not exist
β Creating Zip
How did you install the Amplify CLI?
No response
If applicable, what version of Node.js are you using?
No response
Amplify CLI Version
12.2.3
What operating system are you using?
mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
no
Describe the bug
Amplify CLI throws the error message
The error appears to be due to Xcode not being used. set the terminal as Vscode on init a well.
Expected behavior
provide a better error message
Reproduction steps
amplify init
(with Vscode and ios as config)amplify pull
Project Identifier
No response
Log output
Additional information
No response
Before submitting, please confirm: