Catch ZK validation error in profile fetch.

This commit is contained in:
Greyson Parrelli
2025-09-18 11:36:00 -04:00
committed by Jeffrey Starke
parent 9c705f3a45
commit 49c5fead39

View File

@@ -9,6 +9,7 @@ import org.signal.core.util.Base64;
import org.signal.core.util.logging.Log;
import org.signal.libsignal.usernames.BaseUsernameException;
import org.signal.libsignal.usernames.Username;
import org.signal.libsignal.zkgroup.VerificationFailedException;
import org.signal.libsignal.zkgroup.profiles.ExpiringProfileKeyCredential;
import org.signal.libsignal.zkgroup.profiles.ProfileKey;
import org.thoughtcrime.securesms.badges.BadgeRepository;
@@ -117,8 +118,17 @@ public class RefreshOwnProfileJob extends BaseJob {
return;
}
Recipient self = Recipient.self();
ProfileAndCredential profileAndCredential = ProfileUtil.retrieveProfileSync(context, self, getRequestType(self), false);
Recipient self = Recipient.self();
ProfileAndCredential profileAndCredential;
try {
profileAndCredential = ProfileUtil.retrieveProfileSync(context, self, getRequestType(self), false);
} catch (IllegalStateException e) {
Log.w(TAG, "Unexpected exception result from profile fetch. Skipping.");
return;
}
SignalServiceProfile profile = profileAndCredential.getProfile();
if (Util.isEmpty(profile.getName()) &&