Skip to content

PushDetails not rendering if the push name is an object. #539

Closed
@benrobertsonio

Description

@benrobertsonio
  • You're running version >=1.0.18 of Parse Dashboard.
  • You're running version >=2.2.18 of Parse Server.
  • You've searched through existing issues. Chances are that your issue has been reported or resolved before.

Environment Setup

I've got a parse server and a parse dashboard setup at two different heroku apps. I'm sending push notifications to the server from the Parse PHP SDK. The notifications are delivered, I'm just not able to see them in the dashboard if they are an object. Text notifications sent via the dashboard are delivered and I can view their details just fine.

Steps to reproduce

Navigate to Push / Past Pushes. Click on a Push Notification that has a name like: {"title":"Test Push","body":"Push Notification"}

Details do no load. JS console reports: "Uncaught Invariant Violation: Objects are not valid as a React child (found: object with keys {body, title}). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons. Check the render method of PushDetails"

Logs/Trace

Note: If you get a browser JS error please run npm run dev. This will provide source maps and a much more useful stack trace.


Uncaught Invariant Violation: Objects are not valid as a React child (found: object with keys {body, title}). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons. Check the render method of `PushDetails`.

invariant   @   invariant.js?bb9b:38
traverseAllChildrenImpl @   traverseAllChildren.js?fc13:136
traverseAllChildren @   traverseAllChildren.js?fc13:164
instantiateChildren @   ReactChildReconciler.js?660f:71
_reconcilerInstantiateChildren  @   ReactMultiChild.js?87d2:189
mountChildren   @   ReactMultiChild.js?87d2:228
_createInitialChildren  @   ReactDOMComponent.js?f4f2:698
mountComponent  @   ReactDOMComponent.js?f4f2:523
mountComponent  @   ReactReconciler.js?9da7:47
obj.(anonymous function)    @   backend.js:8386
mountChildren   @   ReactMultiChild.js?87d2:240
_createInitialChildren  @   ReactDOMComponent.js?f4f2:698
mountComponent  @   ReactDOMComponent.js?f4f2:523
mountComponent  @   ReactReconciler.js?9da7:47
obj.(anonymous function)    @   backend.js:8386
mountChildren   @   ReactMultiChild.js?87d2:240
_createInitialChildren  @   ReactDOMComponent.js?f4f2:698
mountComponent  @   ReactDOMComponent.js?f4f2:523
mountComponent  @   ReactReconciler.js?9da7:47
obj.(anonymous function)    @   backend.js:8386
mountChildren   @   ReactMultiChild.js?87d2:240
_createInitialChildren  @   ReactDOMComponent.js?f4f2:698
mountComponent  @   ReactDOMComponent.js?f4f2:523
mountComponent  @   ReactReconciler.js?9da7:47
obj.(anonymous function)    @   backend.js:8386
mountChildren   @   ReactMultiChild.js?87d2:240
_createInitialChildren  @   ReactDOMComponent.js?f4f2:698
mountComponent  @   ReactDOMComponent.js?f4f2:523
mountComponent  @   ReactReconciler.js?9da7:47
obj.(anonymous function)    @   backend.js:8386
performInitialMount @   ReactCompositeComponent.js?47a9:385
mountComponent  @   ReactCompositeComponent.js?47a9:260
mountComponent  @   ReactReconciler.js?9da7:47
obj.(anonymous function)    @   backend.js:8386
mountChildren   @   ReactMultiChild.js?87d2:240
_createInitialChildren  @   ReactDOMComponent.js?f4f2:698
mountComponent  @   ReactDOMComponent.js?f4f2:523
mountComponent  @   ReactReconciler.js?9da7:47
obj.(anonymous function)    @   backend.js:8386
updateChildren  @   ReactChildReconciler.js?660f:122
_reconcilerUpdateChildren   @   ReactMultiChild.js?87d2:210
_updateChildren @   ReactMultiChild.js?87d2:314
updateChildren  @   ReactMultiChild.js?87d2:301
_updateDOMChildren  @   ReactDOMComponent.js?f4f2:941
updateComponent @   ReactDOMComponent.js?f4f2:759
receiveComponent    @   ReactDOMComponent.js?f4f2:717
receiveComponent    @   ReactReconciler.js?9da7:126
obj.(anonymous function)    @   backend.js:8386
updateChildren  @   ReactChildReconciler.js?660f:110
_reconcilerUpdateChildren   @   ReactMultiChild.js?87d2:210
_updateChildren @   ReactMultiChild.js?87d2:314
updateChildren  @   ReactMultiChild.js?87d2:301
_updateDOMChildren  @   ReactDOMComponent.js?f4f2:941
updateComponent @   ReactDOMComponent.js?f4f2:759
receiveComponent    @   ReactDOMComponent.js?f4f2:717
receiveComponent    @   ReactReconciler.js?9da7:126
obj.(anonymous function)    @   backend.js:8386
_updateRenderedComponent    @   ReactCompositeComponent.js?47a9:761
_performComponentUpdate @   ReactCompositeComponent.js?47a9:739
updateComponent @   ReactCompositeComponent.js?47a9:658
performUpdateIfNecessary    @   ReactCompositeComponent.js?47a9:566
performUpdateIfNecessary    @   ReactReconciler.js?9da7:158
obj.(anonymous function)    @   backend.js:8386
runBatchedUpdates   @   ReactUpdates.js?6ba9:151
perform @   Transaction.js?d39c:138
perform @   Transaction.js?d39c:138
perform @   ReactUpdates.js?6ba9:90
flushBatchedUpdates @   ReactUpdates.js?6ba9:173
closeAll    @   Transaction.js?d39c:204
perform @   Transaction.js?d39c:151
batchedUpdates  @   ReactDefaultBatchingStrategy.js?c98c:63
enqueueUpdate   @   ReactUpdates.js?6ba9:201
enqueueUpdate   @   ReactUpdateQueue.js?9ce0:25
enqueueSetState @   ReactUpdateQueue.js?9ce0:210
ReactComponent.setState @   ReactComponent.js?2434:64
(anonymous function)    @   PushDetails.react.js?ddb5:318
wrappedRejectedCallback @   ParsePromise.js?42cc:159
reject  @   ParsePromise.js?42cc:89
wrappedRejectedCallback @   ParsePromise.js?42cc:175
reject  @   ParsePromise.js?42cc:89
wrappedRejectedCallback @   ParsePromise.js?42cc:175
reject  @   ParsePromise.js?42cc:89
xhr.onload  @   AJAX.js?275c:53

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:wont-fixWon’t be fixed with a clearly stated reason

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions