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

Can't create app #13770

Closed
3 tasks done
Themrpie opened this issue Aug 29, 2024 · 2 comments
Closed
3 tasks done

Can't create app #13770

Themrpie opened this issue Aug 29, 2024 · 2 comments
Assignees
Labels
Predictions Related to Predictions category question General question

Comments

@Themrpie
Copy link

Themrpie commented Aug 29, 2024

Before opening, please confirm:

JavaScript Framework

React Native

Amplify APIs

Not applicable

Amplify Version

v6

Amplify Categories

Not applicable

Backend

Amplify CLI

Environment information

# Put output below this line
System:
    OS: macOS 14.5
    CPU: (8) arm64 Apple M1
    Memory: 63.94 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.15.0 - /usr/local/bin/node
    npm: 10.7.0 - /usr/local/bin/npm
    Watchman: 2024.07.29.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 128.0.6613.86
    Safari: 17.5
  npmPackages:
    %name%:  0.1.0 
    @aws-amplify/backend: ^1.2.0 => 1.2.0 
    @aws-amplify/backend-cli: ^1.2.5 => 1.2.5 
    @aws-amplify/predictions: ^6.1.20 => 6.1.20 
    @aws-amplify/react-native: ^1.1.4 => 1.1.4 
    @aws-amplify/ui-react-native: ^2.2.5 => 2.2.5 
    @babel/core: ^7.20.0 => 7.25.2 
    @expo/vector-icons: ^14.0.2 => 14.0.2 
    @react-native-async-storage/async-storage: ^1.23.1 => 1.23.1 
    @react-native-community/netinfo: ^11.3.2 => 11.3.2 
    @react-native-picker/picker: 2.7.5 => 2.7.5 
    @react-navigation/native: ^6.0.2 => 6.1.18 
    @types/jest: ^29.5.12 => 29.5.12 
    @types/react: ~18.2.45 => 18.2.79 
    @types/react-test-renderer: ^18.0.7 => 18.3.0 
    @typescript-eslint/parser: ^5.62.0 => 5.62.0 (6.21.0)
    HelloWorld:  0.0.1 
    aws-amplify: ^6.5.3 => 6.5.3 
    aws-amplify/adapter-core:  undefined ()
    aws-amplify/analytics:  undefined ()
    aws-amplify/analytics/kinesis:  undefined ()
    aws-amplify/analytics/kinesis-firehose:  undefined ()
    aws-amplify/analytics/personalize:  undefined ()
    aws-amplify/analytics/pinpoint:  undefined ()
    aws-amplify/api:  undefined ()
    aws-amplify/api/server:  undefined ()
    aws-amplify/auth:  undefined ()
    aws-amplify/auth/cognito:  undefined ()
    aws-amplify/auth/cognito/server:  undefined ()
    aws-amplify/auth/enable-oauth-listener:  undefined ()
    aws-amplify/auth/server:  undefined ()
    aws-amplify/data:  undefined ()
    aws-amplify/data/server:  undefined ()
    aws-amplify/datastore:  undefined ()
    aws-amplify/in-app-messaging:  undefined ()
    aws-amplify/in-app-messaging/pinpoint:  undefined ()
    aws-amplify/push-notifications:  undefined ()
    aws-amplify/push-notifications/pinpoint:  undefined ()
    aws-amplify/storage:  undefined ()
    aws-amplify/storage/s3:  undefined ()
    aws-amplify/storage/s3/server:  undefined ()
    aws-amplify/storage/server:  undefined ()
    aws-amplify/utils:  undefined ()
    aws-cdk: ^2.154.1 => 2.154.1 
    aws-cdk-lib: ^2.154.1 => 2.154.1 
    constructs: ^10.3.0 => 10.3.0 
    esbuild: ^0.23.1 => 0.23.1 
    eslint: ^8.57.0 => 8.57.0 
    expo: ~51.0.28 => 51.0.31 
    expo-av: ~14.0.7 => 14.0.7 
    expo-constants: ~16.0.2 => 16.0.2 
    expo-dev-client: ~4.0.25 => 4.0.25 
    expo-device: ~6.0.2 => 6.0.2 
    expo-font: ~12.0.9 => 12.0.9 
    expo-linking: ~6.3.1 => 6.3.1 
    expo-router: ~3.5.23 => 3.5.23 
    expo-speech: ~12.0.2 => 12.0.2 
    expo-splash-screen: ~0.27.5 => 0.27.5 
    expo-status-bar: ~1.12.1 => 1.12.1 
    expo-system-ui: ~3.0.7 => 3.0.7 
    expo-web-browser: ~13.0.3 => 13.0.3 
    jest: ^29.2.1 => 29.7.0 
    jest-expo: ~51.0.3 => 51.0.4 
    prettier: ^3.3.3 => 3.3.3 (2.3.2, 2.8.8, 1.19.1)
    prettier-eslint: ^16.3.0 => 16.3.0 
    react: 18.2.0 => 18.2.0 
    react-dom: 18.2.0 => 18.2.0 
    react-native: 0.74.5 => 0.74.5 
    react-native-gesture-handler: ~2.16.1 => 2.16.2 
    react-native-get-random-values: ^1.11.0 => 1.11.0 
    react-native-paper: ^5.12.5 => 5.12.5 
    react-native-reanimated: ~3.10.1 => 3.10.1 
    react-native-safe-area-context: ^4.10.9 => 4.10.9 
    react-native-screens: 3.31.1 => 3.31.1 
    react-native-url-polyfill: ^2.0.0 => 2.0.0 
    react-native-web: ~0.19.10 => 0.19.12 
    react-test-renderer: 18.2.0 => 18.2.0 
    tsx: ^4.19.0 => 4.19.0 
    typescript: ^5.5.4 => 5.5.4 (4.4.4, 4.9.5)
    web-streams-polyfill: ^4.0.0 => 4.0.0 (3.3.3)
    web-streams-polyfill-es2018:  undefined ()
    web-streams-polyfill-es6:  undefined ()
    web-streams-ponyfill:  undefined ()
    web-streams-ponyfill-es2018:  undefined ()
    web-streams-ponyfill-es6:  undefined ()
  npmGlobalPackages:
    corepack: 0.28.1
    eas-cli: 10.1.1
    npm: 10.7.0

Describe the bug

I've used amplify more than 20 times but gen2 is extremely confusing. I follow these instructions:
https://docs.amplify.aws/react-native/start/quickstart/

Then at the end it says:

Publishing changes to the cloud requires a remote git repository. To learn more, visit the fullstack branch deployments guide.

When I follow the link provided I see:

Log in to the Amplify console and choose your app.
Navigate to App settings > Branch settings, select Edit and enable Branch auto-detection and Branch auto-disconnection.

But I can't navigate choose my app because when I login into my IAM user I don't see any apps, and if I click on "create app" I get:
User: arn:aws:sts::523909079981:assumed-role/AWSReservedSSO_amplify-policy_21b0f69dc7a54304/amplify-admin is not authorized to perform: amplify:CreateApp on resource: arn:aws:amplify:us-east-1:523987079981:/access-token

It used to be so easy to create an app. It was so much better when you could just do amplify init, configure and then amplify push and everything worked.

Now the login is the only thing that is working. I'm trying to use "predictions", and those instructions are also full of errors. It's been very painful developing experience.

To setup predictions I'm following:
https://docs.amplify.aws/react-native/build-a-backend/add-aws-services/predictions/set-up-predictions/
After correcting the documentation mistakes I get:
error: [AccessDeniedException: User: arn:aws:sts::523987079981:assumed-role/amplify-voicer-myusername-amplifyAuthauthenticatedU-yMkn57CjkpG5/CognitoIdentityCredentials is not authorized to perform: polly:SynthesizeSpeech because no identity-based policy allows the polly:SynthesizeSpeech action]
Even though in my amplify/backend.ts I have

backend.auth.resources.authenticatedUserIamRole.addToPrincipalPolicy(
  new PolicyStatement({
    actions: ["polly:SynthesizeSpeech"],
    resources: ["*"],
  }),
);
backend.addOutput({
  custom: {
    Predictions: {
      convert: {
        speechGenerator: {
          defaults: {
            voiceId: "Ivy",
          },
          proxy: false,
          region: Stack.of(backend.auth.resources.unauthenticatedUserIamRole)
            .region,
        },
      },
    },
  },
});

So I'm guessing it's because after setting up amplify/backend.ts I haven't pushed those changes to the cloud, and that's where I'm stuck. I tried logging in as root user but still I don't see my app there.

Expected behavior

It should work

Reproduction steps

Follow instructions in:
https://docs.amplify.aws/react-native/start/quickstart/

And
https://docs.amplify.aws/react-native/build-a-backend/add-aws-services/predictions/set-up-predictions/

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line


aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

No response

@Themrpie Themrpie added the pending-triage Issue is pending triage label Aug 29, 2024
@aws-amplify aws-amplify deleted a comment from Gross-Igna Aug 29, 2024
@cwomack cwomack self-assigned this Aug 29, 2024
@cwomack
Copy link
Member

cwomack commented Aug 29, 2024

Hey, @Themrpie 👋. With this being a React Native app, have you already separated out your frontend and backend (currently needed for Gen 2 apps built with React Native)? There's more info on how to do that here, but that may be the reason you're hitting blockers with React Native app and not being able to see it in the console.

As for the errors you're getting with Predictions, we might need to get your frontend and backend separated first (if they aren't already) before being able to determine if the Predictions category is implemented properly, unless you're only looking to do local testing.

@cwomack cwomack added question General question Predictions Related to Predictions category pending-response and removed pending-triage Issue is pending triage labels Aug 29, 2024
@cwomack cwomack added pending-community-response Issue is pending a response from the author or community. and removed pending-response labels Sep 10, 2024
@cwomack cwomack closed this as not planned Won't fix, can't repro, duplicate, stale Sep 10, 2024
@cwomack
Copy link
Member

cwomack commented Sep 10, 2024

Closing this issue as we have not heard back from you. If you are still experiencing this, please feel free to reply back and provide any information previously requested and we'd be happy to re-open the issue.

Thank you!

@github-actions github-actions bot removed the pending-community-response Issue is pending a response from the author or community. label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Predictions Related to Predictions category question General question
Projects
None yet
Development

No branches or pull requests

2 participants