title: Unable to load Profile Picture using Glide Library from Firebase
body: <p>I am trying to load the profile picture which is uploaded in firebase. I am using the Glide Library to load images into a circular image view which uses <a href="https://github.com/hdodenhof/CircleImageView" rel="nofollow noreferrer">this</a> library.</p>
  
  <p>I have tried both the methods i.e. using Firebase UI and by getting the uri by using getDownlodUrl() method.</p>
  
  <p>I am able to successfully get the download URL but glide is giving me an error which I am unable to understand.</p>
  
  <p>I tried googling the error, but to no avail. Please help to see where I am going wrong</p>
  
  <p>Here is the Log:</p>
  
  <pre><code>2019-07-06 19:32:37.149 21919-23194/com.avalonglobalresearch.creatives      D/skia: --- Failed to create image decoder with message 'unimplemented'
  2019-07-06 19:32:37.156 21919-23194/com.avalonglobalresearch.creatives    I/chatty: uid=10160(com.avalonglobalresearch.creatives) glide-source-th identical 6 lines
  2019-07-06 19:32:37.157 21919-23194/com.avalonglobalresearch.creatives D/skia: --- Failed to create image decoder with message 'unimplemented'
  2019-07-06 19:32:37.186 21919-21919/com.avalonglobalresearch.creatives W/Glide: Load failed for gs://creatives-4ebde.appspot.com/ with size [406x378]
  class com.bumptech.glide.load.engine.GlideException: Failed to load resource
  There were 4 causes:
  java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
  java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
  java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
  java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
   call GlideException#logRootCauses(String) for more detail
    Cause (1 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{DirectByteBuffer-&gt;Object-&gt;Drawable}, DATA_DISK_CACHE, com.firebase.ui.storage.images.FirebaseImageLoader$FirebaseStorageKey@bf00ba2
      Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer-&gt;GifDrawable-&gt;Drawable}
      Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer-&gt;Bitmap-&gt;Drawable}
      Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer-&gt;BitmapDrawable-&gt;Drawable}
    Cause (2 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{FileInputStream-&gt;Object-&gt;Drawable}, DATA_DISK_CACHE, com.firebase.ui.storage.images.FirebaseImageLoader$FirebaseStorageKey@bf00ba2
      Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream-&gt;GifDrawable-&gt;Drawable}
      Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream-&gt;Bitmap-&gt;Drawable}
      Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream-&gt;BitmapDrawable-&gt;Drawable}
    Cause (3 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{ParcelFileDescriptor-&gt;Object-&gt;Drawable}, DATA_DISK_CACHE, com.firebase.ui.storage.images.FirebaseImageLoader$FirebaseStorageKey@bf00ba2
  There were 2 causes:
  java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
  java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
   call GlideException#logRootCauses(String) for more detail
      Cause (1 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ParcelFileDescriptor-&gt;Bitmap-&gt;Drawable}
  There was 1 cause:
  java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
   call GlideException#logRootCauses(String) for more detail
        Cause (1 of 1): class java.io.IOException: java.lang.RuntimeException: setDataSource failed: status = 0x80000000
      Cause (2 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ParcelFileDescriptor-&gt;BitmapDrawable-&gt;Drawable}
  There was 1 cause:
  java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
   call GlideException#logRootCauses(String) for more detail
        Cause (1 of 1): class java.io.IOException: java.lang.RuntimeException: setDataSource failed: status = 0x80000000
    Cause (4 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{DirectByteBuffer-&gt;Object-&gt;Drawable}, REMOTE, com.firebase.ui.storage.images.FirebaseImageLoader$FirebaseStorageKey@bf00ba2
      Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer-&gt;GifDrawable-&gt;Drawable}
      Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer-&gt;Bitmap-&gt;Drawable}
      Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer-&gt;BitmapDrawable-&gt;Drawable}
    Cause (5 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{FileInputStream-&gt;Object-&gt;Drawable}, REMOTE, com.firebase.ui.storage.images.FirebaseImageLoader$FirebaseStorageKey@bf00ba2
   2019-07-06 19:32:37.187 21919-21919/com.avalonglobalresearch.creatives W/Glide:    Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream-&gt;GifDrawable-&gt;Drawable}
      Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream-&gt;Bitmap-&gt;Drawable}
      Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream-&gt;BitmapDrawable-&gt;Drawable}
    Cause (6 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{ParcelFileDescriptor-&gt;Object-&gt;Drawable}, REMOTE, com.firebase.ui.storage.images.FirebaseImageLoader$FirebaseStorageKey@bf00ba2
  There were 2 causes:
  java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
  java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
   call GlideException#logRootCauses(String) for more detail
      Cause (1 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ParcelFileDescriptor-&gt;Bitmap-&gt;Drawable}
  There was 1 cause:
  java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
   call GlideException#logRootCauses(String) for more detail
        Cause (1 of 1): class java.io.IOException: java.lang.RuntimeException: setDataSource failed: status = 0x80000000
      Cause (2 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ParcelFileDescriptor-&gt;BitmapDrawable-&gt;Drawable}
  There was 1 cause:
  java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
   call GlideException#logRootCauses(String) for more detail
        Cause (1 of 1): class java.io.IOException: java.lang.RuntimeException: setDataSource failed: status = 0x80000000
  2019-07-06 19:32:37.190 21919-21919/com.avalonglobalresearch.creatives I/Glide: Root cause (1 of 4)
  java.io.IOException: java.lang.RuntimeException: setDataSource failed: status = 0x80000000
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>databaseReference = FirebaseDatabase.getInstance().getReference();
  storageReference = FirebaseStorage.getInstance().getReference();
  
  databaseReference.child("users").child(user.getUid()).addValueEventListener(new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot dataSnapshot){
              name2 = (String) dataSnapshot.child("name").getValue();
              bio2 = (String) dataSnapshot.child("bio").getValue();
  
              //imageUri = (URL) dataSnapshot.child("profilePic").getValue();
              String gender = (String) dataSnapshot.child("gender").getValue();
              String email = (String) dataSnapshot.child("email").getValue();
  
              Log.d("TAG", "Name: " +name2);
              Log.d("TAG", "Email: " +email);
              Log.d("TAG", "Gender: " +gender);
              Log.d("TAG" , "Profile Pic URI = "+imageUri);
              nameTextView.setText(name2);
              bioTextView.setText(bio2);
              String uid = user.getUid();
              Log.d("TAG" , "UID = " +uid);
              storageReference.child("ProfilePictures").child(uid+".jpg");
              GlideApp.with(getActivity()).load(storageReference).into(test);
  
              /*storageReference.child("ProfilePictures").child(uid+".jpg").getDownloadUrl().addOnSuccessListener(new OnSuccessListener&lt;Uri&gt;() {
                  @Override
                  public void onSuccess(Uri uri) {
                      // Got the download URL for 'users/me/profile.png'
                      Log.d("TAG" , "URI = "+uri);
  
                      GlideApp.with(getActivity()).load(storageReference).into(profilepic);
                      //GlideApp.with(getActivity()).load(storageReference).into(test);
                      //profilepic.setImageURI(uri);
                  }
              }).addOnFailureListener(new OnFailureListener() {
                  @Override
                  public void onFailure(@NonNull Exception exception) {
                      // Handle any errors
                      Toast.makeText(getActivity(), "Error getting Profile Picture", Toast.LENGTH_LONG).show();
                  }
              });*/
          }
  </code></pre>
  
  <p>I have implemented the Firebase UI dependency.</p>
  
  <p>PS: the commented code is the 2nd method that I mentioned above.</p>