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

where is 'safePrint' ? #2092

Closed
lien-dkseo opened this issue Sep 5, 2022 · 5 comments · Fixed by #2114
Closed

where is 'safePrint' ? #2092

lien-dkseo opened this issue Sep 5, 2022 · 5 comments · Fixed by #2114
Assignees
Labels
core Issues related to the Amplify Core Plugin pending-triage This issue is in the backlog of issues to triage

Comments

@lien-dkseo
Copy link

https://docs.amplify.aws/lib/graphqlapi/getting-started/q/platform/flutter/#initialize-amplify-api

} on AmplifyAlreadyConfiguredException {
  safePrint('Tried to reconfigure Amplify; this can occur when your app restarts on Android.');
}

The method 'safePrint' isn't defined for the type ...

@dnys1
Copy link
Contributor

dnys1 commented Sep 5, 2022

Hi @lien-dkseo - which versions of the Amplify libraries are you using? Can you double check you are using either the latest stable versions (^0.6.0) or the latest dev-preview versions (^1.0.0-next.0)?

@dnys1 dnys1 self-assigned this Sep 5, 2022
@dnys1 dnys1 added core Issues related to the Amplify Core Plugin pending-triage This issue is in the backlog of issues to triage labels Sep 5, 2022
@lien-dkseo
Copy link
Author

lien-dkseo commented Sep 6, 2022

Hi~ @dnys1

my dependencies and doctor

dependencies:
  flutter:
    sdk: flutter


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.5
  amplify_flutter: ^0.6.6
  amplify_datastore: ^0.6.6
  amplify_datastore_plugin_interface: ^0.6.6
  amplify_api: ^0.6.6
  amplify_auth_cognito: ^0.6.6
  amplify_core: ^0.6.6
> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.0, on Microsoft Windows [Version 10.0.22000.918], locale ko-KR)
[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.3.3)
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.71.0)
[√] Connected device (3 available)
[√] HTTP Host Availability

@dnys1
Copy link
Contributor

dnys1 commented Sep 6, 2022

Thanks, @lien-dkseo - safePrint is exported from the amplify_flutter package. Can you confirm if adding import "package:amplify_flutter/amplify_flutter.dart"; to the top of the file resolves the issue or not?

dnys1 pushed a commit to dnys1/amplify-flutter that referenced this issue Sep 12, 2022
And, by extension `amplify_flutter` which already exports `amplify_core`. This aligns the exports with `next`.

Fixes aws-amplify#2092.

commit-id:4afa07da
@dnys1 dnys1 closed this as completed in e8e324c Sep 13, 2022
@dnys1
Copy link
Contributor

dnys1 commented Sep 13, 2022

Hi @lien-dkseo - I apologize as my last statement was incorrect. safePrint is currently only exported from amplify_core which can be imported as import 'package:amplify_core/amplify_core.dart'. I've just merged a commit which will also export this from amplify_flutter so that it should automatically work. Apologies for any confusion.

@lien-dkseo
Copy link
Author

thank you~ @dnys1

HuiSF pushed a commit to HuiSF/amplify-flutter that referenced this issue Sep 19, 2022
And, by extension `amplify_flutter` which already exports `amplify_core`. This aligns the exports with `next`.

Fixes aws-amplify#2092.

commit-id:4afa07da
HuiSF added a commit that referenced this issue Sep 19, 2022
* chore(deps): bump file_picker from 4.6.1 to 5.0.1 in /example (#1944)

Bumps [file_picker](https://github.com/miguelpruivo/flutter_file_picker) from 4.6.1 to 5.0.1.
- [Release notes](https://github.com/miguelpruivo/flutter_file_picker/releases)
- [Changelog](https://github.com/miguelpruivo/flutter_file_picker/blob/master/CHANGELOG.md)
- [Commits](https://github.com/miguelpruivo/flutter_file_picker/commits)

---
updated-dependencies:
- dependency-name: file_picker
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jordan Nelson <nejrd@amazon.com>

* chore(auth): enable integration tests in CI (#1886)

* chore(repo): Update bug report to include deployment option (#1928)

Adds the following info to the bug report template:
- Whether the CLI or another mechanism was used to deploy their backend
- Their sanitized amplifyconfig

These both seem to provide a lot of insight and they can be missed in the conversation, especially the first one. We cannot assume that people filing issues are using pristine Amplify-generated backends.

* feat(authenticator): listen to all auth hub events (#2053)

* feat: listen to hub events

* chore: wait for config completion to listen to hub

* chore(api): add field to schema in provision script (#1909)

* fix(core): Podspec deployment target (#2099)

Fixes an issue surfaced in Flutter 3.3.0 which configures XCode projects based off this value. Previously, if the value was <9, the logic would apply. Now if the value is <11, the logic applies. We don't want this logic to apply.

The previous value was incorrect anyway so it's a good change to make regardless.

* chore(core): Export `safePrint` from amplify_core

And, by extension `amplify_flutter` which already exports `amplify_core`. This aligns the exports with `next`.

Fixes #2092.

commit-id:4afa07da

* fix(storage): Download to existing file

Fixes #2105.

Fixes an issue where downloading to an existing file will not work on iOS. For whatever reason, it will report progress and success, but will ultimately not overwrite the contents of the file.

commit-id:157d4ea3

* chore(storage): Update dependencies

commit-id:fa7c4c42

* chore(storage): Download to temp file

First downloads to a non-existent file, then copies the file to the location of the original in order to avoid iOS restrictions on overwriting data and potential failures which would result in deletion of the original file.

commit-id:7fbfb559

* fix(datastore): cpk errors on a custom type (#2134)

* chore: adds platform/category table (#2115)

* chore: adds platform/category table

* added dev preview matrix to amplify-flutter + root README; removed from package READMEs

Co-authored-by: Dustin Noyes <dnnoyes@amazon.com>

* chore(version): 0.6.8

* ad PR numbers to changelogs

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jordan Nelson <nejrd@amazon.com>
Co-authored-by: Travis Sheppard <tshepp@amazon.com>
Co-authored-by: Dillon Nys <24740863+dnys1@users.noreply.github.com>
Co-authored-by: Dillon Nys <nydillon@amazon.com>
Co-authored-by: Dustin Noyes <dustin.noyes.dev@gmail.com>
Co-authored-by: Dustin Noyes <dnnoyes@amazon.com>
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-triage This issue is in the backlog of issues to triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants