# Flow fcl verifyUserSignatures Error

**URL:** <https://forum.flow.com/t/flow-fcl-verifyusersignatures-error/2958>\
**Category:** Flow JavaScript SDK\
**Tags:** flow-sdk-js, access, fcl\
**Created:** [March 31, 2022, 7:40am UTC](https://forum.flow.com/t/flow-fcl-verifyusersignatures-error/2958 "2022-03-31T07:40:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![devgiri00082](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@devgiri00082](https://forum.flow.com/u/devgiri00082)\
**Post date:** [March 31, 2022, 7:40am UTC](https://forum.flow.com/t/flow-fcl-verifyusersignatures-error/2958/1 "2022-03-31T07:40:01Z")

</div>

I am trying to authenticate the owner of the account in the backend so I am using account\_proof. Before I tried using `'accessNode.api': 'access.mainnet.nodes.onflow.org:9000'` but it gave me this error

```auto
Error: Response closed without headers
...
...

```

so I found a workaround which was to use ` 'accessNode.api': 'https://access-mainnet-beta.onflow.org'` and it was working fine yesterday but now it is giving this error

```auto
Error: failed to execute the script on the execution node execution-0ca407c1da940952ebcc02283b60cd97c9a008e111a48ea6cf1ce8f36f1e0153@execution-004.mainnet16.nodes.onflow.org:3569=100: rpc error: code = InvalidArgument desc = failed to execute script: failed to execute script at block (10cdbef077586db57b2949cd02e34cd0c051c2b236be1d828ecc2d227b93b73f): [Error Code: 1101] cadence runtime error Execution failed:
error: invalid argument at index 0: decodeing argument failed: [Error Code: 1052] transaction arguments are invalid: (argument is not json decodable: failed to decode value: invalid JSON Cadence structure)
--> a781c6cb2e8dc91d9e2e4a60358d60b61ea9f7215acae192a32cfeaffe7028e9

```

How can I solve this?

BTW I am using this method to verify the account [Proving Ownership of a Flow Account - Flow Documentation](https://docs.onflow.org/fcl/reference/proving-authentication/)

---

<div class="post-metadata">

**Author:** ![NasirAliShah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/nasiralishah/32/519_2.png) [@NasirAliShah](https://forum.flow.com/u/NasirAliShah)\
**Post date:** [April 1, 2022, 2:21pm UTC](https://forum.flow.com/t/flow-fcl-verifyusersignatures-error/2958/2 "2022-04-01T14:21:56Z")

</div>

You can check for this.

```auto
"accessNode.api", "https://flow-access-mainnet.portto.io"

```

---

<div class="post-metadata">

**Author:** ![devgiri00082](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@devgiri00082](https://forum.flow.com/u/devgiri00082)\
**Post date:** [April 3, 2022, 1:24pm UTC](https://forum.flow.com/t/flow-fcl-verifyusersignatures-error/2958/3 "2022-04-03T13:24:18Z")

</div>

> [@NasirAliShah](#):
>
> `https://flow-access-mainnet.portto.io`

Hey thank you for the comment I used your solution and found a very weird error

```
 ` let data = blocto.services[5]?.data;
    const address = data?.address;
    const timestamp = data?.timestamp;
    const Message =await WalletUtils.encodeMessageForProvableAuthnVerifying(
      address, // Address of the user authenticating
      timestamp, // Timestamp associated with the authentication
    )
    const CompositeSignatures = await fcl.currentUser().signUserMessage(Message);
    const isValid = await fcl.verifyUserSignatures(Message, CompositeSignatures);
    console.log(isValid);
    const CompositeSignatures2=data.signatures;
    const isValid2 = await fcl.verifyUserSignatures(
      Message,
      CompositeSignatures2
  )
  console.log(isValid2);`

```

What is the difference between `isValid` and `isValid2`. `isValid` works perfectly fine but `isValid2` throws an `SyntaxError: Unexpected end of JSON input` error. Please help I have been trying to solve the issue for hours but getting no where. Also I console logged the `compositeSignatures` and `compositeSignatures2` and these are the results

```
compositeSignatures: [
{
0:
addr: "0xca5b85f57d71f86d"
f_type: "CompositeSignature"
f_vsn: "1.0.0"
keyId: 1
signature: "4bf89cc644f13cebc339d2ccc31c554c0511d2bc8dd40ec56aad3126717e79000845f81844fcffea11b5096c91e802918d221e557b37808fc2539896b6b7a38b"
[[Prototype]]: Object
length: 1
[[Prototype]]: Array(0)
}
]
compositeSignatures2:[
{ 0:
addr: "ca5b85f57d71f86d"
f_type: "CompositeSignature"
f_vsn: "1.0.0"
keyId: 1
signature: "218920f58af615f69c9fef668d23a076073e943fdfa987bb63220dcc7fd8435f33dc0ce4853c36ac96a4ab10188db211808479b2461ec44b0d3a1d34ac052eb4"
[[Prototype]]: Object
length: 1
[[Prototype]]: Array(0)}
]

```

---

<div class="post-metadata">

**Author:** ![NasirAliShah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/nasiralishah/32/519_2.png) [@NasirAliShah](https://forum.flow.com/u/NasirAliShah)\
**Post date:** [April 3, 2022, 2:41pm UTC](https://forum.flow.com/t/flow-fcl-verifyusersignatures-error/2958/4 "2022-04-03T14:41:12Z")

</div>

As for my understanding, at first in flow isValid2 was used but after the upgrade, right me if I am wrong, I think so now isValid2 may be deprecated therefore it is giving a strange error. you can also check this post  
[http://forum.flow.com/t/is-it-possible-to-do-an-ecrecover-of-an-ethereum-address-in-a-cadence-contract/684](http://forum.flow.com/t/is-it-possible-to-do-an-ecrecover-of-an-ethereum-address-in-a-cadence-contract/684)

[http://forum.flow.com/t/deploying-contracts-and-signing-transaction-from-node/657](http://forum.flow.com/t/deploying-contracts-and-signing-transaction-from-node/657)
