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
289 views
in Technique[技术] by (71.8m points)

Android Firebase Firestore StorageException has occurred

Not able to store values in Firestore due to the error given below and also instead of taking the value of name.getText().toString() its taking null. help me with the same.

Error:

E/StorageException: StorageException has occurred. Object does not exist at location. Code: -13010 HttpResult: 404 E/StorageException: { "error": { "code": 404, "message": "Not Found. Could not get object", "status": "GET_OBJECT" }} java.io.IOException: { "error": { "code": 404, "message": "Not Found. Could not get object", "status": "GET_OBJECT" }} at com.google.firebase.storage.network.NetworkRequest.parseResponse(NetworkRequest.java:434)

CODE:

DocumentReference docReference = firestore.collection("users").document(userID);
Map<String,Object> user = new HashMap<>();
user.put("fName",name.getText().toString());
user.put("email",mail.getText().toString());
user.put("phone",firebaseAuth.getCurrentUser().getPhoneNumber());

docReference.set(user).addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {

    startActivity(new Intent(getApplicationContext(),HomeActivity.class));
    finish();

   }
    }).addOnFailureListener(new OnFailureListener() {
         @Override
       public void onFailure(@NonNull Exception e) {
              Log.d("LOG", "onFailure: Failed to Create User " + e.toString());
     }
     });
question from:https://stackoverflow.com/questions/66051015/android-firebase-firestore-storageexception-has-occurred

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
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

...