Skip to content

Cannot edit User row #119

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

Closed
AmbroiseCollon opened this issue Mar 10, 2016 · 18 comments
Closed

Cannot edit User row #119

AmbroiseCollon opened this issue Mar 10, 2016 · 18 comments

Comments

@AmbroiseCollon
Copy link

I have been trying parse dashboard open source. And old hosted dashboard too. I've set them up so that they both access the same app hosted on heroku +mongodb. They both works fine.

On my User class, I've added an index column of type Number. I tried to edit my User manually in the dashboard to give each one an incrementing index. I've done it several times on open source dashboard and when I refresh the page my modification was not saved. While on hosted, it worked as expected the first time. Why is that ?

@peterdotjs
Copy link
Contributor

@AmbroiseCollon can you take a screenshot of the network/console when you try to update? It'll help determine if it's an issue with the server or the dashboard.

@AmbroiseCollon
Copy link
Author

Here is the request that is shot :

{"index":2,"_method":"PUT","_ApplicationId":"blablaf","_ClientVersion":"js1.6.14","_MasterKey":blabla","_InstallationId":"blabla"}`

And the headers :

Referer http://localhost:4040/apps/MyApp/browser/_User
Content-Type    text/plain
User-Agent  Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/601.4.4 (KHTML, like Gecko) Version/9.0.3 Safari/601.4.4
Origin  http://localhost:4040

But it keeps trying but never get a response. Which is weird because it works as I said on old hosted dashboard and all similar requests works perfectly on new open source dashboard. So it may be linked to user class ?

There is nothing in the console.

@peterdotjs
Copy link
Contributor

What version of parse-server are you running? By no response are you saying the request is in pending state? There were some issues with _User in parse server 2.1.4 that were resolved in 2.1.5.

@AmbroiseCollon
Copy link
Author

I have indeed an older version of Parse server. How is that linked to my issue though as it works on old dashboard ? Thanks !

@peterdotjs
Copy link
Contributor

Updating may or may not solve the issue but it'll be easier for us to troubleshoot if we're on the same versions. For now until we release a specific version I would recommend using the master branch of the dashboard the latest release version of Parse Server. Once you've updated let me know if you're still getting the issue and we'll go from there.

@AmbroiseCollon
Copy link
Author

I have updated to 2.1.5 and I still have the issue for all columns. Sorry that I wasn't on the last version.

@peterdotjs
Copy link
Contributor

Could you provide a screen shot of the the browser debugger network tab? When you said the request was "pending" it sounds like an issue with parse-server but a screenshot would help confirm this.

This request payload you listed above is for adding a new column for user which was the exact issue that 2.1.4 was having. This makes me suspect that 2.1.5 might not be getting picked up.

@AmbroiseCollon
Copy link
Author

Here you go ! Just to be really clear, I'm not adding a column, I am just editing a value in an existing column.
capture d ecran 2016-03-14 a 17 46 31

@peterdotjs
Copy link
Contributor

What is the response when you run the same curl command through a terminal?

It seems like your parse-server is unreachable which is odd since you've already gotten as far as this.

@AmbroiseCollon
Copy link
Author

I don't use curl but here is the response using the API Console :
"Cannot PUT /parse/classes/_User\n"

When I try to use the curl command exported from API console, I get {"error":"unauthorized"} but the url is api.parse.com so I guess this is normal.

@AmbroiseCollon
Copy link
Author

Btw, I've just updated to Parse Server 2.1.6 and it does not work either. But everything else still works fine (class creation, updates and addition in other class etc.).

@peterdotjs
Copy link
Contributor

In the curl command can you replace api.parse.com with that of your own parse server and reply with the response? The export curl command was fixed in #145.

@AmbroiseCollon
Copy link
Author

I've updated to last version to get the fix you mentioned :
Here is the curl response :

{"code":105,"error":"invalid key name: {\"index\":23}

But I'm not sure, that this is the answer I should get anyway because the API console behave differently. It doesn't give any response at all unless I pass a String instead of a Number. In that case API console answers :

{
    "code": 111,
    "error": "schema mismatch for _User.index; expected number but got string"
}

which looks good.

However if I reproduce this in curl, I get the same :

{"code":105,"error":"invalid key name: {\"index\":\"23\"}"}

So I'm guessing curl is not doing what he should anyway and that may be another issue.

@peterdotjs
Copy link
Contributor

I think there is something wrong with the query. Could you paste your query? As well as the type of value you are trying to add?

@AmbroiseCollon
Copy link
Author

capture d ecran 2016-03-16 a 10 51 02

When I use master key, I get the same result (nothing).

@peterdotjs
Copy link
Contributor

Unfortunately I'm unable to repro. Assuming you have an index field that is of number type - it works for me locally. As the curl command itself is failing it's an issue with parse-server and you should try posting an issue there. Seems specific to your data.

@AmbroiseCollon
Copy link
Author

Ok I'll do so. Thanks for having a look !

@grantespo
Copy link

Same Problem.

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

3 participants