aws-amplify / amplify-flutter

A declarative library with an easy-to-use interface for building Flutter applications on AWS.
https://docs.amplify.aws
Apache License 2.0
1.31k stars 241 forks source link

error: could not find module 'amplify_auth_cognito' for target 'arm64-apple-macos'; found: x86_64-apple-macos, #5275

Open richard457 opened 4 weeks ago

richard457 commented 4 weeks ago

Description

Launching lib/main.dart on macOS in debug mode... /Users/richard/Documents/GitHub/flipper/apps/flipper/macos/Flutter/GeneratedPluginRegistrant.swift:8:8: error: could not find module 'amplify_auth_cognito' for target 'arm64-apple-macos'; found: x86_64-apple-macos, at: /Users/richard/Documents/GitHub/flipper/apps/flipper/build/macos/Build/Products/Debug/amplify_auth_cognito/amplify_auth_cognito.framework/Modules/amplify_auth_cognito.swiftmodule import amplify_auth_cognito ^

import "Headers/amplify_auth_cognito-Swift.h"

    ^

BUILD FAILED

Error: Build process failed

Categories

Steps to Reproduce

Add amplify_auth_cognito to flutter app and run debug mode on macos

Screenshots

No response

Platforms

Flutter Version

3.24.0

Amplify Flutter Version

2.3.0

Deployment Method

Amplify CLI

Schema

No response

khatruong2009 commented 4 weeks ago

Hi @richard457, thank you for submitting this issue. We will take a look at it and get back to you with any updates or questions.

khatruong2009 commented 3 weeks ago

Hi @richard457, are you using the gen2 backend to create your app?

NikaHsn commented 3 weeks ago

@richard457 do you see this issue when running a sample flutter app (without adding amplify_auth_cognito)? I suspect that you may have installed a Flutter SDK for x64 architecture on a macOS with arm64 architecture. you may run flutter doctor -v to check the version of Flutter installed and if it matches your mscOS system architecture

richard457 commented 2 weeks ago

I have flutter version 3.24.0

richard457 commented 2 weeks ago

Hi @richard457, are you using the gen2 backend to create your app?

I think so, I started using amplify recently, and I did a bunch of things that I do not know which led to what.

richard457 commented 2 weeks ago

but I think in general error might be related to the recent change in flutter to adopt new package manager for swift etc....

NikaHsn commented 2 weeks ago

@richard457 I was not able to reproduce this issue using Flutter 3.24.1.

when you get a chance would you please responde to these questions: