parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

"java.lang.IllegalStateException: Call fetchIfNeeded()" when calling remove() on a already null field

Open degenddy opened this issue 10 years ago • 11 comments

I noticed another Error that doesn't happens on Parse.com hosted server when trying to call "remove" on a null text field I get this error: "java.lang.IllegalStateException: ParseObject has no data for 'alternateEmail'. Call fetchIfNeeded() to get the data." the android code that causes this is this: super.remove("alternateEmail"); with the Parse hosted server I never get this error. Can you please fix it? Thanks!

degenddy avatar Mar 08 '16 22:03 degenddy

The server shouldn't really affect this issue, and from looking at the android source, I don't see why this error could be thrown during a remove call. https://github.com/ParsePlatform/Parse-SDK-Android/blob/f439b3d3ba02eaad52e653b6890b3a10e74168da/Parse/src/main/java/com/parse/ParseObject.java#L157

How are you getting the object?

gfosco avatar Mar 09 '16 15:03 gfosco

It's a reference from the CurrentUser object. And as I said it works well on the parse.com hosted server, so there shouldn't be a difference.

degenddy avatar Mar 09 '16 16:03 degenddy

any update on this? I actually tried even calling fetchInBackground before calling "remove" but still the same error. trying to call "put" with a null value cases a different exception (as in parse.com hosted site) so that isn't an option either. Can you please check this?

degenddy avatar Mar 10 '16 22:03 degenddy

??????

degenddy avatar Mar 23 '16 23:03 degenddy

This sounds like an issue with the Android SDK. Can you open an issue over there?

drew-gross avatar Mar 30 '16 20:03 drew-gross

How could it be an issue with android sdk? The server is the one throwin the exception. Also, this happens only on parse-server. Not on parse.com.

degenddy avatar Mar 31 '16 07:03 degenddy

In that case can you provide some more details about what exception the server is throwing? Your original issue mentioned a java language exception, which is part of the Android SDK, not the server. If you could provide some consistent repro steps, that would be ideal.

drew-gross avatar Mar 31 '16 07:03 drew-gross

I'll do that ASAP. But I don't think there was any exception printed to the log.

degenddy avatar Mar 31 '16 10:03 degenddy

No response in many days, closing.

drew-gross avatar Apr 07 '16 07:04 drew-gross

Dude, I don't have time for this at the moment. But this is a serious issue. Can you try to reproduce? IMHO you need to take a look into this. But for now I abandoned parse-server because of all these differences from the parse.com server.

degenddy avatar Apr 07 '16 08:04 degenddy

We did try to reproduce and weren't able to. If you can post a small example code that reproduces the error, or a cURL request that has different behaviour on Parse.com and Parse Server (the API Console can help with that) then we will be able to help.

drew-gross avatar Apr 07 '16 16:04 drew-gross