Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(icon): Error retrieving icon gk:bike! Cannot assign to read only property 'taskId' of object '[object Object]' #30256

Closed
1 task done
GeorgeKnap opened this issue Dec 31, 2024 · 0 comments
Labels
needs triage This issue needs to be triaged by the team

Comments

@GeorgeKnap
Copy link

GeorgeKnap commented Dec 31, 2024

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

18

Description

After migrating from material 18 to 19 I'm getting runtime error on all of my svg icons.

Error retrieving icon gk:bike! Cannot assign to read only property 'taskId' of object '[object Object]'
 at Object.error (icon.mjs:969:40)
    at ConsumerObserver2.error (Subscriber.js:100:25)
    at Subscriber2._error (Subscriber.js:63:24)
    at Subscriber2.error (Subscriber.js:40:12)
    at Subscriber2._error (Subscriber.js:63:24)
    at Subscriber2.error (Subscriber.js:40:12)
    at Subscriber2._error (Subscriber.js:63:24)
    at Subscriber2.error (Subscriber.js:40:12)
    at Subscriber2._error (Subscriber.js:63:24)
    at Subscriber2.error (Subscriber.js:40:12)
    at tap.js:28:18
    at OperatorSubscriber2._this._error (OperatorSubscriber.js:21:9)
    at Subscriber2.error (Subscriber.js:40:12)
    at Subject.js:66:29
    at errorContext (errorContext.js:23:5)
    at Subject2.error (Subject.js:59:5)
    at Object.error (share.js:63:18)
    at ConsumerObserver2.error (Subscriber.js:100:25)
    at Subscriber2._error (Subscriber.js:63:24)
    at Subscriber2.error (Subscriber.js:40:12)
    at Subscriber2._error (Subscriber.js:63:24)
    at Subscriber2.error (Subscriber.js:40:12)
    at Subscriber2._error (Subscriber.js:63:24)
    at Subscriber2.error (Subscriber.js:40:12)
    at Subscriber2._error (Subscriber.js:63:24)
    at Subscriber2.error (Subscriber.js:40:12)
    at OperatorSubscriber2._this._next (OperatorSubscriber.js:16:21)
    at Subscriber2.next (Subscriber.js:32:12)
    at Observable2._subscribe (innerFrom.js:51:18)
    at Observable2._trySubscribe (Observable.js:33:19)
    at Observable.js:27:115
    at errorContext (errorContext.js:23:5)
    at Observable2.subscribe (Observable.js:23:5)
    at mergeInternals (mergeInternals.js:54:10)
    at mergeMap.js:20:12
    at OperatorSubscriber2.<anonymous> (lift.js:10:18)
    at Observable.js:27:42
    at errorContext (errorContext.js:23:5)
    at Observable2.subscribe (Observable.js:23:5)
    at filter.js:6:12
    at OperatorSubscriber2.<anonymous> (lift.js:10:18)
    at Observable.js:27:42
    at errorContext (errorContext.js:23:5)
    at Observable2.subscribe (Observable.js:23:5)
    at map.js:6:12
    at OperatorSubscriber2.<anonymous> (lift.js:10:18)
    at Observable.js:27:42
    at errorContext (errorContext.js:23:5)
    at Observable2.subscribe (Observable.js:23:5)
    at map.js:6:12

my icons are registered in MatIconsRegistry like this

matIconRegistry.addSvgIconInNamespace(
        'gk',
        'bike',
        domSanitizer.bypassSecurityTrustResourceUrl('assets/img/bike.svg')
      );

provided via app initializer:

provideAppInitializer(() => registerSvgIcons(inject(MatIconRegistry), inject(DomSanitizer))),

and used in component

<mat-icon svgIcon="gk:bike"></mat-icon>

I run all the automatic migrations and I'm not aware any breaking changes here.

Reproduction

StackBlitz link:
Steps to reproduce:
1.
2.

Expected Behavior

no error expected just like in material 18

Actual Behavior

error above

Environment

  • Angular: 19.0.0
  • CDK/Material: 19.0.0
  • Browser(s):
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 11
@GeorgeKnap GeorgeKnap added the needs triage This issue needs to be triaged by the team label Dec 31, 2024
@GeorgeKnap GeorgeKnap closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue needs to be triaged by the team
Projects
None yet
Development

No branches or pull requests

1 participant