ampproject / ampproject/amp-toolbox
Runtime version getting timeout
- Dominant language
- HTML
- Stars
- 459
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Description
my nextjs application using `optimizer` but last 24 hours getting runtime version timeout error, also this happen before 3-4 months ago maybe google cloud outages happen latelty.
so we need some fallback version for runtime-version
https://github.com/ampproject/amp-toolbox/blob/master/packages/runtime-version/lib/RuntimeVersion.js#L76-L86
update:
```sh
{ FetchError: request to https://cdn.ampproject.org/rtv/metadata failed, reason: connect ETIMEDOUT 216.58.206.193:443
at ClientRequest. (/usr/src/node_modules/node-fetch/lib/index.js:1455:11)
at ClientRequest.emit (events.js:198:13)
at TLSSocket.socketErrorListener (_http_client.js:392:9)
at TLSSocket.emit (events.js:198:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
message:
'request to https://cdn.ampproject.org/rtv/metadata failed, reason: connect ETIMEDOUT 216.58.206.193:443',
type: 'system',
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT' }
```
Contributor guide
Research direction
Start in packages/runtime-version/lib/RuntimeVersion.js at lines 76-86 and compare its behavior with the reported timeout from the CDN metadata endpoint. Determine the fallback behavior needed when that request times out; done means runtime-version remains usable during this failure without breaking normal metadata retrieval.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nextjs, node.js
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100