explorer
explorer copied to clipboard
Every transaction on devnet is an internal server error
Describe the bug
When I run clarinet integrate and then use explorer.stacks.co to view devnet transactions, every transaction I click shows an Internal Server Error. An example URL is https://explorer.stacks.co/txid/0x50ea36cd9496a839aa396447a00b984d6ac2390c4e470da4eb269b4e9768b1b9?chain=testnet but of course the transaction IDs will depend on local state
To Reproduce Steps to reproduce the behavior:
- Run
clarinet new anything, or unzip: explorer-repro.zip - In that directory, run
clarinet integrate. Wait for it to start up - Visit explorer.stacks.co, change the Network dropdown to devnet (localhost:3999)
- Click the transactions tab. Click any transaction (a coinbase, default contract deploy, anything)
- You'll get an Internal Server Error
Expected behavior Explorer should display devnet transactions
Desktop (please complete the following information):
- OS: macOS
- Browser: Vivaldi
- Version: 5.2.2623.41 (Stable channel) (arm64)
Error appears to be server-side though!
Additional context This definitely used to work. My usual workflow has been using explorer in devnet as my localhost explorer, because the docker image used by clarinet for explorer hasn't been updated in 6 months and is quite buggy. I've opened a separate issue to see if there's an image clarinet can update to.
When running clarinet pointing at hirosystems/explorer:latest for the Explorer image, I get the following in docker logs when loading an explorer page for a transaction:
FetchError: request to http://localhost:3999/extended/v1/tx/0xf391789f53f183f479bf542a772fd7408e13e1e6d1dbc9541c3c3325894f334e?unanchored=true failed, reason: connect ECONNREFUSED 127.0.0.1:3999
at ClientRequest.<anonymous> (/node_modules/node-fetch/lib/index.js:1461:11)
at ClientRequest.emit (node:events:539:35)
at ClientRequest.emit (node:domain:475:12)
at Socket.socketErrorListener (node:_http_client:454:9)
at Socket.emit (node:events:527:28)
at Socket.emit (node:domain:475:12)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
type: 'system',
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED'
}
undefined
RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: undefined
at new NodeError (node:internal/errors:372:5)
at ServerResponse.writeHead (node:_http_server:275:11)
at ServerResponse.writeHead (/node_modules/next/dist/compiled/compression/index.js:1:155483)
at ServerResponse._implicitHeader (node:_http_server:266:8)
at ServerResponse.end (/node_modules/next/dist/compiled/compression/index.js:1:141485)
at Object.sendRenderResult (/node_modules/next/dist/server/send-payload.js:56:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
code: 'ERR_HTTP_INVALID_STATUS_CODE'
}
Using POSTMAN I can make a successful GET request to http://localhost:3999/extended/v1/tx/0xf391789f53f183f479bf542a772fd7408e13e1e6d1dbc9541c3c3325894f334e?unanchored=true
Using clarinet with the image hirosystems/explorer:1.19.1 works correctly, while hirosystems/explorer:1.19.2 is broken. So the local transactions were broken between these 2 tags.
If anyone else is trying to work around this, if you replace in settings/Devnet.toml the line stacks_explorer_image_url = "blockstack/explorer:latest" (may be commented) with stacks_explorer_image_url = "hirosystems/explorer:1.19.1" (make sure it's not commented) then you'll get the last working version.
This is much better than the blockstack/explorer default, and displays local transactions correctly.
This should be fixed, thanks!