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

Parse User table doesn't update for just a specific user #2812

Closed
devKC opened this issue Oct 2, 2016 · 10 comments
Closed

Parse User table doesn't update for just a specific user #2812

devKC opened this issue Oct 2, 2016 · 10 comments

Comments

@devKC
Copy link

devKC commented Oct 2, 2016

Issue Description

[Parse User table is not updating for just one specific user. All other users are able to update their own User attributes.]

Describe your issue in as much detail as possible.

[I have a simple code to change a user attribute from False to True. When a user clicks a button, below code is ran. The "TorF" is set to false as default, and if users click the button it will change to True. The value changes to True for all users except for just one specific user. I have verified that the user in question has a valid PFUser.current() value and is logged in properly. In other parts of the app, when a user creates a record in another class I added a "User" column to record which user created the data. The user in question is able to create a record and record shows that the user created it (PFUser.current() is tied to the record). It looks like for some reason only PFUser table is not updating properly for this user.

    PFUser.current()?["TorF"] = true
        PFUser.current()?.saveInBackground(block: { (success, error) in

            if error != nil {

                print(error)

            } else {


            }
        })

****EDIT
I'm not sure if this helps in identifying the issue, but only this user doesn't get a "deviceToken" assigned in Installation class. The installation seems to be successful because a record is created showing "ios" and the User Pointer I attach to each installation is saved properly. Again, for all other users/devices "deviceToken" is generated and saved to each installation.
]

Steps to reproduce

Please include a detailed list of steps that reproduce the issue. Include curl commands when applicable.

[PFUser.current()?["TorF"] = true
        PFUser.current()?.saveInBackground(block: { (success, error) in

            if error != nil {

                print(error)

            } else {

            }
        })]

Expected Results

[TorF column updates to True for the user.]

Actual Outcome

[TorF column is not updated at all. Default "createdAt" column is not updated either, so the user is not updating his own record. Again, for all other users this works perfectly.]

Environment Setup

  • Server
    • parse-server version (Be specific! Don't say 'latest'.) : [2.2.22]
    • Operating System: [cedar-14 Ubuntu 14.04]
    • Hardware: [Heroku dyno?]
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): [Heroku]
  • Database
    • MongoDB version: [3.2.9]
    • Storage engine: [FILL THIS OUT]
    • Hardware: [FILL THIS OUT]
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): [mLab]

Logs/Trace

You can turn on additional logging by configuring VERBOSE=1 in your environment.

[No error recorded on Heroku logs]

@FridaySG
Copy link

FridaySG commented Oct 3, 2016

How are you checking the value? Via the Parse Dashboard?

@devKC
Copy link
Author

devKC commented Oct 3, 2016

Yes, I am checking the value via the Parse Dashboard.

@FridaySG
Copy link

FridaySG commented Oct 3, 2016

Try refreshing via your browser (F5) rather than the Parse Dashboard when you check the value. I noticed on my end that the values don't refresh when you refresh from the dashboard. Let me know if that works.

@devKC
Copy link
Author

devKC commented Oct 3, 2016

I just checked, and it's not Parse Dashboard related. Also, the the app is supposed to restrict the user from taking a certain action if "TorF" is changed to True, and I've confirmed that the user is able to take that action repeatedly without restriction.

@hramos
Copy link
Contributor

hramos commented Oct 4, 2016

There's no Parse Server version 1.15.2, as it starts at 2.x. At this point this seems like this question is better suited for Stack Overflow.

@hramos hramos closed this as completed Oct 4, 2016
@devKC
Copy link
Author

devKC commented Oct 4, 2016

I don't think that's fair. I accidentally put the wrong version, but nonetheless this is a Parse related issue. It has nothing to do with my coding as described above. I had a ^1.15.2 for parse-server in my package.json and forgot that node installs the latest version. I verified that I am running parse-server version 2.15.0, and have updated the post accordingly. I don't see how you can close this without even checking to see if there could be something going on on the parse-server end. If you can explain to me why this is not a Parse-Server question and better suited for Stackoverflow, I will be happy to post it there, but I ask that you re-open this issue in the meantime.

Thank you.

@flovilmart
Copy link
Contributor

2.15.0 is not a parse-server version either.. the last version is 2.2.22

@devKC
Copy link
Author

devKC commented Oct 5, 2016

Thank you for the information. I updated to 2.2.22 and the issue still remains. Only the one user is unable to update his own User class. The code is as simple as I have described above and therefore I can't see how this could be an issue on the client-side, which is why I posted the question here.

@hramos
Copy link
Contributor

hramos commented Oct 7, 2016

I closed #2843 as a duplicate of this. Instead of opening new issues, lets work together and see if this issue can be re-opened.

From what I can tell, you're describing a problem you've run into while using Parse Server. However, it does not appear to describe, as of this writing, a specific way in which Parse Server fails to work as expected. Perhaps I'm missing something. The best way to isolate the issue from anything client-side related is to provide repro steps using curl as the template suggests.

I suggest that you use Stack Overflow for general debugging, and update this issue once you can confirm that Parse Server is failing to process your request as expected.

@devKC
Copy link
Author

devKC commented Oct 12, 2016

Thank you for your reply, I appreciate you being open to revisiting this issue. I am a little bit confused in terms of how to better describe this issue. My app users use Parse REST API (integrated with Parse SDK) to make updates to their own records in User class. However, only one user is unable to make updates. There is no difference in coding/commands that this user is using that is different from all other users. If REST API fails for just one user, I thought the issue would be on Parse Server side.

Regarding curl- I'm guessing users don't include App-ID/Master-Key when posting it on here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants