Getting MPC signing failed from ios app

This is my txid - cb9c0205-f6e0-47c5-97ab-3b1482da5562

I am signing it using my mpc keys from ios app but its giving me , can you plz let me know the error

MPC signing failed

An internal Fireblocks error caused the MPC signing process to fail.

Hi @tan I notice that you are initiating this contract call from the NCW_SIGNER user. Can you try initiating it from the NCW_ADMIN instead?

I am using the same endpoint to sign the tx from the webapp using the NCW_SIGNER only , then why this NCW_ADMIN is required ?

This txId - cebf6adb-2af4-48d2-8aa0-85a00342421d already went through with the same NCW_SIGNER

I tried doing tx using NCW_ADMIN , nope doesnt work gives

data: { message: 'Unauthorized: Token was not accepted.', code: -7 }

Request failed with status code 401

@tan can you verify that the ‘{{baseUrl}}’ is sandbox-api.fireblocks.io/v2 and that you are using the right credentials (secret key) for the API user? That is the most likely cause for the Unauthorized: Token was not accepted error.

Coming back to the original txid you shared, it appears that the signing was cancelled or aborted. Would you be able to share the logs from the iOS app that you had running?

I am using the fireblocks sdk and it generating the path like this when calling

 baseURL: 'https://sandbox-api.fireblocks.io/',
 method: 'post',
 url: '/v1/transactions',

there’s no https://sandbox-api.fireblocks.io/v2 , is v2 required here ? cause i have been using the v1 only for doing all of my tx already .

Also yes the api secret is correct cause using the same sdk instance with other call which are working but this call just gives not authorized

Will send the ios sdk logs …

The first issue is the main issue on why fireblocks is giving the MPC sign failed , can you check internal logs on what exactly is the error there ?

apologies for the confusion, /v1 is fine.
I’ve checked the internal logs and it looks like the signing process was cancelled by the end user or the backend.

{
  "headers": {
    "platformType": "iOS",
    "sdkVersion": "2.7.0",
    "physicalDeviceId": "90147623-2bae-4a7f-a249-8655fda5bc80",
    "mpcVersion": "6"
  },
  "params": [
    {
      "code": 502,
      "message": "Failed to sign transaction",
      "stacktraces": [],
      "logs": [
        {
          "level": "INFO",
          "message": "broadcast_mpc_msg",
          "isoTimestamp": "2024-08-21T07:21:37.967Z"
        },
        {
          "isoTimestamp": "2024-08-21T07:21:37.962Z",
          "level": "INFO",
          "message": "Did send event: txId: 1c735396-2395-432c-98d1-87960660bd42, status: TIMEOUT. Error: ). - runningMethod: SIGN_TRANSACTION"
        },
        {
          "isoTimestamp": "2024-08-21T07:21:37.960Z",
          "message": "Reset timeout callback:MPC_START_SIGNING",
          "level": "INFO"
        },
        {
          "message": "mpcWrapper did destroy",
          "level": "INFO",
          "isoTimestamp": "2024-08-21T07:21:37.954Z"
        },
        {
          "level": "INFO",
          "isoTimestamp": "2024-08-21T07:21:37.953Z",
          "message": "In failedTx"
        },
        {
          "isoTimestamp": "2024-08-21T07:21:37.952Z",
          "level": "INFO",
          "message": "Calling finishSignTx with noFirstMessage from timer"
        },
        {
          "isoTimestamp": "2024-08-21T07:18:39.668Z",
          "message": "MEASURE - poll_mpc_msg 1716.4469957351685",
          "level": "INFO"
        },
        {
          "message": "Polling stopped successfully",
          "level": "INFO",
          "isoTimestamp": "2024-08-21T07:18:39.563Z"
        },
        {
          "isoTimestamp": "2024-08-21T07:18:39.562Z",
          "message": "Flow Completed: ONBOARDING_REPO",
          "level": "INFO"
        },
        {
          "message": "Step Succeeded: GET_SERVICE_CERTIFICATE",
          "level": "INFO",
          "isoTimestamp": "2024-08-21T07:18:39.562Z"
        },
        {
          "level": "INFO",
          "isoTimestamp": "2024-08-21T07:18:39.560Z",
          "message": "Step Succeeded: CLEAR_MPC_SETUP"
        },
        {
          "level": "INFO",
          "isoTimestamp": "2024-08-21T07:18:39.560Z",
          "message": "Step Succeeded: GET_SERVICE_CERTIFICATE"
        },
        {
          "isoTimestamp": "2024-08-21T07:18:39.558Z",
          "message": "Step Succeeded: GET_SERVICE_CERTIFICATE",
          "level": "INFO"
        },
        {
          "message": "Step Succeeded: SEND_MPC_PUBLIC_KEYS",
          "level": "INFO",
          "isoTimestamp": "2024-08-21T07:18:39.556Z"
        },
        {
          "isoTimestamp": "2024-08-21T07:18:39.556Z",
          "message": "Step Succeeded: GET_SERVICE_CERTIFICATE",
          "level": "INFO"
        },
        {
          "isoTimestamp": "2024-08-21T07:18:39.554Z",
          "message": "Step Succeeded: GET_SERVICE_CERTIFICATE",
          "level": "INFO"
        },
        {
          "isoTimestamp": "2024-08-21T07:18:39.552Z",
          "message": "Step Succeeded: CREATE_SIGNING_KEYS",
          "level": "INFO"
        },
        {
          "message": "Flow Completed: CREATE_SIGNATURE_KEYS_REPO",
          "level": "INFO",
          "isoTimestamp": "2024-08-21T07:18:39.552Z"
        },
        {
          "message": "Step Succeeded: START_MPC_SETUP",
          "level": "INFO",
          "isoTimestamp": "2024-08-21T07:18:39.551Z"
        },
        {
          "level": "INFO",
          "isoTimestamp": "2024-08-21T07:18:39.551Z",
          "message": "starting flow: CREATE_SIGNATURE_KEYS_REPO"
        },
        {
          "message": "Step Succeeded: GET_SERVICE_CERTIFICATE",
          "level": "INFO",
          "isoTimestamp": "2024-08-21T07:18:39.550Z"
        },
        {
          "message": "Step Succeeded: GET_SERVICE_CERTIFICATE",
          "isoTimestamp": "2024-08-21T07:18:39.549Z",
          "level": "INFO"
        },
        {
          "message": "Step Succeeded: REQUEST_MPC_SETUP",
          "isoTimestamp": "2024-08-21T07:18:39.547Z",
          "level": "INFO"
        },
        {
          "message": "Step Succeeded: GET_SERVICE_CERTIFICATE",
          "isoTimestamp": "2024-08-21T07:18:39.546Z",
          "level": "INFO"
        },
        {
          "isoTimestamp": "2024-08-21T07:18:39.545Z",
          "message": "Step Succeeded: GET_SERVICE_CERTIFICATE",
          "level": "INFO"
        },
        {
          "message": "Step Succeeded: REGISTER",
          "level": "INFO",
          "isoTimestamp": "2024-08-21T07:18:39.543Z"
        },
        {
          "isoTimestamp": "2024-08-21T07:18:39.542Z",
          "message": "Flow Completed: AUTH_REPO",
          "level": "INFO"
        },
        {
          "isoTimestamp": "2024-08-21T07:18:39.542Z",
          "message": "Step Succeeded: AUTH_REPO_COMPLETION",
          "level": "INFO"
        },
        {
          "message": "Step Succeeded: HANDLE_MISSING_KEYS",
          "isoTimestamp": "2024-08-21T07:18:39.541Z",
          "level": "INFO"
        },
        {
          "message": "Step Succeeded: HANDLE_KEY_EXIST",
          "level": "INFO",
          "isoTimestamp": "2024-08-21T07:18:39.540Z"
        },
        {
          "level": "INFO",
          "message": "Did send event: keyId: 51ff7497-cb80-4edf-9828-d265848eaa6a, algorithm: MPC_ECDSA_SECP256K1, keyStatus: READY. Error: ). - runningMethod: SIGN_TRANSACTION",
          "isoTimestamp": "2024-08-21T07:18:39.539Z"
        },
        {
          "isoTimestamp": "2024-08-21T07:18:39.537Z",
          "message": "Step Succeeded: CONTAINS_KEYS_STEP",
          "level": "INFO"
        },
        {
          "message": "Step Succeeded: HANDLE_MISSING_PUBLIC_KEYS",
          "level": "INFO",
          "isoTimestamp": "2024-08-21T07:18:39.533Z"
        },
        {
          "isoTimestamp": "2024-08-21T07:18:39.530Z",
          "message": "Step Succeeded: GET_ALL_KEYS",
          "level": "INFO"
        },
        {
          "message": "MEASURE - get_all_keys1597.527027130127",
          "isoTimestamp": "2024-08-21T07:18:39.525Z",
          "level": "INFO"
        },
        {
          "level": "INFO",
          "message": "poll_mpc_msg",
          "isoTimestamp": "2024-08-21T07:18:37.951Z"
        },
        {
          "isoTimestamp": "2024-08-21T07:18:37.949Z",
          "level": "INFO",
          "message": "Initializing pending messages listener to txId: 1c735396-2395-432c-98d1-87960660bd42"
        },
        {
          "isoTimestamp": "2024-08-21T07:18:37.949Z",
          "level": "INFO",
          "message": "secret_service.cpp - secret_service_status secret_service_init(store_data, load_data, delete_data) - "
        },
        {
          "level": "INFO",
          "isoTimestamp": "2024-08-21T07:18:37.948Z",
          "message": "Start signing tx:1c735396-2395-432c-98d1-87960660bd42"
        },
        {
          "message": "Did send event: txId: 1c735396-2395-432c-98d1-87960660bd42, status: PENDING. Error: ). - runningMethod: SIGN_TRANSACTION",
          "isoTimestamp": "2024-08-21T07:18:37.947Z",
          "level": "INFO"
        }
      ],
      "method": "SIGN_TRANSACTION",
      "metadata": {
        "iosVersion": "17.4",
        "onboardedRecovery": false,
        "uptime": "timeval(tv_sec: 1724072029, tv_usec: 859423)",
        "completedMPC": true,
        "timezone": "IST",
        "environment": "sandbox",
        "device": "arm64",
        "hasCMPKey": true,
        "deviceId": "7a69240b-9f69-4ff9-aceb-0a6ea4aa71d2"
      },
      "level": "ERROR",
      "type": "FailedToSignTransaction_SIGN_TRANSACTION"
    }
  ],
  "method": "report_event"
}

This is the error log for txid - 1c735396-2395-432c-98d1-87960660bd42 … giving same error

Hi @tan I see that you are using iOS SDK 2.7.0. There is a new release which addresses issue on signing transactions.

Can you download version 2.7.1 and try again?