I am trying to create a react native app for the first time and I get this weird error that I can't understand. this is my code :
update_signals = () => {
url = this.state.url + "action=get_signals"
fetch(url).then((response) => {
/** handling the response */
object = response.text()
if (typeof object === "undefined"){}else{
setTimeout(object.
then((text) => {
/** handling the text */
this.get_signals_form_response(text)
})
.catch((error) => {
/** some problem with getting text from response */
alert("some error : " + error.message)
})
,10000)
}
})
/** this catch is for total reject */
.catch((error) => {
alert("total error : " + error.message)
})
}
I click the button to see this work and after a few times of clicking the button and after working fine for the first a few times I get this error.
func.apply is not a function. In "func.apply(undefined,args)" func.apply is undefined
You can see the image in here :
Even when I Put it between try and catch block It doesn't handle it as an error.