ampproject / ampproject/amphtml

auto loading of extension not working properly on development build

Open
#39,422 1 comment 0 reactions 0 assignees View on GitHub
Component: amp-analytics P2: Soon Stale Type: Bug Type: DevX WG: stories
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

i am testing out /examples/amp-story/auto-analytics.html and it does not properly auto load the `amp-analytics` scripts. The `src` attribute on the script tag is empty. This issue does not occur for the production build so the issue is purely on the development build.

### Reproduction Steps

run `amp build && amp serve` open `/examples/amp-story/auto-analytics.html` . You will get this error on the console `[extensions] Waited over 16s to load extension amp-analytics.`

the script tag `src` attribute for the amp-analytics extension will be empty.

### Relevant Logs

_No response_

### Browser(s) Affected

_No response_

### OS(s) Affected

_No response_

### Device(s) Affected

_No response_

### AMP Version Affected

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with /examples/amp-story/auto-analytics.html and reproduce the issue using `amp build && amp serve`. Inspect how the development build generates the amp-analytics script tag and compare it with the production build, then verify that the script src is populated and the extension loads without the console timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.