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

[firebase_storage]: Java plugin outputting error in addition to the Dart plugin error #12590

Open
1 task done
Levi-Lesches opened this issue Apr 5, 2024 · 1 comment
Open
1 task done
Assignees
Labels
blocked: firebase-sdk platform: android Issues / PRs which are specifically for Android. plugin: storage type: bug Something isn't working

Comments

@Levi-Lesches
Copy link
Contributor

Levi-Lesches commented Apr 5, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Storage

Which platforms are affected?

Android

Description

Eg, deleting a reference that doesn't exist causes both the Java and Dart sides of the plugin to emit an error.

Reproducing the issue

final ref = _root.child("something that does not exist");
await ref.delete();

Firebase Core version

2.27.1

Flutter Version

3.19.3

Relevant Log Output

E/StorageException(13005): StorageException has occurred.
E/StorageException(13005): Object does not exist at location.
E/StorageException(13005):  Code: -13010 HttpResult: 404
E/StorageException(13005): {  "error": {    "code": 404,    "message": "Not Found."  }}
E/StorageException(13005): java.io.IOException: {  "error": {    "code": 404,    "message": "Not Found."  }}
E/StorageException(13005): 	at com.google.firebase.storage.network.NetworkRequest.parseResponse(NetworkRequest.java:415)
E/StorageException(13005): 	at com.google.firebase.storage.network.NetworkRequest.parseErrorResponse(NetworkRequest.java:432)
E/StorageException(13005): 	at com.google.firebase.storage.network.NetworkRequest.processResponseStream(NetworkRequest.java:423)
E/StorageException(13005): 	at com.google.firebase.storage.network.NetworkRequest.performRequest(NetworkRequest.java:265)
E/StorageException(13005): 	at com.google.firebase.storage.network.NetworkRequest.performRequest(NetworkRequest.java:282)
E/StorageException(13005): 	at com.google.firebase.storage.internal.ExponentialBackoffSender.sendWithExponentialBackoff(ExponentialBackoffSender.java:76)
E/StorageException(13005): 	at com.google.firebase.storage.internal.ExponentialBackoffSender.sendWithExponentialBackoff(ExponentialBackoffSender.java:68)
E/StorageException(13005): 	at com.google.firebase.storage.DeleteStorageTask.run(DeleteStorageTask.java:59)
E/StorageException(13005): 	at com.google.firebase.concurrent.LimitedConcurrencyExecutor.lambda$decorate$0$com-google-firebase-concurrent-LimitedConcurrencyExecutor(LimitedConcurrencyExecutor.java:65)
E/StorageException(13005): 	at com.google.firebase.concurrent.LimitedConcurrencyExecutor$$ExternalSyntheticLambda0.run(Unknown Source:4)
E/StorageException(13005): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
E/StorageException(13005): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
E/StorageException(13005): 	at com.google.firebase.concurrent.CustomThreadFactory.lambda$newThread$0$com-google-firebase-concurrent-CustomThreadFactory(CustomThreadFactory.java:47)
E/StorageException(13005): 	at com.google.firebase.concurrent.CustomThreadFactory$$ExternalSyntheticLambda0.run(Unknown Source:4)
E/StorageException(13005): 	at java.lang.Thread.run(Thread.java:1012)
E/flutter (13005): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: [firebase_storage/object-not-found] No object exists at the desired reference.
E/flutter (13005): #0      FirebaseStorageHostApi.referenceDelete (package:firebase_storage_platform_interface/src/pigeon/messages.pigeon.dart:441:7)
E/flutter (13005): <asynchronous suspension>
E/flutter (13005): #1      MethodChannelReference.delete (package:firebase_storage_platform_interface/src/method_channel/method_channel_reference.dart:44:7)
E/flutter (13005): <asynchronous suspension>
E/flutter (13005): #2      CloudStorageService.deleteSellerProfile (package:btc_market/src/services/cloud_storage.dart:55:5)
E/flutter (13005): <asynchronous suspension>
E/flutter (13005): #3      Services.deleteSellerProfile (package:btc_market/services.dart:41:5)
E/flutter (13005): <asynchronous suspension>
E/flutter (13005): #4      ConfirmDeleteModel.deleteProfile (package:btc_market/src/pages/editors/confirm_delete.dart:41:5)
E/flutter (13005): <asynchronous suspension>
E/flutter (13005): #5      ConfirmDeleteDialog.build.<anonymous closure> (package:btc_market/src/pages/editors/confirm_delete.dart:94:11)
E/flutter (13005): <asynchronous suspension>
E/flutter (13005):

Flutter dependencies

Expand Flutter dependencies snippet
Dart SDK 3.3.1
Flutter SDK 3.19.3
btc_market 1.0.0+1

dependencies:
- cloud_firestore 4.15.9 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- file_picker 8.0.0+1 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface ffi path win32 cross_file]
- firebase_auth 4.17.9 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 2.27.1 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_storage 11.6.10 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_rating_bar 4.0.1 [flutter]
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math]
- font_awesome_flutter 10.7.0 [flutter]
- go_router 13.2.0 [collection flutter flutter_web_plugins logging meta]
- meta 1.11.0
- url_launcher 6.2.5 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]

dev dependencies:
- flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math leak_tracker_flutter_testing async boolean_selector characters collection leak_tracker leak_tracker_testing material_color_utilities meta source_span stream_channel string_scanner term_glyph vm_service]
- very_good_analysis 5.1.0

transitive dependencies:
- _flutterfire_internals 1.3.26 [collection firebase_core firebase_core_platform_interface flutter meta]
- async 2.11.0 [collection meta]
- boolean_selector 2.1.1 [source_span string_scanner]
- characters 1.3.0
- clock 1.1.1
- cloud_firestore_platform_interface 6.1.10 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 3.10.9 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js]
- collection 1.18.0
- cross_file 0.3.4+1 [meta web]
- fake_async 1.3.1 [clock collection]
- ffi 2.1.2
- firebase_auth_platform_interface 7.1.9 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 5.10.0 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser js meta web]
- firebase_core_platform_interface 5.0.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.12.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta web]
- firebase_storage_platform_interface 5.1.13 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_storage_web 3.8.0 [_flutterfire_internals async firebase_core firebase_core_web firebase_storage_platform_interface flutter flutter_web_plugins http js meta web]    
- flutter_plugin_android_lifecycle 2.0.17 [flutter]
- http 1.2.1 [async http_parser meta web]
- http_parser 4.0.2 [collection source_span string_scanner typed_data]
- js 0.6.7 [meta]
- leak_tracker 10.0.0 [clock collection meta path vm_service]
- leak_tracker_flutter_testing 2.0.1 [flutter leak_tracker leak_tracker_testing matcher meta]
- leak_tracker_testing 2.0.1 [leak_tracker matcher meta]
- logging 1.2.0
- matcher 0.12.16+1 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.8.0 [collection]
- path 1.9.0
- plugin_platform_interface 2.1.8 [meta]
- sky_engine 0.0.99
- source_span 1.10.0 [collection path term_glyph]
- stack_trace 1.11.1 [path]
- stream_channel 2.1.2 [async]
- string_scanner 1.2.0 [source_span]
- term_glyph 1.2.1
- test_api 0.6.1 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- typed_data 1.3.2 [collection]
- url_launcher_android 6.3.0 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.2.5 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.1.1 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.1.0 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.3.2 [flutter plugin_platform_interface]
- url_launcher_web 2.3.0 [flutter flutter_web_plugins url_launcher_platform_interface web]
- url_launcher_windows 3.1.1 [flutter url_launcher_platform_interface]
- vector_math 2.1.4
- vm_service 13.0.0
- web 0.5.1
- win32 5.3.0 [ffi]

Additional context and comments

I was able to handle the error on the Dart side. This is not crashing the app, just outputting to the console.

@Levi-Lesches Levi-Lesches added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Apr 5, 2024
@russellwheatley russellwheatley self-assigned this Apr 5, 2024
@russellwheatley
Copy link
Member

@Levi-Lesches - They appear to be logs coming from the native side. We handle delete reference here and it is passing the exception back to Flutter.

I've opened an issue anyway, see if the logs are intended from firebase android: firebase/firebase-android-sdk#5836

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: firebase-sdk platform: android Issues / PRs which are specifically for Android. plugin: storage type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants