Hi,
We are running into issues with the React Native NCW SDK on Android.
This is the relevant code extracted from our project:
const passphrase = await gdriveRecover({
token: accessToken,
passphraseId: googleDrivePassphrase.uuid
});
if (!passphrase) {
throw new Error('No passphrase found for the given ID.');
}
// Callback function that returns the passphrase
const passphraseResolver = async (passphraseId: string): Promise<string> => {
console.log('Passphrase callback was called with ID:', passphraseId);
return passphrase;
};
const result = sdk.recoverKeys(passphraseResolver);
console.log('Recover keys result:', result);
Recovery is running perfectly on iOS with the exact same code, but on Android it throws the following error:
(NOBRIDGE) DEBUG gdrive getting file... 1MleRNe7TubdXNl05UhJP6j63ADRSwBsZsbfBzDT3v9hvdx7ljQ
(NOBRIDGE) DEBUG outgoingMessage called! {"deviceId": "aaa03fd4-4460-4dec-9046-7cc3b2e173de", "opId": 36}
(NOBRIDGE) LOG baseUrl https://fireblocks-testnet.services.rehive.com/api/ncw
(NOBRIDGE) LOG path api/devices/aaa03fd4-4460-4dec-9046-7cc3b2e173de/rpc
(NOBRIDGE) LOG body {"message": "{\"headers\":{\"physicalDeviceId\":\"8468ee93-5a22-42ce-a774-e9aac8803f09\",\"platformType\":\"Android\",\"sdkVersion\":\"2.9.1.173\",\"mpcVersion\":\"6\"},\"method\":\"get_backup\",\"params\":[]}"}
(NOBRIDGE) ERROR outgoingMessage error [Error: No callback found for operation 36]
(NOBRIDGE) WARN Possible Unhandled Promise Rejection (id: 0):
Error: No callback found for operation 36
(NOBRIDGE) DEBUG sdk_event called! {"keyDescriptor": {"algorithm": "null", "keyId": null, "keyStatus": "ERROR"}, "type": "keys_recovery"}
(NOBRIDGE) LOG Recover keys result: undefined
This is when running in the Android Simulator: Pixel 9 API 35. See screen recording below:
On the older Pixel 3 API 33 simulator and some physical android, we get similar callback errors even for the backup flow (not only recovery). Both backup and recovery run fine with the same code on iOS.
This is with
dependencies {
implementation "com.fireblocks.sdk:ncw:2.9.1"
...
}