Hello I can not find out what the problem is with this error, this is the code snippet that I use:
if (task.isSuccessful()) {
FriendlyMessage friendlyMessage =
new FriendlyMessage(null, mUsername,
mPhotoUrl,
task.getResult().getDownloadUrl()
.toString(),
user.getData().getID(), Calendar.getInstance().getTimeInMillis());
mFirebaseDatabaseReference.child
(THREAD_CHILD).child(path).child(MESSAGE_CHILD).child(key)
.setValue(friendlyMessage);
} else {
Log.w(TAG, "Image upload task was not successful.",
task.getException());
}