-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue in connecting switchboard-dapp (running on localhost), with IAM-cache-server/ssi-hub (also running on localhost) #631
Comments
Hi @syedmuhammaddanish and apologize for late response I couldn't reproduce this error. Could you please share details of failed request? |
Hi @JGiter , Thank you for your reply. So basically, the cache-server is running on http://localhost:3000/v1 on my local machine. Similarly, the switchboard application is up on http://localhost:4200. I have changed the environment file (switchboard-dapp\src\environments\environment.ts) by defining cache-server address as localhost. Now when I try to use switchboard-dapp, and try to login using Metamask, its fine. And you can see the output of cache-server logs below (they show switchboard-dapp is actually communicating with localhost cache-server) But when I try to click on enrollments or assets, this is what happens in console. I am not sure if I am missing something. Can you please answer these questions for me?
Your help is highly appreciated and thank you for your time. |
@syedmuhammaddanish To use your own contracts you can override chain configuration in
I tried to reproduce error with the same configuration as you are using. The only possible incorrect value in your config is natsServerUrl, which should be the same as in docker-compose.yml in cache-server (http://localhost:9222 by default). But this is unlikely relates to your issue It is strange that requests to did controller are allowed and to claim controller are not while all controllers are protected with the same authentication guard. Could you please share |
So here is the payload being sent in the login message, which was actually approved at the start.
While requesting http://localhost:3000/v1/claim/issuer/roles/allowed/did:ethr:volta:0xc207..., This is what i found in console.
Also, I have changed the cooker.service.ts file in ssi-hub code as per this
|
@syedmuhammaddanish Are there any cookies sent with request to |
@JGiter , I tried to look into the payload and no cookies are being sent to the server with the request. Infact with every request I am making on switchboard-dapp. Here is my .env file
|
I can see that claim request are sent to https://192..., instead of localhost. Perhaps the cache server url in environment.ts has somehow been changed. Also which domain cookies belongs to? |
This 192.... ip address belongs to my windows machine and the cache-server is being run on linux VM with its own local host. I am communicating with linux VM from my windows pc through this IP address. |
Hi,
So basically, I have run the ssi-hub server and switchboard-dapp on the localhost on their respective ports. Now, I am trying to connect the switchboard dapp with the cache server. I am editing the environment variables in switchboard-dapp code, as shown below.
It works, and I am able to connect the switchboard-dapp to the cache server hosted locally. I can even sign in using metamask. However, the problem comes when I try to see enrollment or try to register asset. It gives error as shown below.
Moreover, I can see the transactions on volta-explorer. It actually sends the transaction to the smart contract. But the asset is never registered. Also, I feel there is a problem with the smart contract addresses. In the env file, the asset manager smart contract address is 0xE258fA7D1cc8964D0dEB7204Df947bCa42b2c940, but in volta-explorer, the transaction is being sent to the address 0x84d0c7284A869213CB047595d34d6044d9a7E14A (I digged out and got to know its identity manager contract address defined in iam-client-lib code).
Am I doing something wrong, please have a look on this issue. Thank you
The text was updated successfully, but these errors were encountered: