Skip to content

Angular object renderer crashes example app for some examples containing references #2073

Open
@lucas-koehler

Description

@lucas-koehler

Describe the bug

At least the examples allOf, Huge Test and AnyOf OneOf AllOf Resolve crash the example app when opened in the Angular Material examples.

All of them use $ref references in their schema and the same error message appears in the log. The Angular example app does not resolve references via an external dependency (e.g. json-refs). The same examples work for React Material.

The following two errors appear in the log whenever the issue occurs:

Show logs Log 1:
ObjectControlRenderer.html:2 ERROR 
View_ObjectControlRenderer_0	@	ObjectControlRenderer.html:2
proxyClass	@	compiler.js:25075
logError	@	core.js:32811
handleError	@	core.js:7792
(anonymous)	@	core.js:29781
_ZoneDelegate.invoke	@	zone.js:409
Zone.run	@	zone.js:169
runOutsideAngular	@	core.js:28668
tick	@	core.js:29781
(anonymous)	@	core.js:29629
_ZoneDelegate.invoke	@	zone.js:409
onInvoke	@	core.js:28769
_ZoneDelegate.invoke	@	zone.js:408
Zone.run	@	zone.js:169
run	@	core.js:28623
next	@	core.js:29628
SafeSubscriber.__tryOrUnsub	@	Subscriber.js:192
SafeSubscriber.next	@	Subscriber.js:130
Subscriber._next	@	Subscriber.js:76
Subscriber.next	@	Subscriber.js:53
Subject.next	@	Subject.js:47
emit	@	core.js:26042
checkStable	@	core.js:28691
onLeave	@	core.js:28819
onInvokeTask	@	core.js:28763
_ZoneDelegate.invokeTask	@	zone.js:442
Zone.runTask	@	zone.js:214
ZoneTask.invokeTask	@	zone.js:525
invokeTask	@	zone.js:1727
globalCallback	@	zone.js:1758
globalZoneAwareCallback	@	

Log2:

ObjectControlRenderer.html:2 ERROR CONTEXT DebugContext_ {view: {…}, nodeIndex: 1, nodeDef: {…}, elDef: {…}, elView: {…}}
View_ObjectControlRenderer_0	@	ObjectControlRenderer.html:2
proxyClass	@	compiler.js:25075
logError	@	core.js:32811
handleError	@	core.js:7797
(anonymous)	@	core.js:29781
_ZoneDelegate.invoke	@	zone.js:409
Zone.run	@	zone.js:169
runOutsideAngular	@	core.js:28668
tick	@	core.js:29781
(anonymous)	@	core.js:29629
_ZoneDelegate.invoke	@	zone.js:409
onInvoke	@	core.js:28769
_ZoneDelegate.invoke	@	zone.js:408
Zone.run	@	zone.js:169
run	@	core.js:28623
next	@	core.js:29628
SafeSubscriber.__tryOrUnsub	@	Subscriber.js:192
SafeSubscriber.next	@	Subscriber.js:130
Subscriber._next	@	Subscriber.js:76
Subscriber.next	@	Subscriber.js:53
Subject.next	@	Subject.js:47
emit	@	core.js:26042
checkStable	@	core.js:28691
onLeave	@	core.js:28819
onInvokeTask	@	core.js:28763
_ZoneDelegate.invokeTask	@	zone.js:442
Zone.runTask	@	zone.js:214
ZoneTask.invokeTask	@	zone.js:525
invokeTask	@	zone.js:1727
globalCallback	@	zone.js:1758
globalZoneAwareCallback	@	zone.js:1794

Expected behavior

  • The example app does not crash when examples with references are opened
  • Ideally, the ObjectControlRenderer can handle simple resolutions itself/reuses core code or at least doesn't crash the app.

Steps to reproduce the issue

  1. Open Angular Material example
  2. Open example AnyOf OneOf AllOf Resolve

Screenshots

No response

In which browser are you experiencing the issue?

Google Chrome 108.0.5359.124

Which Version of JSON Forms are you using?

v3.1.0-alpha.0, Could also be reproduced with 2.5.2

Framework

Angular

RendererSet

Material

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions