Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Implementing Designs for Android Starting with Design Mockups Getting Up to Speed

adiel botbol
adiel botbol
651 Points

error on signing up

when i tried to sign up i got message "bad json response : org .json JSONexceptin : value invalid of type java.lang.string cannot be converted to JSONObject "

Hello,

In order to assist you further in debugging your code, we'll need to see the code that you are trying to run.

adiel botbol
adiel botbol
651 Points

its okay , in the next step i understood the need of Parse code , thanks

1 Answer

Pablo Rocha
Pablo Rocha
10,142 Points

That message is occuring when you the project is making a query to Parse and does not find any results for the query. After you "sign up" it executes the query to populate the friends list, but you have no friends yet. So the project is displaying the error in a dialog. You will get the same error if you close the app without checking any friends and then opening it back up.

I just removed the dialog code causing the error, I think it was the AlertDialog in FriendsFragment.java. We are logging it so that should be enough. Likewise, you could change the AlertDialog to inform the user that they have no friends.