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

While trying to forget device on IOS I receive device name is null which causes forget device to fail. #1696

Closed
2 of 9 tasks
Migos17 opened this issue Jun 8, 2022 · 5 comments · Fixed by #1731
Closed
2 of 9 tasks
Assignees
Labels
auth Issues related to the Auth Category pending-release Issues that have been addressed in main but have not been released

Comments

@Migos17
Copy link

Migos17 commented Jun 8, 2022

Description

If I try to forget device with only passing the device id in final device = CognitoDevice(id:deviceId),
I receive device name is null which leads to failure of request.I think it is a problem in the args. In order for forget device to work I have to pass all attributes.

final device = CognitoDevice(
          id: deviceId,
          name: '',
          attributes: {},
          createdDate: DateTime.now(),
          lastAuthenticatedDate: DateTime.now(),
          lastModifiedDate: DateTime.now());

Categories

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

Steps to Reproduce

No response

Screenshots

No response

Platforms

  • iOS
  • Android

Android Device/Emulator API Level

No response

Environment

[√] Flutter (Channel stable, 3.0.0, on Microsoft Windows [Version 10.0.22000.652], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Chrome - develop for the web
[!] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.0)
    X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop
      development with C++" workload, and include these components:
        MSVC v142 - VS 2019 C++ x64/x86 build tools
         - If there are multiple build tool versions available, install the latest
        C++ CMake tools for Windows
        Windows 10 SDK
[√] Android Studio (version 4.1)
[√] IntelliJ IDEA Community Edition (version 2021.2)
[√] VS Code (version 1.67.2)
[√] Connected device (3 available)
[√] HTTP Host Availability

Dependencies

Dart SDK 2.17.0
Flutter SDK 3.0.0

dependencies:
- amplify_auth_cognito 0.5.1 [amplify_auth_cognito_android amplify_auth_cognito_ios amplify_auth_plugin_interface amplify_core collection flutter plugin_platform_interface]
- amplify_flutter 0.5.1 [amplify_analytics_plugin_interface amplify_api_plugin_interface amplify_auth_plugin_interface amplify_core amplify_datastore_plugin_interface amplify_flutter_android amplify_flutter_ios amplify_storage_plugin_interface collection flutter json_annotation meta plugin_platform_interface]
- audioplayers 0.20.1 [uuid path_provider http flutter flutter_web_plugins]
- awesome_notifications 0.7.0-beta.1 [flutter platform intl]
- cached_network_image 3.2.1 [flutter flutter_cache_manager octo_image cached_network_image_platform_interface cached_network_image_web]
- card_swiper 2.0.3 [flutter]
- clean_framework 1.3.0 [flutter flutter_test riverpod flutter_riverpod equatable http meta either_dart go_router gql graphql cloud_firestore]
- collection 1.16.0
- components 0.1.0 [flutter flutter_svg intl resources]
- device_info_plus 3.2.3 [flutter device_info_plus_platform_interface device_info_plus_macos device_info_plus_linux device_info_plus_web device_info_plus_windows]
- dynatrace_flutter_plugin 2.237.0 [flutter path yaml xml]
- firebase_analytics 9.1.8 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter]
- firebase_messaging 11.4.0 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta]
- firebase_remote_config 2.0.7 [firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface firebase_remote_config_web flutter]
- fl_chart 0.50.6 [flutter equatable]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_inappwebview 5.4.3+7 [flutter]
- flutter_secure_storage 5.0.2 [meta flutter flutter_secure_storage_linux flutter_secure_storage_macos flutter_secure_storage_platform_interface flutter_secure_storage_web flutter_secure_storage_windows]
- get_it 7.2.0 [async collection]
- instabug_flutter 10.13.0 [flutter meta stack_trace]
- intl 0.17.0 [clock path]
- mask_text_input_formatter 2.3.0 [flutter]
- path_drawing 1.0.0 [vector_math meta path_parsing flutter]
- percent_indicator 4.2.2 [flutter]
- pin_code_fields 7.4.0 [flutter]
- plaid_flutter 2.2.1 [flutter plugin_platform_interface flutter_web_plugins js]
- provider 6.0.3 [collection flutter nested]
- resources 0.1.0 [flutter]
- shared_preferences 2.0.15 [flutter shared_preferences_android shared_preferences_ios shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- shimmer 2.0.0 [flutter]
- smooth_page_indicator 1.0.0+2 [flutter]
- url_launcher 6.1.2 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]
- uuid 3.0.6 [crypto]
- vgs_flutter 0.1.0 [flutter]
- vouched_flutter 0.2.0 [flutter flutter_plugin_android_lifecycle]
- zendesk_plugin 2.0.0 [flutter]

transitive dependencies:
- amplify_analytics_plugin_interface 0.5.1 [amplify_core flutter meta]
- amplify_api_plugin_interface 0.5.1 [amplify_core collection flutter json_annotation meta]
- amplify_auth_cognito_android 0.5.1 [flutter]
- amplify_auth_cognito_ios 0.5.1 [amplify_core flutter]
- amplify_auth_plugin_interface 0.5.1 [amplify_core flutter meta]
- amplify_core 0.5.1 [collection date_time_format flutter meta plugin_platform_interface uuid]
- amplify_datastore_plugin_interface 0.5.1 [flutter meta collection amplify_core]
- amplify_flutter_android 0.5.1 [flutter]
- amplify_flutter_ios 0.5.1 [amplify_core flutter]
- amplify_storage_plugin_interface 0.5.1 [flutter meta amplify_core]
- async 2.8.2 [collection meta]
- boolean_selector 2.1.0 [source_span string_scanner]
- cached_network_image_platform_interface 1.0.0 [flutter flutter_cache_manager]
- cached_network_image_web 1.0.1 [flutter flutter_cache_manager cached_network_image_platform_interface]
- characters 1.2.0
- charcode 1.3.1
- clock 1.1.0
- cloud_firestore 3.1.15 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- cloud_firestore_platform_interface 5.5.6 [collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 2.6.15 [cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js]
- crypto 3.0.1 [collection typed_data]
- date_time_format 2.0.1
- device_info_plus_linux 2.1.1 [device_info_plus_platform_interface file flutter meta]
- device_info_plus_macos 2.2.3 [device_info_plus_platform_interface flutter]
- device_info_plus_platform_interface 2.3.0+1 [flutter meta plugin_platform_interface]
- device_info_plus_web 2.1.0 [device_info_plus_platform_interface flutter_web_plugins flutter]
- device_info_plus_windows 2.1.1 [device_info_plus_platform_interface ffi flutter win32]
- either_dart 0.1.4
- equatable 2.0.3 [collection meta]
- fake_async 1.3.0 [clock collection]
- ffi 1.2.1
- file 6.1.2 [meta path]
- firebase_analytics_platform_interface 3.1.6 [firebase_core flutter meta plugin_platform_interface]
- firebase_analytics_web 0.4.0+13 [firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
- firebase_core 1.17.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_core_platform_interface 4.4.0 [collection flutter meta plugin_platform_interface]
- firebase_core_web 1.6.4 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_messaging_platform_interface 3.5.0 [firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_web 2.4.0 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta]
- firebase_remote_config_platform_interface 1.1.6 [firebase_core flutter meta plugin_platform_interface]
- firebase_remote_config_web 1.0.12 [firebase_core firebase_core_web firebase_remote_config_platform_interface flutter flutter_web_plugins js]
- flutter_blurhash 0.7.0 [flutter]
- flutter_cache_manager 3.3.0 [clock collection file flutter http path path_provider pedantic rxdart sqflite uuid]
- flutter_plugin_android_lifecycle 2.0.6 [flutter]
- flutter_riverpod 1.0.4 [collection flutter meta riverpod state_notifier]
- flutter_secure_storage_linux 1.1.0 [flutter flutter_secure_storage_platform_interface]
- flutter_secure_storage_macos 1.1.0 [flutter flutter_secure_storage_platform_interface]
- flutter_secure_storage_platform_interface 1.0.0 [flutter plugin_platform_interface]
- flutter_secure_storage_web 1.0.2 [flutter flutter_web_plugins flutter_secure_storage_platform_interface js]
- flutter_secure_storage_windows 1.1.2 [flutter flutter_secure_storage_platform_interface]
- flutter_svg 1.0.3 [flutter meta path_drawing vector_math xml]
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math]
- go_router 3.1.0 [collection flutter flutter_web_plugins logging meta]
- gql 0.13.1 [collection meta source_span]
- gql_dedupe_link 2.0.3-alpha+1645425888429 [async gql_exec gql_link meta]
- gql_error_link 0.2.2 [async gql_exec gql_link meta]
- gql_exec 0.4.1-alpha+1645425888344 [collection gql meta]
- gql_http_link 0.4.3-alpha+1645425888380 [gql gql_exec gql_link http http_parser meta]
- gql_link 0.4.3-alpha+1645425888352 [gql gql_exec meta]
- gql_transform_link 0.2.2 [gql_exec gql_link]
- graphql 5.1.1 [meta path gql gql_exec gql_link gql_http_link gql_transform_link gql_error_link gql_dedupe_link hive normalize http collection web_socket_channel stream_channel rxdart uuid]
- hive 2.1.0 [meta crypto]
- http 0.13.4 [async http_parser meta path]
- http_parser 4.0.0 [charcode collection source_span string_scanner typed_data]
- js 0.6.4
- json_annotation 4.5.0 [meta]
- logging 1.0.2
- matcher 0.12.11 [stack_trace]
- material_color_utilities 0.1.4
- meta 1.7.0
- nested 1.0.0 [flutter]
- normalize 0.6.0+1 [gql collection]
- octo_image 1.0.2 [flutter flutter_blurhash]
- path 1.8.1
- path_parsing 1.0.0 [vector_math meta]
- path_provider 2.0.10 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows]
- path_provider_android 2.0.14 [flutter path_provider_platform_interface]
- path_provider_ios 2.0.9 [flutter path_provider_platform_interface]
- path_provider_linux 2.1.6 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_macos 2.0.6 [flutter path_provider_platform_interface]
- path_provider_platform_interface 2.0.4 [flutter platform plugin_platform_interface]
- path_provider_windows 2.0.6 [ffi flutter path path_provider_platform_interface win32]
- pedantic 1.11.1
- petitparser 5.0.0 [meta]
- platform 3.1.0
- plugin_platform_interface 2.1.2 [meta]
- process 4.2.4 [file path platform]
- riverpod 1.0.3 [collection meta state_notifier]
- rxdart 0.27.3
- shared_preferences_android 2.0.12 [flutter shared_preferences_platform_interface]
- shared_preferences_ios 2.1.1 [flutter shared_preferences_platform_interface]
- shared_preferences_linux 2.1.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_macos 2.0.4 [flutter shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.0.0 [flutter]
- shared_preferences_web 2.0.4 [flutter flutter_web_plugins shared_preferences_platform_interface]
- shared_preferences_windows 2.1.1 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface]
- sky_engine 0.0.99
- source_span 1.8.2 [collection path term_glyph]
- sqflite 2.0.2+1 [flutter sqflite_common path]
- sqflite_common 2.2.1+1 [synchronized path meta]
- stack_trace 1.10.0 [path]
- state_notifier 0.7.2+1 [meta]
- stream_channel 2.1.0 [async]
- string_scanner 1.1.0 [charcode source_span]
- synchronized 3.0.0+2
- term_glyph 1.2.0
- test_api 0.4.9 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher]
- typed_data 1.3.0 [collection]
- url_launcher_android 6.0.17 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.0.16 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.0.1 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.0.1 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.0.5 [flutter plugin_platform_interface]
- url_launcher_web 2.0.11 [flutter flutter_web_plugins url_launcher_platform_interface]
- url_launcher_windows 3.0.1 [flutter url_launcher_platform_interface]
- vector_math 2.1.2
- web_socket_channel 2.2.0 [async crypto stream_channel]
- win32 2.6.1 [ffi]
- xdg_directories 0.2.0+1 [meta path process]
- xml 5.4.1 [collection meta petitparser]
- yaml 3.1.1 [collection source_span string_scanner]

Device

iphone 13

OS

IOS 15.5

CLI Version

7.6.21

Additional Context

No response

@Jordan-Nelson Jordan-Nelson added auth Issues related to the Auth Category pending-triage This issue is in the backlog of issues to triage labels Jun 8, 2022
@Jordan-Nelson
Copy link
Contributor

Hi @Migos17 - Can you include the full exception you are seeing?

@Jordan-Nelson Jordan-Nelson added the pending-response Issue is pending response from the issue requestor label Jun 8, 2022
@Migos17
Copy link
Author

Migos17 commented Jun 9, 2022

Hi @Migos17 - Can you include the full exception you are seeing?

flutter: PlatformException(InvalidParameterException, Translating platform exception failed. Please take a look at https://github.com/aws-amplify/amplify-flutter/issues to see if there are any existing issues that match your scenario, and file an issue with the details of the bug if there isn't., {message: Invalid device JSON: ["name": <null>, "id": us-west-2_67773685-73e0-4258-ae97-87f3cd5513fb], recoverySuggestion: Please check that the device you're passing is a valid AuthDevice.}, null)
flutter: #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:167:18)
<asynchronous suspension>
#2      AmplifyAuthCognitoMethodChannel.forgetDevice (package:amplify_auth_cognito/method_channel_auth_cognito.dart:546:7)
<asynchronous suspension>
#3      AuthService.forgotDevice.<anonymous closure> (package:Perch/core/dependency/authentication/service/auth_service.dart:351:9)
<asynchronous suspension>
#4      AuthService._handleException (package:Perch/core/dependency/authentication/service/auth_service.dart:303:14)
<asynchronous suspension>
#5      AuthService.forgotDevice (package:Perch/core/dependency/authentication/service/auth_service.dart:340:5)
<asynchronous suspension>
#6      AuthExternalInterface.handleRequest.<anonymous closure> (package:Perch/core/dependency/authentication/auth_external_interface.dart:171:7)
<asynchronous suspension>

@Jordan-Nelson Jordan-Nelson removed the pending-response Issue is pending response from the issue requestor label Jun 9, 2022
@dnys1 dnys1 self-assigned this Jun 13, 2022
@dnys1 dnys1 added bug Something is not working; the issue has reproducible steps and has been reproduced and removed pending-triage This issue is in the backlog of issues to triage labels Jun 13, 2022
dnys1 pushed a commit to dnys1/amplify-flutter that referenced this issue Jun 13, 2022
Fixes aws-amplify#1696

Fixes device serialization on iOS when just an ID is passed. I confirmed this issue does not exist on Android.

commit-id:8d6c6d72
@dnys1
Copy link
Contributor

dnys1 commented Jun 13, 2022

Hi @Migos17 - I was able to confirm the issue and have put up a fix: #1731.

Sorry for the inconvenience. We will try to get this released shortly.

@dnys1 dnys1 added pending-release Issues that have been addressed in main but have not been released and removed bug Something is not working; the issue has reproducible steps and has been reproduced labels Jun 13, 2022
dnys1 pushed a commit to dnys1/amplify-flutter that referenced this issue Jun 13, 2022
Fixes aws-amplify#1696

Fixes device serialization on iOS when just an ID is passed. I confirmed this issue does not exist on Android.

commit-id:8d6c6d72
dnys1 pushed a commit that referenced this issue Jun 14, 2022
Fixes #1696

Fixes device serialization on iOS when just an ID is passed. I confirmed this issue does not exist on Android.

commit-id:8d6c6d72
dnys1 pushed a commit to dnys1/amplify-flutter that referenced this issue Jun 20, 2022
Fixes aws-amplify#1696

Fixes device serialization on iOS when just an ID is passed. I confirmed this issue does not exist on Android.

commit-id:8d6c6d72
dnys1 pushed a commit that referenced this issue Jun 20, 2022
Fixes #1696

Fixes device serialization on iOS when just an ID is passed. I confirmed this issue does not exist on Android.

commit-id:8d6c6d72
@dnys1
Copy link
Contributor

dnys1 commented Jun 20, 2022

This has been released with v0.6.0!

@Migos17
Copy link
Author

Migos17 commented Jun 21, 2022

This has been released with v0.6.0!

thank you :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Issues related to the Auth Category pending-release Issues that have been addressed in main but have not been released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants