+
Skip to content

Event replay js-actions aren't working #1165

@osnoser1

Description

@osnoser1

Please provide the environment you discovered this bug in.

https://stackblitz.com/edit/github-zc67zw

Which area/package is the issue in?

Don't know / other

Description

In build time, Angular CLI is using this class https://github.com/angular/angular-cli/blob/main/packages/angular/build/src/utils/index-file/index-html-generator.ts#L82 inject a script (maybe other not related interesting things) to enable the event-replay actions, specifically here https://github.com/angular/angular-cli/blob/main/packages/angular/build/src/utils/index-file/add-event-dispatch-contract.ts#L14; without that script in runtime I get that exception.

As a workaround, I put in my HTML the js script:
image

Please provide the exception or error you saw

chunk-T5GBXR7Y.js?v=db991a5a:22766 Uncaught (in promise) 
TypeError: Cannot read properties of undefined (reading '_ejsa')
    at getJsactionData (chunk-T5GBXR7Y.js?v=db991a5a:22766:20)
    at chunk-T5GBXR7Y.js?v=db991a5a:22807:41


Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载