title: Storage exception has occurred. Object does not exist at location. Firebase storage error
body: <p>I have tried all the solutions posted on StackOverflow but my problem is not discussed there so I am putting up this question. In my case, the image gets uploaded in the firebase storage bucket but a new record is not inserted in the firestore and this error occurs.
  My code:-</p>
  
  <pre><code>submit.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View v) {
          progressDialog.setMessage("Adding candidate........");
          progressDialog.show();
          final String fetch_name = name.getText().toString();
          final String fetch_age = age.getText().toString();
          final String fetch_number = number.getText().toString();
          final String fetch_area = area.getText().toString();
          try{image_path = storageReference.child(user_id+"."+getFileExtension(imageUri)).putFile(imageUri).addOnSuccessListener(new OnSuccessListener&lt;UploadTask.TaskSnapshot&gt;() {
              @Override
              public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
                  Handler handler = new Handler();
                  handler.postDelayed(new Runnable() {
                      @Override
                      public void run() {
                          storageReference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener&lt;Uri&gt;() {
                              @Override
                              public void onSuccess(Uri uri) {
                                  Log.i("Infor",uri.toString());
                                  String img = uri.toString();
                                  if(img!=null){
                                      storeData(img,fetch_name,fetch_age,fetch_number,fetch_area);
                                      Toast.makeText(add_candidate.this,"Added successfully",Toast.LENGTH_SHORT).show();
                                      progressDialog.dismiss();
                                  }
                                  else
                                      Toast.makeText(add_candidate.this,"Error ho gya bhaiya",Toast.LENGTH_SHORT).show();
                                  progressDialog.dismiss();
                              }
                          });
                      }
                  },1000);
              }
          });}
          catch(Exception e){Log.i("Infor",e.getMessage());
          e.printStackTrace();}
  
      }
  });
  </code></pre>
  
  <p>The store data function looks like:-</p>
  
  <pre><code>private void storeData(String downloadUri, String fetch_name, String fetch_age, String fetch_number, String fetch_area) {
      Map&lt;String,String&gt; candidateData = new HashMap&lt;&gt;();
      candidateData.put("name",fetch_name);
      candidateData.put("age",fetch_age);
      candidateData.put("number",fetch_number);
      candidateData.put("area",fetch_area);
      candidateData.put("Uri",downloadUri);
  
      firebaseFirestore.collection("Candidates").document(user_id).set(candidateData).addOnCompleteListener(new OnCompleteListener&lt;Void&gt;() {
          @Override
          public void onComplete(@NonNull Task&lt;Void&gt; task) {
              if(task.isSuccessful()){
                  progressDialog.dismiss();
                  Toast.makeText(add_candidate.this,"Completed",Toast.LENGTH_SHORT).show();
              }
              else{
                  Toast.makeText(add_candidate.this,task.getException().getMessage(),Toast.LENGTH_SHORT).show();
              }
          }
      });
  }
  </code></pre>
  
  <p>Error:-</p>
  
  <blockquote>
    <p>E/StorageException: StorageException has occurred. Object does not exist at location. - Android Studio Code : -13010 HttpResu1t: 404 </p>
  </blockquote>