Code Monkey home page Code Monkey logo

Comments (9)

ykethan avatar ykethan commented on June 15, 2024

Hey @KuzonFyre, thank you for reaching out. Are you running the pull with --appId and --envName dev in an existing project? Does the error occur if you pull the backend into a empty folder outside the existing project directory?

Could download the #current-cloud-backend.zip from the deployment bucket(name ending with -deployment) on the S3 console, under the /auth/<auth-name>/build do you observe a parameters.json file?

from amplify-cli.

KuzonFyre avatar KuzonFyre commented on June 15, 2024

@ykethan Thanks for the reply. I run this in the root directory of an exisiting project. I tried running this in an empty directory outside of my project and recived the same error \amplify\backend\auth\{APPID]\parameters.json' does not exist. I do see a parameters.json file in the #current-cloud-backend.zip. Can I copy that into my local?

from amplify-cli.

KuzonFyre avatar KuzonFyre commented on June 15, 2024

I tried copying that file into \amplify\backend\auth\{APPID]\parameters.json. I am noticing that the auth name that I have locally is different then the one in the error message. I went through all of the local files and removed any references to what I am assuming was another auth setup. The files I changed were team-provider-info.json and backend-config.json I double checked my cognetio user pools and I only have the one with the appid that was showing up in current-cloud-backend.zip. After that it still produces \amplify\backend\auth\{APPID]\parameters.json' does not exist. As far as I can tell there are no remaining references to the duplicate auth setup.

from amplify-cli.

ykethan avatar ykethan commented on June 15, 2024

@KuzonFyre was the auth resource migrated from an older of version Amplify CLI?
Could you provide us the Amplify CLI version being utilized by running amplify --version.

from amplify-cli.

KuzonFyre avatar KuzonFyre commented on June 15, 2024

@ykethan The version is 12.10.1

from amplify-cli.

ykethan avatar ykethan commented on June 15, 2024

@KuzonFyre From Amplify CLI version 7, the CLI expects a cli-inputs.json file in the Amplify auth resource. On a push, the cli-inputs.json is transformed into parameters.json under the auth/build folder. On a pull the cli checks if the cli-inputs.json is present.
Could you provide us the full error message with the path as the path provided \amplify\backend\auth\APPID\parameters.json indicates a older CLI version being utilized?

from amplify-cli.

KuzonFyre avatar KuzonFyre commented on June 15, 2024

@ykethan My auth folder has the same ID that I expected to see from AWS. That ID is napkyff72303c/. This auth folder has a cli-inputs.json file. Note that the error message below, gives me a different auth folder, napkyb8f78fcb. The APPID thing I did was just to remove that info because I thought it was potentially sensitive. I didn't ever change my cli version.

🛑 Failed to pull the backend.

Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/

PullBackendFault: Failed to pull the backend.
    at attachBackend (C:\snapshot\amplify-cli\build\node_modules\@aws-amplify\cl
                                                                               li-internal\lib\attach-backend.js:55:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5
                                                                               5)
    at async Object.run (C:\snapshot\amplify-cli\build\node_modules\@aws-amplify
                                                                               y\cli-internal\lib\commands\pull.js:64:9)
    at async Object.executeAmplifyCommand (C:\snapshot\amplify-cli\build\node_mo
                                                                               odules\@aws-amplify\cli-internal\lib\index.js:194:9)
    at async executePluginModuleCommand (C:\snapshot\amplify-cli\build\node_modu
                                                                               ules\@aws-amplify\cli-internal\lib\execution-manager.js:139:5)
    at async executeCommand (C:\snapshot\amplify-cli\build\node_modules\@aws-amp
                                                                               plify\cli-internal\lib\execution-manager.js:37:9)
    at async Object.run (C:\snapshot\amplify-cli\build\node_modules\@aws-amplify
                                                                               y\cli-internal\lib\index.js:121:5)

File at path: 'C:\Users\hamil\Napky\amplify\backend\auth\napkyb8f78fcb\parameter
                                                                               rs.json' does not exist
Error: File at path: 'C:\Users\hamil\Napky\amplify\backend\auth\napkyb8f78fcb\pa
                                                                               arameters.json' does not exist
    at JSONUtilities.readJson (C:\snapshot\amplify-cli\build\node_modules\@aws-a
                                                                               amplify\amplify-cli-core\lib\jsonUtilities.js:44:19)
    at StateManager.getData (C:\snapshot\amplify-cli\build\node_modules\@aws-amp
                                                                               plify\amplify-cli-core\lib\state-manager\stateManager.js:327:56)
    at StateManager.getResourceParametersJson (C:\snapshot\amplify-cli\build\nod
                                                                               de_modules\@aws-amplify\amplify-cli-core\lib\state-manager\stateManager.js:149:25
                                                                               5)
    at ensureAmplifyMetaFrontendConfig (C:\snapshot\amplify-cli\build\node_modul
                                                                               les\@aws-amplify\cli-internal\lib\extensions\amplify-helpers\on-category-outputs-
                                                                               -change.js:105:60)
    at AmplifyToolkit.onCategoryOutputsChange (C:\snapshot\amplify-cli\build\nod
                                                                               de_modules\@aws-amplify\cli-internal\lib\extensions\amplify-helpers\on-category-o
                                                                               outputs-change.js:46:53)
    at initializeEnv (C:\snapshot\amplify-cli\build\node_modules\@aws-amplify\cl
                                                                               li-internal\lib\initialize-env.js:143:31)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5
                                                                               5)
    at async onSuccess (C:\snapshot\amplify-cli\build\node_modules\@aws-amplify\
                                                                               \cli-internal\lib\attach-backend.js:81:17)
    at async attachBackend (C:\snapshot\amplify-cli\build\node_modules\@aws-ampl
                                                                               lify\cli-internal\lib\attach-backend.js:50:9)
    at async Object.run (C:\snapshot\amplify-cli\build\node_modules\@aws-amplify
                                                                               y\cli-internal\lib\commands\pull.js:64:9)
    at async Object.executeAmplifyCommand (C:\snapshot\amplify-cli\build\node_mo
                                                                               odules\@aws-amplify\cli-internal\lib\index.js:194:9)
    at async executePluginModuleCommand (C:\snapshot\amplify-cli\build\node_modu
                                                                               ules\@aws-amplify\cli-internal\lib\execution-manager.js:139:5)
    at async executeCommand (C:\snapshot\amplify-cli\build\node_modules\@aws-amp
                                                                               plify\cli-internal\lib\execution-manager.js:37:9)
    at async Object.run (C:\snapshot\amplify-cli\build\node_modules\@aws-amplify
                                                                               y\cli-internal\lib\index.js:121:5)

from amplify-cli.

KuzonFyre avatar KuzonFyre commented on June 15, 2024

Figured it out! So I copied the cli-inputs.json from the auth setup that I know is on AWS, napkyff72303c/ and put the file into a new directory with the name of the folder the error message said it was missing napkyb8f78fcb. That pulled sucesfully. I pulled again and it removed the bad auth folder. Upon deploying it referenced napkyb8f78fcb. I searched for references for napkyb8f78fcb in my files and found a reference in backend-config.json file and one in team-provider-info.json. I removed those and it worked. Thanks for the help!

from amplify-cli.

github-actions avatar github-actions commented on June 15, 2024

This issue is now closed. 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.

from amplify-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.