Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
daviddayag opened this issue Mar 8, 2016 · 11 comments
Labels
type:question Support or code-level question

Comments

@daviddayag
Copy link

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!

@gfosco
Copy link
Contributor

gfosco commented Mar 9, 2016

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?

@daviddayag
Copy link
Author

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.

@daviddayag
Copy link
Author

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?

@daviddayag
Copy link
Author

??????

@drew-gross
Copy link
Contributor

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

@daviddayag
Copy link
Author

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.

@drew-gross
Copy link
Contributor

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.

@daviddayag
Copy link
Author

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

@drew-gross
Copy link
Contributor

No response in many days, closing.

@daviddayag
Copy link
Author

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.

@drew-gross
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Support or code-level question
Projects
None yet
Development

No branches or pull requests

4 participants