3box / 3box-js

3Box JavaScript SDK: User identities, storage, messaging
MIT License
207 stars 65 forks source link

Unable to use Wallet Connect with Argent and 3box #700

Closed JasoonS closed 4 years ago

JasoonS commented 4 years ago

Describe the bug Argent is able to sign messages, but those messages seem to be returned to the browser in a bad format for ERC1271.

The exact error message:

Error: Link consent message must be signed before adding data, to link address to store HookedWalletSubprovider - validateMessage - message was not encoded as hex.:2:61872

To Reproduce Steps to reproduce the behavior:

  1. Login to 3box with WalletConnect and scan barcode with your argent app.
  2. Open browser console and sign the 3box messages from argent.

Full stack trace Add any other context about the problem here.

Uncaught (in promise) Error: Link consent message must be signed before adding data, to link address to store
    at t.<anonymous> (3box.js:1144)
    at c (runtime.js:45)
    at Generator._invoke (runtime.js:271)
    at Generator.E.forEach.e.<computed> [as throw] (runtime.js:97)
    at r (asyncToGenerator.js:3)
    at u (asyncToGenerator.js:29)
(anonymous)    @    3box.js:1144
c    @    runtime.js:45
(anonymous)    @    runtime.js:271
E.forEach.e.<computed>    @    runtime.js:97
r    @    asyncToGenerator.js:3
u    @    asyncToGenerator.js:29
Promise.then (async)        
r    @    asyncToGenerator.js:13
s    @    asyncToGenerator.js:25
(anonymous)    @    asyncToGenerator.js:32
(anonymous)    @    asyncToGenerator.js:21
(anonymous)    @    publicStore.js:76
(anonymous)    @    openBox.js:130
c    @    runtime.js:45
(anonymous)    @    runtime.js:271
E.forEach.e.<computed>    @    runtime.js:97
c    @    runtime.js:45
t    @    runtime.js:135
(anonymous)    @    runtime.js:145
Promise.then (async)        
t    @    runtime.js:144
(anonymous)    @    runtime.js:145
Promise.then (async)        
t    @    runtime.js:144
(anonymous)    @    runtime.js:145
Promise.then (async)        
t    @    runtime.js:144
(anonymous)    @    runtime.js:170
o    @    runtime.js:169
S._invoke    @    runtime.js:192
E.forEach.e.<computed>    @    runtime.js:97
e.async    @    runtime.js:216
(anonymous)    @    openBox.js:105
(anonymous)    @    3box.js:607
c    @    runtime.js:45
(anonymous)    @    runtime.js:271
E.forEach.e.<computed>    @    runtime.js:97
r    @    asyncToGenerator.js:3
s    @    asyncToGenerator.js:25
Promise.then (async)        
r    @    asyncToGenerator.js:13
s    @    asyncToGenerator.js:25
(anonymous)    @    asyncToGenerator.js:32
(anonymous)    @    asyncToGenerator.js:21
(anonymous)    @    3box.js:618
(anonymous)    @    openBox.js:105
c    @    runtime.js:45
(anonymous)    @    runtime.js:271
E.forEach.e.<computed>    @    runtime.js:97
c    @    runtime.js:45
t    @    runtime.js:135
(anonymous)    @    runtime.js:145
Promise.then (async)        
t    @    runtime.js:144
(anonymous)    @    runtime.js:145
Promise.then (async)        
t    @    runtime.js:144
(anonymous)    @    runtime.js:170
o    @    runtime.js:169
S._invoke    @    runtime.js:192
E.forEach.e.<computed>    @    runtime.js:97
e.async    @    runtime.js:216
(anonymous)    @    openBox.js:17
(anonymous)    @    index.js:8
(anonymous)    @    redux.js:475
(anonymous)    @    App.jsx:179
c    @    runtime.js:45
(anonymous)    @    runtime.js:271
E.forEach.e.<computed>    @    runtime.js:97
c    @    runtime.js:45
t    @    runtime.js:135
(anonymous)    @    runtime.js:145
Promise.then (async)        
t    @    runtime.js:144
(anonymous)    @    runtime.js:145
mattiaz9 commented 4 years ago

I have the same problem with Authereum

oed commented 4 years ago

We recently released a fix to the 3id-blockchain-utils library that should fix this. Can you confirm that this is no longer an issue with 3id-blockchain-utils@0.3.3?

mattiaz9 commented 4 years ago

Yes, I can confirm that it works. I managed to connect with 3box and update some profile information.