hirosystems / explorer

Explore transactions and accounts on the Stacks blockchain. Clone any contract and experiment in your browser with the Explorer sandbox.
https://explorer.hiro.so/
MIT License
140 stars 101 forks source link

Clarinet devnet: Stacks explorer fails with REDIS_URL is not defined #1698

Open radicleart opened 3 months ago

radicleart commented 3 months ago

Stacks Explorer Docker Container Failure

To Reproduce

  1. clarinet devnet start
  2. wait for containers to run (all go green)
  3. goto http://localhost:8000/?chain=testnet&api=http://localhost:3999
  4. "Something went wrong"

Expected behavior Stacks explorer to load. Note: it has been running fine on same machine - this error turned up between Mon 24th and Thur 27th June.

Screenshots

Screenshot 2024-06-27 at 10 45 05 Screenshot 2024-06-27 at 10 44 57

Environment (please complete the following information):

Additional context

docker logs -f stacks-explorer.bitcoin-dao.devnet

$ docker logs -f stacks-explorer.bitcoin-dao.devnet
   ▲ Next.js 14.1.4
   - Local:        http://8ae58ff959c1:3000
   - Network:      http://172.18.0.8:3000

 ✓ Ready in 129ms
[debug] REDIS_URL is not defined
[debug] token price - cache miss
[debug] REDIS_URL is not defined
TypeError: Failed to parse URL from
    at new Request (node:internal/deps/undici/undici:6110:19)
    at i (/app/node_modules/.pnpm/next@14.1.4_@babel+core@7.23.6_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:177204)
    ... 3 lines matching cause stack trace ...
    at async _ (/app/.next/server/chunks/87.js:102:45056) {
  [cause]: TypeError [ERR_INVALID_URL]: Invalid URL
      at new NodeError (node:internal/errors:405:5)
      at new URL (node:internal/url:676:13)
      at new Request (node:internal/deps/undici/undici:6108:25)
      at i (/app/node_modules/.pnpm/next@14.1.4_@babel+core@7.23.6_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:177204)
      at F (/app/.next/server/chunks/937.js:1:39749)
      at /app/.next/server/chunks/937.js:1:41898
      at async globalThis.fetch (/app/.next/server/chunks/937.js:1:36493)
      at async _ (/app/.next/server/chunks/87.js:102:45056) {
    input: '',
    code: 'ERR_INVALID_URL'
  }
}
[Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.] {
  digest: '3481489950'
}
[debug] REDIS_URL is not defined
[debug] token price - cache miss
[debug] REDIS_URL is not defined
TypeError: Failed to parse URL from
    at new Request (node:internal/deps/undici/undici:6110:19)
    at i (/app/node_modules/.pnpm/next@14.1.4_@babel+core@7.23.6_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:177204)
    ... 3 lines matching cause stack trace ...
    at async _ (/app/.next/server/chunks/87.js:102:45056) {
  [cause]: TypeError [ERR_INVALID_URL]: Invalid URL
      at new NodeError (node:internal/errors:405:5)
      at new URL (node:internal/url:676:13)
      at new Request (node:internal/deps/undici/undici:6108:25)
      at i (/app/node_modules/.pnpm/next@14.1.4_@babel+core@7.23.6_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:177204)
      at F (/app/.next/server/chunks/937.js:1:39749)
      at /app/.next/server/chunks/937.js:1:41898
      at async globalThis.fetch (/app/.next/server/chunks/937.js:1:36493)
      at async _ (/app/.next/server/chunks/87.js:102:45056) {
    input: '',
    code: 'ERR_INVALID_URL'
  }
}
[Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.] {
  digest: '3481489950'
}
radicleart commented 3 months ago

Just realised i can control the image pulled by clarinet.. building this now. stacks_explorer_image_url = "blockstack/explorer:pr-1692"

radicleart commented 3 months ago

This works.

settings/Devnet.toml

stacks_explorer_image_url = "hirosystems/explorer:1.185.3"

something broke since then?