Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
463 views
in Technique[技术] by (71.8m points)

android - FirebaseStorage returning unknown error when requesting image

I am trying to pull in an image I have added to my firebase storage on an Android device. Every time this runs I get this error from the onFailureListener()

E/StorageException(9646): An unknown error occurred, please check the HTTP result code and inner exception for server response. E/StorageException(9646): Code: -13000 HttpResult: 0

I have also changed the permissions on storage to have read/write for the time being to make sure that isn't the problem.

final ImageView test = (ImageView) findViewById(R.id.test_image);
StorageReference ref = storage.getReferenceFromUrl("gs://my-project.appspot.com/test_image.png");
    ref.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
        @Override
        public void onSuccess(Uri uri) {
            Log.d(TAG, "Successfully loaded uri");
            test.setImageURI(uri);
        }
    }).addOnFailureListener(new OnFailureListener() {
        @Override
        public void onFailure(@NonNull Exception e) {
            Log.d(TAG, "Failed loaded uri: " + e.getMessage());
        }
    });
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...