Hi Parse Community,
I am encountering an issue with the saveInBackground()
method in my Android client SDK. The method intermittently hangs and does not return any response from the server—neither success nor error—even after waiting for a significant amount of time.
Setup:
- I am using a self-hosted Parse Server.
- REST API calls to the server work fine during the same period when this issue occurs.
`
Issue Details:
- The workflow sometimes hangs indefinitely at the
saveInBackground()
step during the initial group save. - No error messages or responses are received from the Parse server.
- REST API calls made to the server during the same time work without any issues.
public void createGroup(
String groupName,
String groupDescription,
ParseFile parseFile,
ParseUser admin,
List<ParseUser> members,
GroupCallback callback
) {
Group group = new Group();
group.setGroupName(groupName);
group.setGroupDescription(groupDescription);
group.setAdmin(admin);
group.setGroupPicture(parseFile);
group.setCreatedDate(new java.util.Date());
// First save the group
group.saveInBackground(e -> {
if (e == null) {
// Group saved successfully, now add members
ParseRelation<ParseUser> memberRelation = group.getMembers();
for (ParseUser member : members) {
memberRelation.add(member);
}
// Save group again with members
group.saveInBackground(secondSaveError -> {
if (secondSaveError == null) {
// Group and members saved successfully
callback.onComplete(null, group);
} else {
// Error in saving members
callback.onComplete(secondSaveError, null);
}
});
} else {
// Pass the error back in the callback
callback.onComplete(e, null);
}
});
}
Request for Help:
- What could be causing the
saveInBackground()
method to hang in this manner? - How can I debug or resolve this issue effectively?
- Are there any specific configurations on the server or client side that I should check?
I appreciate any guidance or suggestions to help resolve this. Thanks in advance!