Skip to content
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

cgw service http://localhost:8000/cgw/v1/chains/:chainId/safes/:safeAddress not working #141

Closed
hapetherw opened this issue May 30, 2024 · 17 comments

Comments

@hapetherw
Copy link

When i try to create a multi-sig wallet, it looks like the wallet address is already created but it loads forever in the indexing step.
Here are docker logs of CGW:

2024-05-31 02:38:33 {"build_number":"078d1d1","level":"info","message":{"chain_id":"555666","client_ip":"192.168.65.1","detail":null,"method":"GET","origin":null,"path":"/v1/chains/555666/safes/0x8921C682b1E51c69e78e3A9b4b31C75D9C586011","response_time_ms":3.363084999844432,"route":"/v1/chains/:chainId/safes/:safeAddress","safe_app_user_agent":null,"status_code":404},"request_id":"54e8416c-28fb-4d9d-938e-8bbcb7073e29","timestamp":"2024-05-30T18:38:33.255Z","version":"v1.42.0"}
2024-05-31 02:38:33 {"build_number":"078d1d1","level":"info","message":{"chain_id":"555666","client_ip":"192.168.65.1","detail":null,"method":"GET","origin":null,"path":"/v1/chains/555666/safe-apps?client_url=http%3A%2F%2Flocalhost%3A8000","response_time_ms":4.151572999544442,"route":"/v1/chains/:chainId/safe-apps","safe_app_user_agent":null,"status_code":200},"request_id":"ce0d9fe8-48a2-4a65-bc89-d31f177d4b50","timestamp":"2024-05-30T18:38:33.278Z","version":"v1.42.0"}
2024-05-31 02:38:48 {"build_number":"078d1d1","level":"info","message":{"chain_id":"555666","client_ip":"192.168.65.1","detail":"An error occurred","method":"GET","origin":null,"path":"/v1/chains/555666/safes/0x8921C682b1E51c69e78e3A9b4b31C75D9C586011","response_time_ms":12.31921200081706,"route":"/v1/chains/:chainId/safes/:safeAddress","safe_app_user_agent":null,"status_code":404},"request_id":"4f6ef574-6cb1-46d3-b557-e86e074a7c17","timestamp":"2024-05-30T18:38:48.269Z","version":"v1.42.0"}
2024-05-31 02:38:48 {"build_number":"078d1d1","level":"info","message":{"chain_id":"555666","client_ip":"192.168.65.1","detail":null,"method":"GET","origin":null,"path":"/v1/chains/555666/safes/0x8921C682b1E51c69e78e3A9b4b31C75D9C586011","response_time_ms":13.051281999796629,"route":"/v1/chains/:chainId/safes/:safeAddress","safe_app_user_agent":null,"status_code":404},"request_id":"4f6ef574-6cb1-46d3-b557-e86e074a7c17","timestamp":"2024-05-30T18:38:48.270Z","version":"v1.42.0"}
2024-05-31 02:38:48 {"build_number":"078d1d1","level":"info","message":{"chain_id":"555666","client_ip":"192.168.65.1","detail":null,"method":"GET","origin":null,"path":"/v1/chains/555666/safe-apps?client_url=http%3A%2F%2Flocalhost%3A8000","response_time_ms":1.0780199998989701,"route":"/v1/chains/:chainId/safe-apps","safe_app_user_agent":null,"status_code":200},"request_id":"18ec22c4-feda-4337-9e65-b6e237bb76b1","timestamp":"2024-05-30T18:38:48.286Z","version":"v1.42.0"}

I have attached one screen-shot.
image
Here's my chainInfo:

{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "chainId": "555666",
      "chainName": "EclipseChain Testnet",
      "shortName": "EclipseChain Testnet",
      "description": "",
      "chainLogoUri": "http://localhost:8000/cfg/media/chains/555666/chain_logo_16hZikh.png",
      "l2": true,
      "isTestnet": true,
      "rpcUri": {
        "authentication": "NO_AUTHENTICATION",
        "value": "https://subnets.avax.network/eclipsecha/testnet/rpc"
      },
      "safeAppsRpcUri": {
        "authentication": "NO_AUTHENTICATION",
        "value": "https://subnets.avax.network/eclipsecha/testnet/rpc"
      },
      "publicRpcUri": {
        "authentication": "NO_AUTHENTICATION",
        "value": "https://subnets.avax.network/eclipsecha/testnet/rpc"
      },
      "blockExplorerUriTemplate": {
        "address": "https://subnets-test.avax.network/eclipsecha/address/{{address}}",
        "txHash": "https://subnets-test.avax.network/eclipsecha/tx/{{txHash}}",
        "api": "https://subnets-test.avax.network/eclipsecha/api?module={{module}}&action={{action}}&address={{address}}&apiKey={{apiKey}}"
      },
      "nativeCurrency": {
        "name": "EclipseChain Token",
        "symbol": "ECLPS",
        "decimals": 18,
        "logoUri": "http://localhost:8000/cfg/media/chains/555666/currency_logo_3No25Fo.png"
      },
      "pricesProvider": {
        "nativeCoin": null,
        "chainName": null
      },
      "transactionService": "http://nginx:8000/txs",
      "vpcTransactionService": "http://nginx:8000/txs",
      "theme": {
        "textColor": "#ffffff",
        "backgroundColor": "#000000"
      },
      "gasPrice": [],
      "ensRegistryAddress": null,
      "recommendedMasterCopyVersion": "1.3.0",
      "disabledWallets": [],
      "features": [
        "CONTRACT_INTERACTION",
        "DOMAIN_LOOKUP",
        "ERC1155",
        "ERC721",
        "SAFE_APPS",
        "SPENDING_LIMIT"
      ]
    }
  ]
}

Could you tell me what's wrong with my side.
Please let me know if you need more info.
Thank you.

@hapetherw
Copy link
Author

Hello, is there any update for me?

@gabmontes
Copy link

@happyleow dealing with the same issue here. Did you find a solution?

@hapetherw
Copy link
Author

@gabmontes I am still trying to find the root cause by communicating with them on StackExchange.
It takes more time than I expected.

@hapetherw
Copy link
Author

@gabmontes I finally solved it myself, you can check this post it would be helpful.
https://ethereum.stackexchange.com/questions/164001/cannot-create-a-new-safe-account-using-safe-infrastructure/164118#164118

@gabmontes
Copy link

gabmontes commented Jun 12, 2024

@happyleow awesome. Picking the right short name fixed the problem for mee too. Thanks!!!

@hapetherw
Copy link
Author

@gabmontes May i ask if you added the chain logo image correctly? i added it but it's not working in the Safe UI.
image

@gabmontes
Copy link

gabmontes commented Jun 27, 2024

@happyleow I'm debugging the same problem.

Perhaps we should open a new issue and move the discussion there.

@gabmontes
Copy link

@happyleow this is an interesting discussion about that problem: #109

In addition, when running locally the logos are stored inside the Docker container. Therefore the files will disappear after a restart unless the local folder is mapped to a volume similar to this:

  cfg-web:
    volumes:
      - nginx-shared-cfg:/nginx
      - ./data/media:/app/src/media

Still working on the issue.

@hapetherw
Copy link
Author

@gabmontes I'm not sure, i added your info in the docker compose file but it's still not displaying on the UI.

@gabmontes
Copy link

That's ok. There is one more problem I did not solve yet. Read #109 for background. It has to do with MEDIA_URL not working properly when running the services through docker-compose.

@hapetherw
Copy link
Author

@gabmontes I encountered one problem, i tried to deploy it on Ubuntu 22.04(hosting server) using docker compose, but several docker containers are not running so I couldn't operate it.
It's working on my MacOS without any issues.
Here's some logs of one sub docker container(nginx-alpine):

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2024/06/29 06:28:10 [emerg] 1#1: host not found in upstream "cgw-web:3000" in /etc/nginx/nginx.conf:47
nginx: [emerg] host not found in upstream "cgw-web:3000" in /etc/nginx/nginx.conf:47

Have you ever seen this issue? am trying to solve it...

@gabmontes
Copy link

@happyleow no, I didn't see that issue before.

By the way, this is the first iteration of the solution we develop for the logos: hemilabs#1

@hapetherw
Copy link
Author

hapetherw commented Jul 3, 2024

@happyleow no, I didn't see that issue before.

It's weird, did you deploy it on Ubuntu OS?
I also tried to deploy it on 2 other PCs that Ubuntu OS installed, but they both failed with the same issue.

@jerry-nerd
Copy link

jerry-nerd commented Aug 7, 2024

@happyleow @gabmontes
I have the same cgw issue. But my issue not fixed, I have confirmed the shortname is right, and also the mastercopies and proxy factories. In fact, I am testing the sepolia testnet.

Can you tell me which version of the docker images you are using ? The following is mine:

CFG_VERSION=v2.83.0
CGW_VERSION=v1.52.0
TXS_VERSION=v5.7.0
UI_VERSION=v1.40.1
EVENTS_VERSION=v0.12.0

@hapetherw
Copy link
Author

@jerry-nerd
I replaced localhost:8000, nginx:8000 urls with my ip(or domain) address across all env files, and that's finally resolved on VPS.
It was not about version issue.

@bob-fly
Copy link

bob-fly commented Aug 14, 2024

Is there any progress on this issue? I have met the same problem.

@jerry-nerd
Copy link

@jerry-nerd I replaced localhost:8000, nginx:8000 urls with my ip(or domain) address across all env files, and that's finally resolved on VPS. It was not about version issue.

Ok, thanks, I have both localhost:8000 and domain on linux server, now the domain one with my testnet is ok for "txs/api/v1/safes/{address} " request after I add master-copy contract and proxy-factory contracts on txs-service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants