Closed IRediTOTO closed 3 years ago
Error from here: ``` at Gmailpush._initialize (/app/node_modules/gmailpush/lib/gmailpush.js:114:33)
// Call watch() to extend watch expiration for 7 days
prevHistory.watchExpiration = await this._refreshWatch();
What is content of gmailpush_history.json
? Is that something like the following?
[
{
"emailAddress": "mailA@gmai.com",
"prevHistoryId": 60039,
"watchExpiration": null
},
{
"emailAddress": "mailA@gmai.com",
"prevHistoryId": 60134,
"watchExpiration": null
},
{
"emailAddress": "mailA@gmai.com",
"prevHistoryId": 60143,
"watchExpiration": null
},
{
"emailAddress": "mailB@gmai.com",
"prevHistoryId": 6141093,
"watchExpiration": 1607275262534
}
]
Or does it look like this?
{
data: [
{
"emailAddress": "mailA@gmai.com",
"prevHistoryId": 60039,
"watchExpiration": null
},
{
"emailAddress": "mailA@gmai.com",
"prevHistoryId": 60134,
"watchExpiration": null
},
{
"emailAddress": "mailA@gmai.com",
"prevHistoryId": 60143,
"watchExpiration": null
},
{
"emailAddress": "mailB@gmai.com",
"prevHistoryId": 6141093,
"watchExpiration": 1607275262534
}
]
}
Like this: { data: [ { "emailAddress": "mailA@gmai.com", "prevHistoryId": 60039, "watchExpiration": null }, { "emailAddress": "mailA@gmai.com", "prevHistoryId": 60134, "watchExpiration": null }, { "emailAddress": "mailA@gmai.com", "prevHistoryId": 60143, "watchExpiration": null }, { "emailAddress": "mailB@gmai.com", "prevHistoryId": 6141093, "watchExpiration": 1607275262534 } ] }
But I fixed by use just one gmail... One email is ok. But too will throw this error canot set property "watchExpiration" of undefine
Now it fine, just like this
{"data":"[{\"emailAddress\":\"Aemail@gmail.com\",\"prevHistoryId\":61582,\"watchExpiration\":1607312287554}]"}
gmailpush_history.json
should not have data
key in it. Do you know why your gmailpush_history.json
has data
key?
Just checked, the data key gone now. I just copied so it have data key. I don't understand too. But I just use one email so it work fine :c
Hi I getting this, I don't understand why :( Can you give me an idea?
{"data":"[{\"emailAddress\":\"mailA@gmai.com\",\"prevHistoryId\":60039,\"watchExpiration\":null},{\"emailAddress\":\"mailA@gmai.com\",\"prevHistoryId\":60134,\"watchExpiration\":null},{\"emailAddress\":\"mailA@gmai.com\",\"prevHistoryId\":60143,\"watchExpiration\":null} // but this not, i dont understand why,{\"emailAddress\":\"mailB@gmai.com\",\"prevHistoryId\":6141093,\"watchExpiration\":1607275262534}]"} // this work fine