google-alerts-api icon indicating copy to clipboard operation
google-alerts-api copied to clipboard

return state[state.length - 4] TypeError: Cannot read property 'length' of null

Open stylessh opened this issue 3 years ago • 6 comments

Throws this error sometimes while adding new alert.

Screenshot

image

stylessh avatar Dec 20 '21 21:12 stylessh

same problem

MauricioDonoso avatar Dec 27 '21 16:12 MauricioDonoso

Didn't found any way to fix this, I had to create a script that restart the server each time the library throws this error.

stylessh avatar Dec 27 '21 16:12 stylessh

Hey 👋🏻

Are you sure you call sync() before create()? It looks like the internal's state reference is null. It's a case only before authenticating.

adasq avatar Jan 18 '22 22:01 adasq

Hey 👋🏻

Are you sure you call sync() before create()? It looks like the internal's state reference is null. It's a case only before authenticating.

Yes, I was synced once. Then looping through each request to create a new alert. It works perfectly, but sometimes from nowhere just throws this error.

stylessh avatar Jan 19 '22 22:01 stylessh

I have the same issue. Did any of you find the reason why there is a problem?

altancodes avatar May 16 '22 11:05 altancodes

Not really, I just made a webhook that restarts the server each time it crashes...

I have the same issue. Did any of you find the reason why there is a problem?

stylessh avatar May 24 '22 23:05 stylessh