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: stencil, proxyCustomElement causing loops with pretty format plugin #25334
Comments
Thanks for the issue. Can you debug this a bit more? I can reproduce this behavior, but I am not able to determine if Ionic is responsible for it. I can reproduce this using the following render code: <IonReactRouter>
<IonRouterOutlet></IonRouterOutlet>
</IonReactRouter> It is possible that there is a bug in these components, or it could be that these components trigger a bug in underlying app dependency. |
Note that rendering the following: render(<IonBadge color="primary">Hello world!</IonBadge>) Also gives a strange result: Click to expand!```
Object {
"__reactFiber$i1nwtx4a2xk": FiberNode {
"_debugHookTypes": null,
"_debugNeedsRemount": false,
"_debugOwner": FiberNode {
"_debugHookTypes": null,
"_debugNeedsRemount": false,
"_debugOwner": FiberNode {
"_debugHookTypes": null,
"_debugNeedsRemount": false,
"_debugOwner": null,
"_debugSource": Object {
"columnNumber": 12,
"fileName": "/Users/maartenhus/Projects/ionic-test/blaatje/src/blaat.test.tsx",
"lineNumber": 51,
},
"actualDuration": 0,
"actualStartTime": -1,
"alternate": null,
"child": [Circular],
"childLanes": 0,
"deletions": null,
"dependencies": null,
"elementType": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
"flags": 1,
"index": 0,
"key": null,
"lanes": 0,
"memoizedProps": Object {
"children": "Hello world!",
"color": "primary",
},
"memoizedState": null,
"mode": 1,
"pendingProps": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"return": FiberNode {
"_debugHookTypes": null,
"_debugNeedsRemount": false,
"_debugOwner": null,
"_debugSource": null,
"actualDuration": 0,
"actualStartTime": -1,
"alternate": FiberNode {
"_debugHookTypes": null,
"_debugNeedsRemount": false,
"_debugOwner": null,
"_debugSource": null,
"actualDuration": 0,
"actualStartTime": -1,
"alternate": [Circular],
"child": null,
"childLanes": 0,
"deletions": null,
"dependencies": null,
"elementType": null,
"flags": 0,
"index": 0,
"key": null,
"lanes": 16,
"memoizedProps": null,
"memoizedState": Object {
"cache": null,
"element": null,
"isDehydrated": false,
"pendingSuspenseBoundaries": null,
"transitions": null,
},
"mode": 1,
"pendingProps": null,
"ref": null,
"return": null,
"selfBaseDuration": 0,
"sibling": null,
"stateNode": FiberRootNode {
"_debugRootType": "createRoot()",
"callbackNode": null,
"callbackPriority": 0,
"containerInfo":
```
[Circular]
,
"context": Object {},
"current": [Circular],
"effectDuration": 0,
"entangledLanes": 0,
"entanglements": Array [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"eventTimes": Array [
0,
0,
0,
0,
-1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"expirationTimes": Array [
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
],
"expiredLanes": 0,
"finishedLanes": 0,
"finishedWork": null,
"identifierPrefix": "",
"memoizedUpdaters": Set {},
"mutableReadLanes": 0,
"mutableSourceEagerHydrationData": null,
"onRecoverableError": [Function],
"passiveEffectDuration": 0,
"pendingChildren": null,
"pendingContext": null,
"pendingLanes": 0,
"pendingUpdatersLaneMap": Array [
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
],
"pingCache": null,
"pingedLanes": 0,
"suspendedLanes": 0,
"tag": 1,
"timeoutHandle": -1,
},
"subtreeFlags": 0,
"tag": 3,
"treeBaseDuration": 0,
"type": null,
"updateQueue": Object {
"baseState": Object {
"cache": null,
"element": null,
"isDehydrated": false,
"pendingSuspenseBoundaries": null,
"transitions": null,
},
"effects": null,
"firstBaseUpdate": Object {
"callback": null,
"eventTime": 1948.881142,
"lane": 16,
"next": null,
"payload": Object {
"element": Object {
"$typeof": Symbol(react.element),
"_owner": null,
"_store": Object {},
"key": null,
"props": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
},
},
"tag": 0,
},
"lastBaseUpdate": Object {
"callback": null,
"eventTime": 1948.881142,
"lane": 16,
"next": null,
"payload": Object {
"element": Object {
"$typeof": Symbol(react.element),
"_owner": null,
"_store": Object {},
"key": null,
"props": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
},
},
"tag": 0,
},
"shared": Object {
"interleaved": null,
"lanes": 0,
"pending": null,
},
},
},
"child": [Circular],
"childLanes": 0,
"deletions": null,
"dependencies": null,
"elementType": null,
"flags": 1024,
"index": 0,
"key": null,
"lanes": 0,
"memoizedProps": null,
"memoizedState": Object {
"cache": null,
"element": Object {
"$typeof": Symbol(react.element),
"_owner": null,
"_store": Object {},
"key": null,
"props": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
},
"isDehydrated": false,
"pendingSuspenseBoundaries": null,
"transitions": null,
},
"mode": 1,
"pendingProps": null,
"ref": null,
"return": null,
"selfBaseDuration": 0,
"sibling": null,
"stateNode": FiberRootNode {
"_debugRootType": "createRoot()",
"callbackNode": null,
"callbackPriority": 0,
"containerInfo":
[Circular]
,
"context": Object {},
"current": [Circular],
"effectDuration": 0,
"entangledLanes": 0,
"entanglements": Array [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"eventTimes": Array [
0,
0,
0,
0,
-1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"expirationTimes": Array [
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
],
"expiredLanes": 0,
"finishedLanes": 0,
"finishedWork": null,
"identifierPrefix": "",
"memoizedUpdaters": Set {},
"mutableReadLanes": 0,
"mutableSourceEagerHydrationData": null,
"onRecoverableError": [Function],
"passiveEffectDuration": 0,
"pendingChildren": null,
"pendingContext": null,
"pendingLanes": 0,
"pendingUpdatersLaneMap": Array [
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
],
"pingCache": null,
"pingedLanes": 0,
"suspendedLanes": 0,
"tag": 1,
"timeoutHandle": -1,
},
"subtreeFlags": 6291975,
"tag": 3,
"treeBaseDuration": 0,
"type": null,
"updateQueue": Object {
"baseState": Object {
"cache": null,
"element": Object {
"$typeof": Symbol(react.element),
"_owner": null,
"_store": Object {},
"key": null,
"props": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
},
"isDehydrated": false,
"pendingSuspenseBoundaries": null,
"transitions": null,
},
"effects": null,
"firstBaseUpdate": null,
"lastBaseUpdate": null,
"shared": Object {
"interleaved": null,
"lanes": 0,
"pending": null,
},
},
},
"selfBaseDuration": 0,
"sibling": null,
"stateNode": null,
"subtreeFlags": 6291973,
"tag": 11,
"treeBaseDuration": 0,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
"updateQueue": null,
},
"_debugSource": null,
"actualDuration": 0,
"actualStartTime": -1,
"alternate": null,
"child": [Circular],
"childLanes": 0,
"deletions": null,
"dependencies": null,
"elementType": [Function],
"flags": 4194309,
"index": 0,
"key": null,
"lanes": 0,
"memoizedProps": Object {
"children": "Hello world!",
"color": "primary",
"forwardedRef": null,
},
"memoizedState": null,
"mode": 1,
"pendingProps": Object {
"children": "Hello world!",
"color": "primary",
"forwardedRef": null,
},
"ref": null,
"return": FiberNode {
"_debugHookTypes": null,
"_debugNeedsRemount": false,
"_debugOwner": null,
"_debugSource": Object {
"columnNumber": 12,
"fileName": "/Users/maartenhus/Projects/ionic-test/blaatje/src/blaat.test.tsx",
"lineNumber": 51,
},
"actualDuration": 0,
"actualStartTime": -1,
"alternate": null,
"child": [Circular],
"childLanes": 0,
"deletions": null,
"dependencies": null,
"elementType": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
"flags": 1,
"index": 0,
"key": null,
"lanes": 0,
"memoizedProps": Object {
"children": "Hello world!",
"color": "primary",
},
"memoizedState": null,
"mode": 1,
"pendingProps": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"return": FiberNode {
"_debugHookTypes": null,
"_debugNeedsRemount": false,
"_debugOwner": null,
"_debugSource": null,
"actualDuration": 0,
"actualStartTime": -1,
"alternate": FiberNode {
"_debugHookTypes": null,
"_debugNeedsRemount": false,
"_debugOwner": null,
"_debugSource": null,
"actualDuration": 0,
"actualStartTime": -1,
"alternate": [Circular],
"child": null,
"childLanes": 0,
"deletions": null,
"dependencies": null,
"elementType": null,
"flags": 0,
"index": 0,
"key": null,
"lanes": 16,
"memoizedProps": null,
"memoizedState": Object {
"cache": null,
"element": null,
"isDehydrated": false,
"pendingSuspenseBoundaries": null,
"transitions": null,
},
"mode": 1,
"pendingProps": null,
"ref": null,
"return": null,
"selfBaseDuration": 0,
"sibling": null,
"stateNode": FiberRootNode {
"_debugRootType": "createRoot()",
"callbackNode": null,
"callbackPriority": 0,
"containerInfo":
[Circular]
,
"context": Object {},
"current": [Circular],
"effectDuration": 0,
"entangledLanes": 0,
"entanglements": Array [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"eventTimes": Array [
0,
0,
0,
0,
-1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"expirationTimes": Array [
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
],
"expiredLanes": 0,
"finishedLanes": 0,
"finishedWork": null,
"identifierPrefix": "",
"memoizedUpdaters": Set {},
"mutableReadLanes": 0,
"mutableSourceEagerHydrationData": null,
"onRecoverableError": [Function],
"passiveEffectDuration": 0,
"pendingChildren": null,
"pendingContext": null,
"pendingLanes": 0,
"pendingUpdatersLaneMap": Array [
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
],
"pingCache": null,
"pingedLanes": 0,
"suspendedLanes": 0,
"tag": 1,
"timeoutHandle": -1,
},
"subtreeFlags": 0,
"tag": 3,
"treeBaseDuration": 0,
"type": null,
"updateQueue": Object {
"baseState": Object {
"cache": null,
"element": null,
"isDehydrated": false,
"pendingSuspenseBoundaries": null,
"transitions": null,
},
"effects": null,
"firstBaseUpdate": Object {
"callback": null,
"eventTime": 1948.881142,
"lane": 16,
"next": null,
"payload": Object {
"element": Object {
"$typeof": Symbol(react.element),
"_owner": null,
"_store": Object {},
"key": null,
"props": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
},
},
"tag": 0,
},
"lastBaseUpdate": Object {
"callback": null,
"eventTime": 1948.881142,
"lane": 16,
"next": null,
"payload": Object {
"element": Object {
"$typeof": Symbol(react.element),
"_owner": null,
"_store": Object {},
"key": null,
"props": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
},
},
"tag": 0,
},
"shared": Object {
"interleaved": null,
"lanes": 0,
"pending": null,
},
},
},
"child": [Circular],
"childLanes": 0,
"deletions": null,
"dependencies": null,
"elementType": null,
"flags": 1024,
"index": 0,
"key": null,
"lanes": 0,
"memoizedProps": null,
"memoizedState": Object {
"cache": null,
"element": Object {
"$typeof": Symbol(react.element),
"_owner": null,
"_store": Object {},
"key": null,
"props": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
},
"isDehydrated": false,
"pendingSuspenseBoundaries": null,
"transitions": null,
},
"mode": 1,
"pendingProps": null,
"ref": null,
"return": null,
"selfBaseDuration": 0,
"sibling": null,
"stateNode": FiberRootNode {
"_debugRootType": "createRoot()",
"callbackNode": null,
"callbackPriority": 0,
"containerInfo":
[Circular]
,
"context": Object {},
"current": [Circular],
"effectDuration": 0,
"entangledLanes": 0,
"entanglements": Array [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"eventTimes": Array [
0,
0,
0,
0,
-1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"expirationTimes": Array [
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
],
"expiredLanes": 0,
"finishedLanes": 0,
"finishedWork": null,
"identifierPrefix": "",
"memoizedUpdaters": Set {},
"mutableReadLanes": 0,
"mutableSourceEagerHydrationData": null,
"onRecoverableError": [Function],
"passiveEffectDuration": 0,
"pendingChildren": null,
"pendingContext": null,
"pendingLanes": 0,
"pendingUpdatersLaneMap": Array [
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
],
"pingCache": null,
"pingedLanes": 0,
"suspendedLanes": 0,
"tag": 1,
"timeoutHandle": -1,
},
"subtreeFlags": 6291975,
"tag": 3,
"treeBaseDuration": 0,
"type": null,
"updateQueue": Object {
"baseState": Object {
"cache": null,
"element": Object {
"$typeof": Symbol(react.element),
"_owner": null,
"_store": Object {},
"key": null,
"props": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
},
"isDehydrated": false,
"pendingSuspenseBoundaries": null,
"transitions": null,
},
"effects": null,
"firstBaseUpdate": null,
"lastBaseUpdate": null,
"shared": Object {
"interleaved": null,
"lanes": 0,
"pending": null,
},
},
},
"selfBaseDuration": 0,
"sibling": null,
"stateNode": null,
"subtreeFlags": 6291973,
"tag": 11,
"treeBaseDuration": 0,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
"updateQueue": null,
},
"selfBaseDuration": 0,
"sibling": null,
"stateNode": ReactComponent {
"_reactInternalInstance": Object {},
"_reactInternals": [Circular],
"componentEl": [Circular],
"context": Object {},
"props": Object {
"children": "Hello world!",
"color": "primary",
"forwardedRef": null,
},
"refs": Object {},
"setComponentElRef": [Function],
"state": null,
"updater": Object {
"enqueueForceUpdate": [Function],
"enqueueReplaceState": [Function],
"enqueueSetState": [Function],
"isMounted": [Function],
},
},
"subtreeFlags": 2097664,
"tag": 1,
"treeBaseDuration": 0,
"type": [Function],
"updateQueue": Object {
"baseState": null,
"effects": null,
"firstBaseUpdate": null,
"lastBaseUpdate": null,
"shared": Object {
"interleaved": null,
"lanes": 0,
"pending": null,
},
},
},
"_debugSource": null,
"actualDuration": 0,
"actualStartTime": -1,
"alternate": null,
"child": null,
"childLanes": 0,
"deletions": null,
"dependencies": null,
"elementType": "ion-badge",
"flags": 2097664,
"index": 0,
"key": null,
"lanes": 0,
"memoizedProps": Object {
"children": "Hello world!",
"color": "primary",
"style": undefined,
},
"memoizedState": null,
"mode": 1,
"pendingProps": Object {
"children": "Hello world!",
"color": "primary",
"style": undefined,
},
"ref": [Function],
"return": FiberNode {
"_debugHookTypes": null,
"_debugNeedsRemount": false,
"_debugOwner": FiberNode {
"_debugHookTypes": null,
"_debugNeedsRemount": false,
"_debugOwner": null,
"_debugSource": Object {
"columnNumber": 12,
"fileName": "/Users/maartenhus/Projects/ionic-test/blaatje/src/blaat.test.tsx",
"lineNumber": 51,
},
"actualDuration": 0,
"actualStartTime": -1,
"alternate": null,
"child": [Circular],
"childLanes": 0,
"deletions": null,
"dependencies": null,
"elementType": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
"flags": 1,
"index": 0,
"key": null,
"lanes": 0,
"memoizedProps": Object {
"children": "Hello world!",
"color": "primary",
},
"memoizedState": null,
"mode": 1,
"pendingProps": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"return": FiberNode {
"_debugHookTypes": null,
"_debugNeedsRemount": false,
"_debugOwner": null,
"_debugSource": null,
"actualDuration": 0,
"actualStartTime": -1,
"alternate": FiberNode {
"_debugHookTypes": null,
"_debugNeedsRemount": false,
"_debugOwner": null,
"_debugSource": null,
"actualDuration": 0,
"actualStartTime": -1,
"alternate": [Circular],
"child": null,
"childLanes": 0,
"deletions": null,
"dependencies": null,
"elementType": null,
"flags": 0,
"index": 0,
"key": null,
"lanes": 16,
"memoizedProps": null,
"memoizedState": Object {
"cache": null,
"element": null,
"isDehydrated": false,
"pendingSuspenseBoundaries": null,
"transitions": null,
},
"mode": 1,
"pendingProps": null,
"ref": null,
"return": null,
"selfBaseDuration": 0,
"sibling": null,
"stateNode": FiberRootNode {
"_debugRootType": "createRoot()",
"callbackNode": null,
"callbackPriority": 0,
"containerInfo":
[Circular]
,
"context": Object {},
"current": [Circular],
"effectDuration": 0,
"entangledLanes": 0,
"entanglements": Array [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"eventTimes": Array [
0,
0,
0,
0,
-1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"expirationTimes": Array [
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
],
"expiredLanes": 0,
"finishedLanes": 0,
"finishedWork": null,
"identifierPrefix": "",
"memoizedUpdaters": Set {},
"mutableReadLanes": 0,
"mutableSourceEagerHydrationData": null,
"onRecoverableError": [Function],
"passiveEffectDuration": 0,
"pendingChildren": null,
"pendingContext": null,
"pendingLanes": 0,
"pendingUpdatersLaneMap": Array [
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
],
"pingCache": null,
"pingedLanes": 0,
"suspendedLanes": 0,
"tag": 1,
"timeoutHandle": -1,
},
"subtreeFlags": 0,
"tag": 3,
"treeBaseDuration": 0,
"type": null,
"updateQueue": Object {
"baseState": Object {
"cache": null,
"element": null,
"isDehydrated": false,
"pendingSuspenseBoundaries": null,
"transitions": null,
},
"effects": null,
"firstBaseUpdate": Object {
"callback": null,
"eventTime": 1948.881142,
"lane": 16,
"next": null,
"payload": Object {
"element": Object {
"$typeof": Symbol(react.element),
"_owner": null,
"_store": Object {},
"key": null,
"props": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
},
},
"tag": 0,
},
"lastBaseUpdate": Object {
"callback": null,
"eventTime": 1948.881142,
"lane": 16,
"next": null,
"payload": Object {
"element": Object {
"$typeof": Symbol(react.element),
"_owner": null,
"_store": Object {},
"key": null,
"props": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
},
},
"tag": 0,
},
"shared": Object {
"interleaved": null,
"lanes": 0,
"pending": null,
},
},
},
"child": [Circular],
"childLanes": 0,
"deletions": null,
"dependencies": null,
"elementType": null,
"flags": 1024,
"index": 0,
"key": null,
"lanes": 0,
"memoizedProps": null,
"memoizedState": Object {
"cache": null,
"element": Object {
"$typeof": Symbol(react.element),
"_owner": null,
"_store": Object {},
"key": null,
"props": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
},
"isDehydrated": false,
"pendingSuspenseBoundaries": null,
"transitions": null,
},
"mode": 1,
"pendingProps": null,
"ref": null,
"return": null,
"selfBaseDuration": 0,
"sibling": null,
"stateNode": FiberRootNode {
"_debugRootType": "createRoot()",
"callbackNode": null,
"callbackPriority": 0,
"containerInfo":
[Circular]
,
"context": Object {},
"current": [Circular],
"effectDuration": 0,
"entangledLanes": 0,
"entanglements": Array [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"eventTimes": Array [
0,
0,
0,
0,
-1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"expirationTimes": Array [
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
],
"expiredLanes": 0,
"finishedLanes": 0,
"finishedWork": null,
"identifierPrefix": "",
"memoizedUpdaters": Set {},
"mutableReadLanes": 0,
"mutableSourceEagerHydrationData": null,
"onRecoverableError": [Function],
"passiveEffectDuration": 0,
"pendingChildren": null,
"pendingContext": null,
"pendingLanes": 0,
"pendingUpdatersLaneMap": Array [
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
],
"pingCache": null,
"pingedLanes": 0,
"suspendedLanes": 0,
"tag": 1,
"timeoutHandle": -1,
},
"subtreeFlags": 6291975,
"tag": 3,
"treeBaseDuration": 0,
"type": null,
"updateQueue": Object {
"baseState": Object {
"cache": null,
"element": Object {
"$typeof": Symbol(react.element),
"_owner": null,
"_store": Object {},
"key": null,
"props": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
},
"isDehydrated": false,
"pendingSuspenseBoundaries": null,
"transitions": null,
},
"effects": null,
"firstBaseUpdate": null,
"lastBaseUpdate": null,
"shared": Object {
"interleaved": null,
"lanes": 0,
"pending": null,
},
},
},
"selfBaseDuration": 0,
"sibling": null,
"stateNode": null,
"subtreeFlags": 6291973,
"tag": 11,
"treeBaseDuration": 0,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
"updateQueue": null,
},
"_debugSource": null,
"actualDuration": 0,
"actualStartTime": -1,
"alternate": null,
"child": [Circular],
"childLanes": 0,
"deletions": null,
"dependencies": null,
"elementType": [Function],
"flags": 4194309,
"index": 0,
"key": null,
"lanes": 0,
"memoizedProps": Object {
"children": "Hello world!",
"color": "primary",
"forwardedRef": null,
},
"memoizedState": null,
"mode": 1,
"pendingProps": Object {
"children": "Hello world!",
"color": "primary",
"forwardedRef": null,
},
"ref": null,
"return": FiberNode {
"_debugHookTypes": null,
"_debugNeedsRemount": false,
"_debugOwner": null,
"_debugSource": Object {
"columnNumber": 12,
"fileName": "/Users/maartenhus/Projects/ionic-test/blaatje/src/blaat.test.tsx",
"lineNumber": 51,
},
"actualDuration": 0,
"actualStartTime": -1,
"alternate": null,
"child": [Circular],
"childLanes": 0,
"deletions": null,
"dependencies": null,
"elementType": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
"flags": 1,
"index": 0,
"key": null,
"lanes": 0,
"memoizedProps": Object {
"children": "Hello world!",
"color": "primary",
},
"memoizedState": null,
"mode": 1,
"pendingProps": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"return": FiberNode {
"_debugHookTypes": null,
"_debugNeedsRemount": false,
"_debugOwner": null,
"_debugSource": null,
"actualDuration": 0,
"actualStartTime": -1,
"alternate": FiberNode {
"_debugHookTypes": null,
"_debugNeedsRemount": false,
"_debugOwner": null,
"_debugSource": null,
"actualDuration": 0,
"actualStartTime": -1,
"alternate": [Circular],
"child": null,
"childLanes": 0,
"deletions": null,
"dependencies": null,
"elementType": null,
"flags": 0,
"index": 0,
"key": null,
"lanes": 16,
"memoizedProps": null,
"memoizedState": Object {
"cache": null,
"element": null,
"isDehydrated": false,
"pendingSuspenseBoundaries": null,
"transitions": null,
},
"mode": 1,
"pendingProps": null,
"ref": null,
"return": null,
"selfBaseDuration": 0,
"sibling": null,
"stateNode": FiberRootNode {
"_debugRootType": "createRoot()",
"callbackNode": null,
"callbackPriority": 0,
"containerInfo":
[Circular]
,
"context": Object {},
"current": [Circular],
"effectDuration": 0,
"entangledLanes": 0,
"entanglements": Array [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"eventTimes": Array [
0,
0,
0,
0,
-1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"expirationTimes": Array [
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
],
"expiredLanes": 0,
"finishedLanes": 0,
"finishedWork": null,
"identifierPrefix": "",
"memoizedUpdaters": Set {},
"mutableReadLanes": 0,
"mutableSourceEagerHydrationData": null,
"onRecoverableError": [Function],
"passiveEffectDuration": 0,
"pendingChildren": null,
"pendingContext": null,
"pendingLanes": 0,
"pendingUpdatersLaneMap": Array [
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
],
"pingCache": null,
"pingedLanes": 0,
"suspendedLanes": 0,
"tag": 1,
"timeoutHandle": -1,
},
"subtreeFlags": 0,
"tag": 3,
"treeBaseDuration": 0,
"type": null,
"updateQueue": Object {
"baseState": Object {
"cache": null,
"element": null,
"isDehydrated": false,
"pendingSuspenseBoundaries": null,
"transitions": null,
},
"effects": null,
"firstBaseUpdate": Object {
"callback": null,
"eventTime": 1948.881142,
"lane": 16,
"next": null,
"payload": Object {
"element": Object {
"$typeof": Symbol(react.element),
"_owner": null,
"_store": Object {},
"key": null,
"props": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
},
},
"tag": 0,
},
"lastBaseUpdate": Object {
"callback": null,
"eventTime": 1948.881142,
"lane": 16,
"next": null,
"payload": Object {
"element": Object {
"$typeof": Symbol(react.element),
"_owner": null,
"_store": Object {},
"key": null,
"props": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
},
},
"tag": 0,
},
"shared": Object {
"interleaved": null,
"lanes": 0,
"pending": null,
},
},
},
"child": [Circular],
"childLanes": 0,
"deletions": null,
"dependencies": null,
"elementType": null,
"flags": 1024,
"index": 0,
"key": null,
"lanes": 0,
"memoizedProps": null,
"memoizedState": Object {
"cache": null,
"element": Object {
"$typeof": Symbol(react.element),
"_owner": null,
"_store": Object {},
"key": null,
"props": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
},
"isDehydrated": false,
"pendingSuspenseBoundaries": null,
"transitions": null,
},
"mode": 1,
"pendingProps": null,
"ref": null,
"return": null,
"selfBaseDuration": 0,
"sibling": null,
"stateNode": FiberRootNode {
"_debugRootType": "createRoot()",
"callbackNode": null,
"callbackPriority": 0,
"containerInfo":
[Circular]
,
"context": Object {},
"current": [Circular],
"effectDuration": 0,
"entangledLanes": 0,
"entanglements": Array [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"eventTimes": Array [
0,
0,
0,
0,
-1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"expirationTimes": Array [
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
],
"expiredLanes": 0,
"finishedLanes": 0,
"finishedWork": null,
"identifierPrefix": "",
"memoizedUpdaters": Set {},
"mutableReadLanes": 0,
"mutableSourceEagerHydrationData": null,
"onRecoverableError": [Function],
"passiveEffectDuration": 0,
"pendingChildren": null,
"pendingContext": null,
"pendingLanes": 0,
"pendingUpdatersLaneMap": Array [
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
Set {},
],
"pingCache": null,
"pingedLanes": 0,
"suspendedLanes": 0,
"tag": 1,
"timeoutHandle": -1,
},
"subtreeFlags": 6291975,
"tag": 3,
"treeBaseDuration": 0,
"type": null,
"updateQueue": Object {
"baseState": Object {
"cache": null,
"element": Object {
"$typeof": Symbol(react.element),
"_owner": null,
"_store": Object {},
"key": null,
"props": Object {
"children": "Hello world!",
"color": "primary",
},
"ref": null,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
},
"isDehydrated": false,
"pendingSuspenseBoundaries": null,
"transitions": null,
},
"effects": null,
"firstBaseUpdate": null,
"lastBaseUpdate": null,
"shared": Object {
"interleaved": null,
"lanes": 0,
"pending": null,
},
},
},
"selfBaseDuration": 0,
"sibling": null,
"stateNode": null,
"subtreeFlags": 6291973,
"tag": 11,
"treeBaseDuration": 0,
"type": Object {
"$typeof": Symbol(react.forward_ref),
"render": [Function],
},
"updateQueue": null,
},
"selfBaseDuration": 0,
"sibling": null,
"stateNode": ReactComponent {
"_reactInternalInstance": Object {},
"_reactInternals": [Circular],
"componentEl": [Circular],
"context": Object {},
"props": Object {
"children": "Hello world!",
"color": "primary",
"forwardedRef": null,
},
"refs": Object {},
"setComponentElRef": [Function],
"state": null,
"updater": Object {
"enqueueForceUpdate": [Function],
"enqueueReplaceState": [Function],
"enqueueSetState": [Function],
"isMounted": [Function],
},
},
"subtreeFlags": 2097664,
"tag": 1,
"treeBaseDuration": 0,
"type": [Function],
"updateQueue": Object {
"baseState": null,
"effects": null,
"firstBaseUpdate": null,
"lastBaseUpdate": null,
"shared": Object {
"interleaved": null,
"lanes": 0,
"pending": null,
},
},
},
"selfBaseDuration": 0,
"sibling": null,
"stateNode": [Circular],
"subtreeFlags": 0,
"tag": 5,
"treeBaseDuration": 0,
"type": "ion-badge",
"updateQueue": null,
},
"__reactProps$i1nwtx4a2xk": Object {
"children": "Hello world!",
"color": "primary",
"style": undefined,
},
Symbol(SameObject caches): Object {
"childNodes": NodeList [
Hello world!,
],
"classList": DOMTokenList {
"0": "ion-color",
"1": "ion-color-primary",
"2": "md",
},
"style": CSSStyleDeclaration {
"_importants": Object {},
"_length": 0,
"_onChange": [Function],
"_values": Object {},
},
},
}
Perhaps it is something very basic in Ionic, does Ionic support React 18? |
Ionic React does support React 18. I recommend digging into what's calling It looks like |
There is a function called /**
* We use createElement here instead of
* React.createElement to work around a
* bug in Vite (https://github.com/vitejs/vite/issues/6104).
* React.createElement causes all elements to be rendered
* as <tagname> instead of the actual Web Component.
*/
return React.createElement(tagName, newProps, children); If you read the comment it says it does not want to use Here is the original source file: It does not use React.createElement, but createElement, so somehow the build causes this to use it. If I change the line:
to:
Then my test shows:
So this change makes it display inside react-testing-library correctly. It also works when starting the app via |
Downgrading to https://github.com/ionic-team/ionic-framework/releases/tag/v6.0.1 causes the problem to go away. This is because this version lies before this change / pull request: Which was created because of this issue: I wonder if this cannot be reverted because the root cause has been fixed: For completions sake the output is now:
Note that the name is now |
The issue appears to be related to a function called I will take a closer look and follow up here when I have more to share. |
Hey there, is there an update on this issue? We are also bitten by this issue when upgrading to @stencilc/core v2.14.1 which introduced the |
Were you able to reproduce the issue outside of Ionic? (I.e. in a blank Stencil app) That would help us isolate and fix the issue quicker. |
I was able to reproduce using a React app bootstrapped from CRA https://github.com/vincenthongzy/stencil-repro. Please let me know if you require more details. I have exported a simple component, The above screenshot is from rendering a single After downgrading to
|
Thanks! I forwarded the repo to the Stencil team who is going to investigate further: ionic-team/stencil#3434. |
Is there any update to this Issue? |
@h-sakano you can check my reply here ionic-team/stencil#3434 (comment) to see if it helps |
Any update on this issue? Seems crazy that react-testing-library and react-ionic might be broken for 6 months and there is not a larger discussion here? |
This issue is easily reproducible in a new ionic app:
Result:
Here's a repo where the first commit is the result of @vincenthongzy your reply does not solve this problem, and inspecting the result of
|
Bump. We're still getting this after following these instructions: https://ionic.io/blog/testing-ionic-react-apps-with-jest-and-react-testing-library and using https://github.com/ionic-team/ionic-react-test-utils |
I can't upgrade ionic/react from v6.0.1 because of this error. Even if I downgraded @stencil/core to v2.10.0. |
Still happening. I stumbled into what @staff0rd explains. Sadly, it makes TDD/BDD a lot harder or impossible. Waiting up to 10 seconds for a test when it fails (the expected thing in TDD), without any usable error message, is not viable. If it helps, I have added a demo repository here: |
This is happening because @testing-library/dom expects This can be fixed in either library:
I note that with approach #2, the output of |
Can everyone try the following dev build, and let me know if it resolves the issue?
Please note that this is a dev build of Ionic 7. As a result, it is subject to the Ionic 7 Migration Guide and Breaking Changes. |
@liamdebeasi I can confirm that dev build works as expected: import { IonSkeletonText } from '@ionic/react'
import { waitForIonicReact } from '@ionic/react-test-utils'
import { render } from '@testing-library/react'
describe('SkeletonForm', () => {
it('should render a skeleton form', async () => {
const { debug } = render(<IonSkeletonText />)
await waitForIonicReact()
debug()
})
}) |
Everything works fine with this fix. My problem would be solved after merge. |
Hi everyone, The fix for this has been released in Stencil v3.2.1. Ionic has been updated to use that version, and this update should be available in an upcoming release of Ionic. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Prerequisites
Ionic Framework Version
Current Behavior
I'm using React 18 in combination with @testing-library/react and @ionic/react-test-utils, and I'm getting
the following error:
PrettyFormatPluginError: Invalid string length
.When an assertion fails, @testing-library/react will attempt to render the
screen
. It does so by calling a library calledpretty-format
with a custom formatter, whose job it is to render the current screen in a human readable way.For some reason
ionic
puts this mechanism in an infinite loop,If you manually change the
printObjectProperties
function atnode_modules/pretty-format/build/collections.js
and add some logs, you can see how many times it is called.Also when calling
screen.debug()
you see the same behaviour.Expected Behavior
You expect the "screen" to be able to render when using @testing-library/react.
This did not happen in previous versions.
Steps to Reproduce
In the reproduction repo.
Run
npm install
Run
npm test
Focus the tests on the "blaat.test.tsx` file.
After waiting a long time it should print the error, for me it is about
120 seconds
.Code Reproduction URL
https://github.com/MrHus/ionic-react-test-fail
Ionic Info
Ionic:
Ionic CLI : 6.19.1 (/Users/redacted/.nvm/versions/node/v16.15.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 6.1.6
Capacitor:
Capacitor CLI : 3.5.1
@capacitor/android : 3.5.1
@capacitor/core : 3.5.1
@capacitor/ios : 3.5.1
Utility:
cordova-res : not installed globally
native-run : 1.6.0
System:
NodeJS : v16.15.0 (/Users/redacted/.nvm/versions/node/v16.15.0/bin/node)
npm : 8.5.5
OS : macOS Big Sur
Additional Information
No response
The text was updated successfully, but these errors were encountered: