Skip to content

AppId mismatch failure in preview build of backend used across apps #13973

Closed
@Ruci0094

Description

@Ruci0094

Amplify CLI Version

latest (12.13.0)

Overview

We have several apps, assuming their appIds are A and B.
App A is not actively used anymore, but we still uses the backend resources associated to AppId A. Therefore, even though we interact with B when we configure preview builds, our code's team-provider-info.json has appId = A.
With #13954, it started to fails with AppId mismatch which checks the appId from meta and appId from commandline.

Questions

Considering it's possible to use Amplify backends across apps, I feel it's possible that AppId of the app on console does not match with appId retrieved from metafiles (which is for backend, IIUC).

  • When backend is used across apps, is it WAI that this error is thrown or does it come from our misconfiguration? Any idea on where to fix?
  • I assume removing appId from commandline can be a workaround but I'm not sure where we configure that. Do you have any pointer?

Trace


2024-10-10T14:01:17.716Z [INFO]: �[0mAmplify AppID found: <APPID OF APP B>. Amplify App name is: <APP NAME OF APP B>�[0m

2024-10-10T14:01:17.770Z [INFO]: �[0mBackend environment stg found in Amplify Console app: <APP NAME OF APP B>�[0m

2024-10-10T14:01:19.921Z [WARNING]: - Fetching updates to backend environment:XXXs from the cloud.

2024-10-10T14:01:21.503Z [WARNING]: - Building resource api/XXXX

...

2024-10-10T14:01:24.592Z [WARNING]: ✔ Successfully pulled backend environment XXX from the cloud.

2024-10-10T14:01:25.190Z [INFO]: ✅

2024-10-10T14:01:27.372Z [INFO]: 🛑 Amplify appId mismatch.

2024-10-10T14:01:27.372Z [INFO]: Resolution: You are currently working in the amplify project with Id <APPID OF APP A>
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghostingIssues tied to hosting categoryplatform-pushIssues related to `amplify push`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions