You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Firebase Image should be able to update the local DB cache.
Actual Behaviour
The Firebase Image tries to update the local DB cache, but fails.
Android Studio reports the following error:
`======== Exception caught by image resource service ================================================
The following ArgumentError was thrown resolving an image codec:
Invalid argument: Instance of 'Reference'
When the exception was thrown, this was the stack:
#0 StandardMessageCodec.writeValue (package:flutter/src/services/message_codecs.dart:419:7) #1 StandardMessageCodec.writeValue (package:flutter/src/services/message_codecs.dart:409:9) #2 StandardMessageCodec.writeValue. (package:flutter/src/services/message_codecs.dart:416:9) #3 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:397:8) #4 StandardMessageCodec.writeValue (package:flutter/src/services/message_codecs.dart:414:13)
...
====================================================================================================`
The problem is in image_object.dart file, with the toMap() method. The reference should call a toString() method, because the local DB does not accept Reference type.
Other problem, I found, the DB schema does not contain the reference column. It is missing in the cache_manager.dart file, in the open() method.
CREATE TABLE $table (
uri TEXT PRIMARY KEY,
remotePath TEXT,
localPath TEXT,
reference TEXT,
bucket TEXT,
version INTEGER
)
Expected Behaviour
The Firebase Image should be able to update the local DB cache.
Actual Behaviour
The Firebase Image tries to update the local DB cache, but fails.
Android Studio reports the following error:
`======== Exception caught by image resource service ================================================
The following ArgumentError was thrown resolving an image codec:
Invalid argument: Instance of 'Reference'
When the exception was thrown, this was the stack:
#0 StandardMessageCodec.writeValue (package:flutter/src/services/message_codecs.dart:419:7)
#1 StandardMessageCodec.writeValue (package:flutter/src/services/message_codecs.dart:409:9)
#2 StandardMessageCodec.writeValue. (package:flutter/src/services/message_codecs.dart:416:9)
#3 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:397:8)
#4 StandardMessageCodec.writeValue (package:flutter/src/services/message_codecs.dart:414:13)
...
====================================================================================================`
Specifications
Flutter 2.2.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b22742018b (3 weeks ago) • 2021-05-14 19:12:57 -0700
Engine • revision a9d88a4d18
Tools • Dart 2.13.0
I found this error on MacOS (Big Sur), but not on Linux Mint.
The text was updated successfully, but these errors were encountered: