Closed Eladossa closed 5 years ago
Hello @dosaSpace,
First, please do not post any questions that do not relate to Instabug. you can use something like StackOverflow.
Second, you are passing null to the body please remove it and add empty Dictionary
.
@Kmohamed it's not a null that i'm passing, its a json object.
Could you try to pass empty object {}?
@Kmohamed nope, that imposible. This is the object I'm trying to pass - http://ruppinmobile.tempdomain.co.il/site15/WebService.asmx/SongsList
If you are trying to fetch the content of the file. So why you are using a POST request you should use a GET request.
@Kmohamed I get now the same error , now every time after the app is loaded for the first time.
You should remove the body from the request.
@Kmohamed o.k it's working good so far. but on the other function which is similar to this one (that I have on other screen) its has the same error.
I think you may need to subscribe to Instabug for this kind of support. 🤔
o.k but it's very complected to explain the bug. it's happening only after I send with another function a new string and then fethc it back...
Let’s move this conversation over email in order not to add unrelated questions on our public repo. Please email contactus@instabug.com and we could continue the conversation over there. Happy New Year 💥🎉
@Kmohamed o.k ill will send an email for you now, thanks
I'm new at React Native, I apologize in advance. Sometimes, but not everytime when the app is loaded for the first time and the main screen is showen, I get this error -
Exception '-[NSNull length]: unrecognized selector sent to instance 0x1e6c059b0' was thrown while invoking multiSet on target AsyncLocalStorage with params ( ( ( "@Ye-Music:songs", "null" )
this is the screenshot - https://ibb.co/JtWzYKV
The function that made the error - `async componentDidMount() {
}
allSongs = () => { console.log("allSongs function begin!"); fetch(URL + "/SongsList", { body: null, method: "POST", headers: { Accept: "application/json", "Content-type": "application/json; charset=UTF-8" } }) .then(res => { return res.json(); }) .then(songsResult => { AsyncStorage.setItem("@Ye-Music:songs", songsResult.d); }) .catch(err => { console.error(err); }); }; `
Can anyone please tell me why is this erorr happening and how should I fix it?