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

TypeError (type 'Null' is not a subtype of type 'Reference') #40

Closed
17martix opened this issue Apr 11, 2021 · 15 comments
Closed

TypeError (type 'Null' is not a subtype of type 'Reference') #40

17martix opened this issue Apr 11, 2021 · 15 comments

Comments

@17martix
Copy link

my app was crashing every time firebase_image was loading picture stating TypeError (type 'Null' is not a subtype of type 'Reference'). after looking into the code, it's the FirebaseImageObject.fromMap(Map<String, dynamic> map) method in image_object.dart causing the error because it's called with no value given to the reference key.

potential solution: make Reference variable in FirebaseImageObject nullable and it solves the problem.

@Yayo-Arellano
Copy link

Yayo-Arellano commented Apr 20, 2021

I also have the same problem

======== Exception caught by image resource service ================================================
The following _TypeError was thrown resolving an image codec:
type 'Null' is not a subtype of type 'Reference'

When the exception was thrown, this was the stack: 
#0      new FirebaseImageObject.fromMap (package:firebase_image/src/image_object.dart:32:21)
#1      FirebaseImageCacheManager.get (package:firebase_image/src/cache_manager.dart:93:31)
<asynchronous suspension>
#2      FirebaseImage._fetchImage (package:firebase_image/src/firebase_image.dart:82:11)
<asynchronous suspension>
...
====================================================================================================

@JErazo7
Copy link

JErazo7 commented Apr 26, 2021

Any solution?

@difelice
Copy link

difelice commented May 15, 2021

Duplicate
You're right, thanks👇

@blaugold
Copy link
Contributor

@difelice I don't think this is a duplicate of #37. That issue is about a warning of an unnecessary non-null assertion. This issue is about passing null to a non-null parameter at runtime and causing an exception.

@ABleas
Copy link

ABleas commented May 26, 2021

I'd love to use this package but right now it's not displaying images at all. Is there a work-around for this issue, other than waiting for the PR to be merged?

@maeddin
Copy link

maeddin commented Jun 25, 2021

It still does not work. My solution was to use the fork of #45 . Thanks to @blaugold

@yelkamel
Copy link

yelkamel commented Nov 4, 2021

I have the same issue and the fork of #45 fixed the issue for me, please merge it :)

@psimondk
Copy link

I can only second @yelkamel as I have the same issue - please merge :)

@kostodo
Copy link

kostodo commented Dec 24, 2021

Same issue here.

@janlektonen
Copy link

I face the same issue after updating to version 1.1.0

@mattreid1
Copy link
Owner

I was unable to replicate but I'll take a look now

@mattreid1
Copy link
Owner

Ok, I merged #45 and released 1.1.1 so 🤞 that fixed it. As I was unable to replicate the problem, please let me know if it works so I can close the issue. Thanks!

@mattreid1
Copy link
Owner

Going to close this issue now but if this is still a problem then feel free to reopen it!

@yelkamel
Copy link

this work for me thank you :) @mattreid1

@psimondk
Copy link

psimondk commented Jan 25, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests