Closed Ozak93 closed 2 years ago
update:
so i thought perhaps i can pass the options parameter when i call List function. now my function call looks like this:
var res = await Amplify.Storage.list(path: path,options: ListOptions(accessLevel: StorageAccessLevel.guest));
And it resolved the above crash! but now am faced with an Exception instead!, a Format Exception to be precise.
`[VERBOSE-2:ui_dart_state.cc(209)] Unhandled Exception: FormatException: Invalid date format ٢٠٢١-١٠-٢٨ ١٤:٣٣:٥٥ +0000
`
the Amplify Storage API seems to use the Device's Locale to receive data in the Locale's language code. in this case, my device was in Arabic. and the returned property Last Modified of my list object is now in Arabic numerals which caused a format exception. is there a possibility of ignoring the app/device's locale? and just default to English, i can format the data returned if i need to.
Greetings, when could we see the fixes for this issue deployed to the flutter plugin? we're currently delaying our iOS app production deployment till these fixes are push to the plugin.
Hi @Ozak93 - thank you for your patience resolving this issue. Version 0.2.8 has been released with the fix and I'd be excited to know how it works for you. Please let me know if you experience this or any other issues, and I hope have a great weekend!
Thank you so much, the issue seems resolved!
Describe the bug When i navigate to a page that calls Amplify's Storage function List, the page freezes and throws the following exception in Xcode's console:
amplify_storage_s3/FlutterListRequest.swift:37: Fatal error: Unexpectedly found nil while unwrapping an Optional value 2021-11-08 06:34:07.841725-0800 Runner[4310:26946] amplify_storage_s3/FlutterListRequest.swift:37: Fatal error: Unexpectedly found nil while unwrapping an Optional value
To Reproduce Steps to reproduce the behavior:
await Amplify.Storage.list(path: path);
in iOS Flutter app.Expected behavior returns a list of objects in the provided bucket path.
Screenshots
Platform Amplify Flutter current supports iOS and Android. This issue is reproducible in (check all that apply): [] Android [x] iOS
Output of
```[✓] Flutter (Channel stable, 2.5.3, on macOS 11.5.1 20G80 darwin-x64, locale en-US) • Flutter version 2.5.3 at /Users/zutch/Desktop/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 18116933e7 (4 weeks ago), 2021-10-15 10:46:35 -0700 • Engine revision d3ea636dc5 • Dart version 2.14.4 [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at /Users/zutch/Library/Android/sdk • Platform android-31, build-tools 31.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.5.1, Build version 12E507 • CocoaPods version 1.11.2 [✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [✓] Android Studio (version 2020.3) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165) [✓] Connected device (1 available) • iPhone 8 (mobile) • D1AA0BCA-27A3-4ED9-9B15-3B5E2DB9540F • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator) ! Doctor found issues in 1 category. ```flutter doctor -v
Smartphone (please complete the following information):
Additional context This is just an observation, in the screenshot provided above, the if statement, checks if the Map options is null OR path is null, but proceeds to traverse over the keys' even tho the map is null. so i think there should be an inner check skipping the map iteration if the map is null.