Anchor Desktop not signing the transaction

First, I have to say Anchor wallet is awesome, packed with features and easy to use. Greymass is doing a fantastic job developing this tool.

I am having trouble integrating Anchor wallet for signing transactions. I currently use UAL libraries, supporting multiple wallets. Login works across the board, however, when I try to use Anchor to sign any transaction, I get the popup with count down timer saying “Please open Anchor app on chnor Desktop to review and sign the transaction.”. However, when I switch to Anchor desktop, I don’t see any prompt to sign transaction. The same code works with Scatter wallet.
Screen Shot 2020-10-08 at 11.09.31 AM

Here is my code snippet of how to trigger transaction signing, user is the authenticator object from UAL.
const transaction = {
actions: [{
account: ‘eosio.token’,
name: ‘transfer’,
authorization: [{
actor: user.accountName,
permission: ‘active’,
}],
data: {
from: user.accountName,
to: this.pool.account,
quantity: 1.0000 EOS,
memo: Test
}
}]
}
return user.signTransaction(transaction, {})

Anyone knows why Anchor wallet not prompting to sign the transaction?

Which version of Anchor are you using?

We have been in bug fixing mode, and if you’re not on the latest, that might be the cause. The most recent is 1.1.6, with 1.1.7 coming out soon with more fixes.

One other thing that it might be, which users have reported, is that occasionally the wallet loses connection and isn’t automatically reconnecting. If you are on the latest version, does restarting Anchor cause it to prompt?

I am using Version 1.1.6. I tried to reload or force to reload Anchor multiple times, it’s not helping.

Btw, I am seeing this console error,

Access to XMLHttpRequest at ‘https://cb.anchor.link/2de5e822-2582-42c7-b170-5089698f87bd’ from origin ‘http://localhost:8100’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

ERROR Error: Unable to reach link service (Network request failed)
at AnchorUser. (AnchorUser.js:46)
at Generator.throw ()
at rejected (AnchorUser.js:6)
at ZoneDelegate.invoke (zone-evergreen.js:364)
at Object.onInvoke (core.js:27437)
at ZoneDelegate.invoke (zone-evergreen.js:363)
at Zone.run (zone-evergreen.js:123)
at zone-evergreen.js:857
at ZoneDelegate.invokeTask (zone-evergreen.js:399)
at Object.onInvokeTask (core.js:27425)

Hrm, that’s interesting. The CORS headers are definitely set on that server and returning properly.

If you try our UAL demo, do you experience the same errors? I wonder if something between our server and you is manipulating the calls to cb.anchor.link and causing errors.

The demo can be found here:

https://greymass.github.io/ual-reactjs-renderer-demo-multipass/

I am getting the same exception on console. Again, login is fine, don’t see the prompt to sign test transaction.

Access to XMLHttpRequest at ‘https://cb.anchor.link/2de5e822-2582-42c7-b170-5089698f87bd’ from origin ‘https://greymass.github.io’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Alright - so it does have something to do with networking issues as opposed to something code related. I’m able to use that demo without issues. We’ll have to look into why that server cannot be reached properly.

In the mean time for your development purposes, when logging in, you can use the toggle right below the account selector in Anchor to turn off “Sessions”, and then it should prompt correctly by just using the local URI handlers.

A screenshot of the UI element I’m referring to during the login.

Great, thank you for the help!

1 Like

We deployed a small diagnostic tool to try and track down what’s going on.

https://greymass.github.io/anchor-link-diagnostics/

If you visit that page, do the few tests at the top of the page succeed? I’d be curious to know what’s failing there. The page should have all 3 passing currently: