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

A value of type 'String?' can't be returned from a function with return type 'String' because 'String?' is nullable and 'String' isn't #5555

Open
1 of 14 tasks
LakshithWithana opened this issue Oct 15, 2024 · 1 comment
Labels
core Issues related to the Amplify Core Plugin pending-community-response Pending response from the issue opener or other community members question A question about the Amplify Flutter libraries

Comments

@LakshithWithana
Copy link

Description

These are the packages in the pubspec.yaml
amplify_flutter:
amplify_auth_cognito:
amplify_authenticator:
amplify_storage_s3: ^2.4.0
amplify_core: ^2.4.0

when running/debugging the app this error is given -

Launching lib/main_development.dart on iPhone 15 in debug mode...
Xcode build done. 39.6s
Failed to build iOS app
Error (Xcode): ../../../../.pub-cache/hosted/pub.dev/amplify_core-2.4.1/lib/src/config/amplify_outputs/auth/auth_outputs.g.dart:16:61: Error: A value of type 'String?' can't be returned from a function with return type 'String' because 'String?' is nullable and 'String' isn't.

Could not build the application for the simulator.
Error launching application on iPhone 15.

Exited (1).

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Notifications (Push)
  • Storage

Steps to Reproduce

Just run/debug app.

Screenshots

Screenshot 2024-10-15 at 14 10 46

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

3.24.3

Amplify Flutter Version

2.4.0

Deployment Method

Amplify Gen 2

Schema

No response

@github-actions github-actions bot added pending-triage This issue is in the backlog of issues to triage pending-maintainer-response Pending response from a maintainer of this repository labels Oct 15, 2024
@NikaHsn
Copy link
Member

NikaHsn commented Oct 15, 2024

@LakshithWithana sorry that you are facing this issue. would you please share your amplify_outputs.dart with any sensitive info removed.

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Oct 15, 2024
@NikaHsn NikaHsn added question A question about the Amplify Flutter libraries core Issues related to the Amplify Core Plugin pending-maintainer-response Pending response from a maintainer of this repository labels Oct 15, 2024
@github-actions github-actions bot removed the pending-triage This issue is in the backlog of issues to triage label Oct 15, 2024
@NikaHsn NikaHsn added pending-community-response Pending response from the issue opener or other community members and removed pending-maintainer-response Pending response from a maintainer of this repository labels Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues related to the Amplify Core Plugin pending-community-response Pending response from the issue opener or other community members question A question about the Amplify Flutter libraries
Projects
None yet
Development

No branches or pull requests

2 participants