skyturkish / second_hand

An application made with firebase, where users can upload a photo of their products, sell or buy them along with a description and price.
MIT License
10 stars 1 forks source link

ERROR- Initial opening of Stream failed #44

Closed skyturkish closed 2 years ago

skyturkish commented 2 years ago

I don't get it, basic firebase operation causes both errors #44 and #45

 late final Reference storageRef;
  late final Reference imageRef;
  Uint8List? photo;
  @override
  void initState() {
    storageRef = FirebaseStorage.instance.ref();
    imageRef = storageRef.child(widget.user.profilePhotoPath);
    getImage();
    super.initState();
  }

  Future<void> getImage() async {
    photo = await imageRef.getData();
    setState(() {});
  }
skyturkish commented 2 years ago

when I delete getImage(), it is fixed

skyturkish commented 2 years ago

I transfer getImage to in GetUserInformations function which one I run at initialize time, that fixed it