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.33k stars 247 forks source link

Not allowed to start service Intent #1635

Closed sherrychhabra51 closed 2 years ago

sherrychhabra51 commented 2 years ago

Description

We are currently experiencing lot of crashes while uploading a file when app is in background. Here is the exception that we are gettting:-

Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: StorageException(message: Issue uploading file., recoverySuggestion: See included exception for more details and suggestions to fix., underlyingException: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.bedwal.bijak.mvp/com.amazonaws.mobileconnectors.s3.transferutility.TransferService }: app is in background uid UidRecord{d914089 u0a388 LAST bg:+1m37s34ms idle change:cached procs:1 seq(0,0,0)}). Error thrown null

Here is the version that we are using . amplify_storage_s3 0.4.5

We have received this exception plenty of times in last 1 week and the affected devices have OS 8 and above.

Categories

Steps to Reproduce

No response

Screenshots

No response

Platforms

Android Device/Emulator API Level

API 26, API 27, API 28, API 29, API 30, API 31, API 32+

Environment

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.5, on macOS 12.0.1 21A559 darwin-x64, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.66.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

• No issues found!

Dependencies

Dart SDK 2.16.2
Flutter SDK 2.10.5
bijakflutter 2.4.9+5785

dependencies:
- advertising_id 2.3.0 [flutter]
- amplify_auth_cognito 0.4.5 [flutter amplify_auth_plugin_interface amplify_core amplify_auth_cognito_android amplify_auth_cognito_ios collection plugin_platform_interface]
- amplify_flutter 0.4.5 [amplify_analytics_plugin_interface amplify_api_plugin_interface amplify_auth_plugin_interface amplify_core amplify_datastore_plugin_interface amplify_storage_plugin_interface collection flutter json_annotation meta plugin_platform_interface]
- amplify_storage_s3 0.4.5 [flutter amplify_storage_plugin_interface plugin_platform_interface amplify_storage_s3_android amplify_storage_s3_ios amplify_core]
- android_external_storage 0.1.0 [flutter]
- android_intent 2.0.2 [flutter platform meta]
- animated_widgets 1.1.0 [flutter vector_math]
- animations 2.0.2 [flutter]
- app_settings 4.1.6 [flutter]
- audioplayers 0.20.1 [uuid path_provider http flutter flutter_web_plugins]
- cached_network_image 3.2.0 [flutter flutter_cache_manager octo_image cached_network_image_platform_interface cached_network_image_web]
- cashfree_pg 2.0.10+30 [flutter flutter_web_plugins]
- chewie 1.3.3 [cupertino_icons flutter provider video_player wakelock]
- connectivity_plus 2.3.0 [flutter connectivity_plus_platform_interface connectivity_plus_linux connectivity_plus_macos connectivity_plus_web connectivity_plus_windows]
- contacts_service 0.6.3 [flutter collection quiver]
- csv 5.0.1
- cupertino_icons 1.0.4
- 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]
- device_preview 1.0.0 [flutter flutter_localizations provider device_frame freezed_annotation json_annotation shared_preferences]
- dio 4.0.6 [http_parser path]
- dio_firebase_performance 0.3.1-dev.3 [flutter dio firebase_performance]
- dotted_decoration 2.0.0 [flutter]
- encrypt 5.0.1 [args asn1lib clock collection crypto pointycastle]
- expandable 5.0.1 [flutter]
- extended_tabs 2.3.0 [flutter]
- f_logs 2.0.1 [flutter sembast path_provider intl xxtea meta path stack_trace]
- file_picker 4.5.1 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface ffi path win32]
- firebase_analytics 9.1.8 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter]
- firebase_auth 3.3.18 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 1.17.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_crashlytics 2.7.2 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
- firebase_dynamic_links 4.2.4 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface]
- 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.0 [flutter equatable]
- flutter 0.0.0 [characters collection material_color_utilities meta typed_data vector_math sky_engine]
- flutter_branch_sdk 5.0.0 [flutter flutter_web_plugins plugin_platform_interface js flutter_lints]
- flutter_cached_pdfview 0.4.1 [flutter flutter_pdfview flutter_cache_manager path_provider path]
- flutter_contacts 1.1.4 [flutter]
- flutter_downloader 1.7.4 [flutter]
- flutter_flavor 3.0.3 [flutter xml yaml]
- flutter_google_places 0.3.0 [flutter google_api_headers google_maps_webservice http rxdart]
- flutter_html 3.0.0-alpha.3 [html csslib collection numerus flutter]
- flutter_local_notifications 9.5.3+1 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone]
- flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path typed_data vector_math]
- flutter_rating_bar 4.0.1 [flutter]
- flutter_spinkit 5.1.0 [flutter]
- flutter_sticky_header 0.6.3 [flutter value_layout_builder]
- flutter_svg 1.0.3 [flutter meta path_drawing vector_math xml]
- flutter_typeahead 3.2.7 [flutter flutter_keyboard_visibility]
- flutter_widget_from_html_core 0.8.5+3 [csslib flutter fwfh_text_style html]
- fluttertoast 8.0.9 [flutter flutter_web_plugins]
- geolocator 8.2.1 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows]
- get 4.6.1 [flutter]
- get_storage 2.0.3 [flutter get path_provider]
- 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]
- hasura_cache_interceptor 1.0.0-dev.5 [uuid hasura_connect]
- hasura_connect 3.0.6 [http async either_dart meta string_validator uuid dart_websocket collection]
- http 0.13.4 [async http_parser meta path]
- http_proxy 1.2.0 [flutter http]
- image_cropper 1.5.1 [flutter]
- image_picker 0.8.5+3 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_platform_interface]
- in_app_review 2.0.4 [flutter in_app_review_platform_interface]
- intl 0.17.0 [clock path]
- jaguar_jwt 3.0.0 [auth_header crypto]
- local_auth 1.1.11 [flutter flutter_plugin_android_lifecycle intl platform]
- location 4.4.0 [flutter location_platform_interface location_web]
- lottie 1.3.0 [archive flutter path vector_math]
- moengage_flutter 4.1.0 [flutter]
- new_version 0.3.0 [flutter package_info_plus http html url_launcher collection]
- open_file 3.2.1 [flutter ffi]
- package_info 2.0.2 [flutter]
- 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]
- permission_handler 9.2.0 [flutter meta permission_handler_android permission_handler_apple permission_handler_windows permission_handler_platform_interface]
- pull_to_refresh 2.0.0 [flutter]
- quick_actions 0.6.0+11 [flutter quick_actions_android quick_actions_ios quick_actions_platform_interface]
- razorpay_flutter 1.3.0 [flutter eventify fluttertoast]
- screenshot 1.2.3 [flutter]
- share_plus 4.0.4 [meta mime flutter share_plus_platform_interface share_plus_linux share_plus_macos share_plus_windows share_plus_web]
- 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]
- sms_autofill 2.2.0 [pin_input_text_field flutter]
- speech_to_text 5.5.0 [flutter speech_to_text_platform_interface json_annotation clock pedantic flutter_web_plugins meta js]
- sprintf 6.0.0
- sticky_headers 0.2.0 [flutter]
- stream_chat_flutter 4.1.0 [cached_network_image characters chewie collection diacritic dio ezanimation file_picker flutter flutter_markdown flutter_portal flutter_slidable flutter_svg http_parser image_gallery_saver image_picker jiffy lottie meta path_provider photo_manager photo_view rxdart share_plus shimmer stream_chat_flutter_core substring_highlight url_launcher video_player video_thumbnail]
- syncfusion_flutter_core 19.4.56 [vector_math flutter]
- syncfusion_flutter_sliders 19.4.56 [flutter intl syncfusion_flutter_core]
- truecaller_sdk 0.1.0 [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]
- vibration 1.7.4-nullsafety.0 [flutter vibration_web]
- video_player 2.4.2 [flutter html video_player_android video_player_avfoundation video_player_platform_interface video_player_web]
- visibility_detector 0.2.2 [flutter]
- youtube_player_flutter 8.0.0 [flutter flutter_inappwebview]

dependency overrides:
- flutter_portal 1.0.0 [collection flutter vector_math]
- rxdart 0.27.3

transitive dependencies:
- amplify_analytics_plugin_interface 0.4.5 [amplify_core flutter meta]
- amplify_api_plugin_interface 0.4.5 [amplify_core collection flutter json_annotation meta]
- amplify_auth_cognito_android 0.4.5 [flutter]
- amplify_auth_cognito_ios 0.4.5 [amplify_core flutter]
- amplify_auth_plugin_interface 0.4.5 [flutter meta amplify_core]
- amplify_core 0.4.5 [flutter plugin_platform_interface collection date_time_format meta uuid]
- amplify_datastore_plugin_interface 0.4.5 [flutter meta collection amplify_core]
- amplify_storage_plugin_interface 0.4.5 [flutter meta amplify_core]
- amplify_storage_s3_android 0.4.5 [flutter]
- amplify_storage_s3_ios 0.4.5 [flutter]
- archive 3.3.0 [crypto path]
- args 2.3.1
- asn1lib 1.1.0
- async 2.8.2 [collection meta]
- auth_header 3.0.1
- 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
- collection 1.15.0
- connectivity_plus_linux 1.3.0 [flutter connectivity_plus_platform_interface meta nm]
- connectivity_plus_macos 1.2.2 [connectivity_plus_platform_interface flutter]
- connectivity_plus_platform_interface 1.2.0 [flutter meta plugin_platform_interface]
- connectivity_plus_web 1.2.0 [connectivity_plus_platform_interface flutter_web_plugins flutter]
- connectivity_plus_windows 1.2.0 [connectivity_plus_platform_interface flutter]
- convert 3.0.1 [typed_data]
- cross_file 0.3.3+1 [js meta]
- crypto 3.0.2 [typed_data]
- crypto_keys 0.3.0 [pointycastle meta collection quiver]
- csslib 0.17.1 [source_span]
- dart_websocket 1.0.0
- date_time_format 2.0.1
- dbus 0.7.3 [args ffi meta xml]
- device_frame 1.0.0 [freezed_annotation flutter]
- 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]
- diacritic 0.1.3
- either_dart 0.1.4
- equatable 2.0.3 [collection meta]
- eventify 1.0.0
- ezanimation 0.6.0 [flutter]
- ffi 1.2.1
- file 6.1.2 [meta path]
- firebase 9.0.3 [http http_parser js]
- 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_auth_platform_interface 6.2.6 [firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 3.3.15 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js 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_crashlytics_platform_interface 3.2.6 [collection firebase_core flutter meta plugin_platform_interface]
- firebase_dynamic_links_platform_interface 0.2.3+2 [firebase_core flutter meta plugin_platform_interface]
- 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_performance 0.7.1+5 [firebase_core firebase_core_platform_interface firebase_performance_platform_interface firebase_performance_web flutter]
- firebase_performance_platform_interface 0.0.1+8 [firebase_core flutter plugin_platform_interface]
- firebase_performance_web 0.0.3+1 [firebase firebase_core firebase_core_web firebase_performance_platform_interface flutter flutter_web_plugins]
- 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_inappwebview 5.4.3+7 [flutter]
- flutter_keyboard_visibility 5.2.0 [meta flutter_keyboard_visibility_platform_interface flutter_keyboard_visibility_web flutter]
- flutter_keyboard_visibility_platform_interface 2.0.0 [flutter meta plugin_platform_interface]
- flutter_keyboard_visibility_web 2.0.0 [flutter_keyboard_visibility_platform_interface flutter_web_plugins flutter]
- flutter_lints 1.0.4 [lints]
- flutter_local_notifications_linux 0.4.2 [flutter flutter_local_notifications_platform_interface dbus path xdg_directories]
- flutter_local_notifications_platform_interface 5.0.0 [flutter plugin_platform_interface]
- flutter_markdown 0.6.10 [flutter markdown meta path]
- flutter_pdfview 1.2.2 [flutter]
- flutter_plugin_android_lifecycle 2.0.6 [flutter]
- flutter_slidable 1.3.0 [flutter]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta typed_data vector_math]
- freezed_annotation 1.1.0 [collection json_annotation meta]
- fwfh_text_style 2.7.3+2 [flutter]
- geolocator_android 3.1.8 [flutter geolocator_platform_interface]
- geolocator_apple 2.1.4 [flutter geolocator_platform_interface]
- geolocator_platform_interface 4.0.5 [flutter plugin_platform_interface vector_math meta]
- geolocator_web 2.1.5 [flutter flutter_web_plugins geolocator_platform_interface]
- geolocator_windows 0.1.1 [flutter geolocator_platform_interface]
- google_api_headers 1.3.0 [flutter package_info_plus]
- google_maps_webservice 0.0.20-nullsafety.5 [http meta json_annotation]
- gql 0.13.1 [collection meta source_span]
- gql_dedupe_link 2.0.2 [async gql_exec gql_link meta]
- gql_error_link 0.2.2 [async gql_exec gql_link meta]
- gql_exec 0.4.0 [collection gql meta]
- gql_http_link 0.4.2 [gql gql_exec gql_link http http_parser meta]
- gql_link 0.4.2 [gql gql_exec meta]
- gql_transform_link 0.2.2 [gql_exec gql_link]
- hive 2.2.1 [meta crypto]
- html 0.15.0 [csslib source_span]
- http_parser 4.0.1 [collection source_span string_scanner typed_data]
- image_gallery_saver 1.7.1 [flutter]
- image_picker_android 0.8.4+13 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface]
- image_picker_for_web 2.1.8 [flutter flutter_web_plugins image_picker_platform_interface]
- image_picker_ios 0.8.5+5 [flutter image_picker_platform_interface]
- image_picker_platform_interface 2.5.0 [cross_file flutter http plugin_platform_interface]
- in_app_review_platform_interface 2.0.3 [flutter url_launcher plugin_platform_interface platform]
- jiffy 5.0.0 [intl]
- jose 0.3.2 [crypto_keys meta typed_data x509 http http_parser asn1lib collection]
- js 0.6.3
- json_annotation 4.5.0 [meta]
- lints 1.0.1
- location_platform_interface 2.3.0 [flutter meta plugin_platform_interface]
- location_web 3.1.1 [flutter flutter_web_plugins http_parser js location_platform_interface meta]
- logging 1.0.2
- markdown 5.0.0 [args charcode meta]
- matcher 0.12.11 [stack_trace]
- material_color_utilities 0.1.3
- meta 1.7.0
- mime 1.0.2
- nested 1.0.0 [flutter]
- nm 0.5.0 [dbus]
- normalize 0.6.0+1 [gql collection]
- numerus 1.1.1
- octo_image 1.0.2 [flutter flutter_blurhash]
- package_info_plus 1.4.2 [flutter package_info_plus_platform_interface package_info_plus_linux package_info_plus_macos package_info_plus_windows package_info_plus_web]
- package_info_plus_linux 1.0.5 [package_info_plus_platform_interface flutter path]
- package_info_plus_macos 1.3.0 [flutter]
- package_info_plus_platform_interface 1.0.2 [flutter meta plugin_platform_interface]
- package_info_plus_web 1.0.5 [flutter flutter_web_plugins http meta package_info_plus_platform_interface]
- package_info_plus_windows 1.0.5 [package_info_plus_platform_interface ffi flutter win32]
- path 1.8.0
- path_drawing 1.0.0 [vector_math meta path_parsing flutter]
- path_parsing 1.0.0 [vector_math meta]
- 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
- permission_handler_android 9.0.2+1 [flutter permission_handler_platform_interface]
- permission_handler_apple 9.0.4 [flutter permission_handler_platform_interface]
- permission_handler_platform_interface 3.7.0 [flutter meta plugin_platform_interface]
- permission_handler_windows 0.1.0 [flutter permission_handler_platform_interface]
- petitparser 4.4.0 [meta]
- photo_manager 2.1.1 [flutter]
- photo_view 0.13.0 [flutter]
- pin_input_text_field 4.1.2 [flutter]
- platform 3.1.0
- plugin_platform_interface 2.1.2 [meta]
- pointycastle 3.6.0 [collection convert js]
- process 4.2.4 [file path platform]
- provider 6.0.3 [collection flutter nested]
- quick_actions_android 0.6.0+10 [flutter quick_actions_platform_interface]
- quick_actions_ios 0.6.0+10 [flutter quick_actions_platform_interface]
- quick_actions_platform_interface 1.0.2 [flutter plugin_platform_interface]
- quiver 3.1.0 [matcher]
- rate_limiter 0.1.1
- sembast 3.2.0 [meta path synchronized]
- share_plus_linux 3.0.0 [share_plus_platform_interface file flutter meta url_launcher]
- share_plus_macos 3.0.0 [share_plus_platform_interface flutter]
- share_plus_platform_interface 3.0.2 [flutter meta mime plugin_platform_interface]
- share_plus_web 3.0.0 [share_plus_platform_interface url_launcher flutter flutter_web_plugins meta]
- share_plus_windows 3.0.0 [share_plus_platform_interface flutter meta url_launcher]
- 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]
- shimmer 2.0.0 [flutter]
- sky_engine 0.0.99
- source_span 1.8.1 [collection path term_glyph]
- speech_to_text_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
- sqflite 2.0.2+1 [flutter sqflite_common path]
- sqflite_common 2.2.1+1 [synchronized path meta]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- stream_chat 4.1.0 [async collection dio equatable freezed_annotation http_parser jose json_annotation logging meta mime rate_limiter rxdart uuid web_socket_channel]
- stream_chat_flutter_core 4.1.0 [collection connectivity_plus flutter freezed_annotation meta rxdart stream_chat]
- string_scanner 1.1.0 [charcode source_span]
- string_validator 0.3.0
- substring_highlight 1.0.33 [flutter]
- synchronized 3.0.0+2
- term_glyph 1.2.0
- timezone 0.8.0 [path]
- typed_data 1.3.0 [collection]
- url_launcher_android 6.0.17 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.0.17 [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]
- value_layout_builder 0.3.1 [flutter]
- vector_math 2.1.1
- vibration_web 1.6.3-nullsafety.0 [flutter flutter_web_plugins]
- video_player_android 2.3.4 [flutter video_player_platform_interface]
- video_player_avfoundation 2.3.4 [flutter video_player_platform_interface]
- video_player_platform_interface 5.1.2 [flutter plugin_platform_interface]
- video_player_web 2.0.10 [flutter flutter_web_plugins video_player_platform_interface]
- video_thumbnail 0.5.0 [flutter]
- wakelock 0.6.1+2 [flutter meta wakelock_macos wakelock_platform_interface wakelock_web wakelock_windows]
- wakelock_macos 0.4.0 [flutter flutter_web_plugins wakelock_platform_interface]
- wakelock_platform_interface 0.3.0 [flutter meta]
- wakelock_web 0.4.0 [flutter flutter_web_plugins js wakelock_platform_interface]
- wakelock_windows 0.2.0 [flutter wakelock_platform_interface win32]
- web_socket_channel 2.2.0 [async crypto stream_channel]
- win32 2.5.2 [ffi]
- x509 0.2.2 [asn1lib quiver crypto_keys]
- xdg_directories 0.2.0+1 [meta path process]
- xml 5.3.1 [collection meta petitparser]
- xxtea 2.1.0
- yaml 3.1.1 [collection source_span string_scanner]

Device

Xiomi, Samsung, Vivo

OS

Android 8,10,11

CLI Version

6.3.1

Additional Context

No response

HuiSF commented 2 years ago

Should be related to https://github.com/aws-amplify/aws-sdk-android/issues/1193

HuiSF commented 2 years ago

This issue occurs when an upload/download tasks gets initiated while the App is entering background state. This issue is caused by the lack of background upload/download support of amplify-android https://github.com/aws-amplify/amplify-android/issues/1115

Unfortunately this feature request hasn't been fulfilled.

However, amplify-android should make a change to prevent the crash.

sherrychhabra51 commented 2 years ago

@HuiSF Do we have a quick fix in the meantime to get rid of this exception ?

sdhuka commented 2 years ago

@sherrychhabra51 We have a PR out to address this issue.

If you cannot wait for the next release then I suggest starting the transferservice before calling any amplify storage API, in which case startService call will be ignored the OS since service is already running and you can avoid the crash.

jack24254029 commented 2 years ago

@sherrychhabra51 We have a PR out to address this issue.

If you cannot wait for the next release then I suggest starting the transferservice before calling any amplify storage API, in which case startService call will be ignored the OS since service is already running and you can avoid the crash.

How do I startService in Flutter?

androidcodehunter commented 2 years ago

@sdhuka will the next version fix this issue for android and flutter? Or the solution is only for flutter android but not for native android? We are having lots of this issue in our production android app which causing crash reporting flood.

HuiSF commented 2 years ago

Hi @androidcodehunter the fix implemented in android is only for preventing the crash. Background upload/download is not supported. We will try to integrate the fix in amplify-android as soon as possible (currently we have an issue exists in amplify-android that breaks an amplify-flutter use cae) and roll out a new version of amplify-flutter to release this fix for amplify-flutter consumers.

sherrychhabra51 commented 2 years ago

@sdhuka @HuiSF If possible, can you please let us know when can we expect this to be roll out. This would help us in planning alternatives for the same.

HuiSF commented 2 years ago

Hi @sherrychhabra51 sorry I forgot to update

This fix for this issue has been release with amplify v0.6.2. Be aware this may happen when upgrade the library to the latest version with this fix.