I get the error in the title when refetching the data several times after it loads for the first time. It seems like a random error.
I am displaying an error message with the isError Boolean flag.
Is there a way to mitigate this error? Or perhaps instead of displaying the error message, keep displaying the stale data to the user (perhaps with an alert)?
The full error is this:
Error: Query data cannot be undefined
at Object.onSuccess (index.js:1099:19)
at resolve (index.js:564:50)
Related
I got an error when collapsing groups in the syncfusion gant. I could reproduce it here with my own set of data (stackblitz).
The error full message :
TypeError: Cannot read properties of undefined (reading 'childRecords')
at e.expandCollapseChartRows (constant.js:13:25)
at e.expandCollapseChartRows (constant.js:13:25)
at e.collapsedGanttRow (constant.js:13:25)
at e.collapsed (constant.js:13:25)
at e.notify (dom.js:466:34)
at d.e.trigger (dom.js:466:34)
at eval (constant.js:130:22)
at e.notify (dom.js:466:34)
at d.e.trigger (dom.js:466:34)
at d.collapseRow (constant.js:130:22)
A screenshot showing the collapse action :
The error occurs only when there are two nested grouping levels which i think is allowed in the syncfusion gantt (right?)
This issue occurs because the TaskID values in your data are not unique. The TaskID field acts as the primary key field in the Gantt. Hence, it should be unique for every record. Please ensure that the TaskID field is unique for every record in your data to avoid this issue.
We currently have rules encoded in json that determine if react-final-form will display a validation error or not which I believe is standard. So meta.error will have data for an invalid field and our error display component will display the error. It would be convenient to be able to query something directly to find out if an error message is being displayed for a particular field. Like if the field is called name then form.name.meta.error or state.name.meta.error. Is there anything like that in the api?
I'm building a form with validations using Formik and Yup, sending specific error messages on missing fields. One of the fields (question) is and array of objects, and I'm can't find a way to access each individual error message.
I've created a validationSchema, but when I try to pass the array index on Formik error prop, I get an error.
Here's a sandbox with an abstraction of the whole form. In this example, it only work if I comment the second label field, but in a normal situation this must be dynamic:
https://codesandbox.io/s/0ov0vxmom0?fontsize=14
I figured out this happens because, when the form is rendered, the error object is empty by default. So if I pass the first index [0], when the object get an error, Formik is able to access it. If I get and error on the next field, for example, Formik would try to access the error on index[1], but the error object would have just index [0]. I must pass exactly the error position because my form could have multiple questions. Any tips?
If you are checking based on the object type you can add .typeError(msg) at the end of each Schema.
Ex.
Yub.object().typeError('Invalid Object');
Yub.array().typeError('Invalid Array');
I'm following a tutorial that shows one how to make a chat app with a paging feature but for some reason the code responsible for the Prev page and Next page paging buttons do not work as expected.
Here is the app in a Plunker:
http://embed.plnkr.co/zxp9wcKaMcfM2U0vAJhG/preview
Every time one clicks the Next button, one is supposed to see the next 10 message in the Firebase message object starting from the first one. Keep in mind I have 28 messages in the messages object. So when you click the Next button once, you will see the next 10 messages as expected but when you click it a second time the message list goes blank.
So when I tried to debug this manually I decided to run console.log(lastItem.name) since this seemed to be the critical parameter to get this function to work. So you can see in the console that the first time you click Next, you will see the Firebase ID of -JX7ZlaB0QTa0Z47eu28 logged. That makes sense since it is the name/ID of the last message object in the first 10 that are returned to the page on page load. When you click Next again, we expect to see a similar looking message object name/ID but instead we just see the string messages logged to the console.
So it seems like the pageNext function is jumping up the data tree, from an individual message object to the whole entire messages object. And then when we press Next again we see this error
TypeError: Cannot read property 'name' of undefined
at h.$scope.pageNext (http://run.plnkr.co/plunks/zxp9wcKaMcfM2U0vAJhG/main.js:32:24)
So it looks like it jumps to the root of the data tree I guess which contains nothing. Any idea why this is happening and how to fix it?
Your messages only have a user and text property.
In the pageNextand pageBack methods, where you're getting the error, you're getting the last message and trying to read the name property which doesn't 'exist.
I'm guessing you meant to read the user from the last message?
In your pageNext and pageBack method you're referring to the wrong snapshot.
When I fix that, the plunker works:
messageRef.startAt(null, name).limit(numberOfItems).once('value', function(snapshot) {
snapshot.forEach(function(snapItem) {
var itemVal = snapItem.val();
itemVal.name = snapItem.name(); // was snapshot.name()
messages.push(itemVal);
});
deferred.resolve(messages);
});
I'm getting the following error, while using ExtJs MVC,
Uncaught TypeError: Cannot call method 'remove' of undefined
I traced the above error which goes to the line where i bind values from model to view,
Ext.getCmp('myForm').loadRecord(myModel);
Some of my form fields are disabled, and i'm still binding them. Is this the problem ?
The error occurs, whenever my model contains irregular data ( especially while trying to bind this unavailable data to a dual list ). Say my dual list contains item values like (A,B,C ) and when i'm trying to bind D, then this error occurs.