Skip to content

Unable to Register Account (Android) #413

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
vusimoy0 opened this issue Feb 14, 2016 · 6 comments
Closed

Unable to Register Account (Android) #413

vusimoy0 opened this issue Feb 14, 2016 · 6 comments

Comments

@vusimoy0
Copy link

Hi
I followed the DO guide on others as to how to get the parse server up and running, however i'm having issues registering a user from the android side.

Attachments at the bottom..

For some reason in the error logs , when i enable logging, i immediately get "Request failed" together with a couple of retry's until the request just times out. I have double checked my android permissions and know that the manifest is correct from a standard android setup point of view.

I also telnetted to my server on both the mongo port and the parse port and could connect. Then did the Curl test and managed to generate data (including the get request as well as logging into the db with robomongo and verifying data).

Any idea where i could be going wrong?

Thanks
applicationlog.txt

index.txt
parse_android.txt

@matthewrice345
Copy link

  1. First Question: Are these keys really set in the index.js?
    appId: 'app-id', masterKey: 'master', fileKey: 'fileKey',
  2. Second thing is that in my setup I did not set the serverUrl in my index.js and it works fine, push notifications also work so perhaps that's not needed?
  3. In your Android code use "http://myserverhostname:9988/parse/" Note the "/" at the end. If you closely look at the index.js you'll see why. This is for sure an issue.
  4. I would definitely use an interceptor to see the network calls and headers to see what's going on. Check out my article on parse-server push notifications for the gradle and configuration you'll need to see what's going on with any mistakes in your network requests.
    Parse-Server Push Notification Tutuorial

@vusimoy0
Copy link
Author

Hi

Thanks - yes i had really put the required parameters... had omitted them here for obvious reasons :)

I did as you suggested by adding a / at the end of the parse path however the connection still fails with the following:

02-17 19:07:49.497 5534-5555/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7fe81ec63770
02-17 19:07:49.505 5534-5534/? W/System.err: com.parse.ParseRequest$ParseRequestException: This authentication method is unsupported.
02-17 19:07:49.505 5534-5534/? W/System.err: at com.parse.ParseRequest.newPermanentException(ParseRequest.java:270)
02-17 19:07:49.505 5534-5534/? W/System.err: at com.parse.ParseRESTCommand.onResponseAsync(ParseRESTCommand.java:301)
02-17 19:07:49.505 5534-5534/? W/System.err: at com.parse.ParseRESTUserCommand.onResponseAsync(ParseRESTUserCommand.java:126)
02-17 19:07:49.505 5534-5534/? W/System.err: at com.parse.ParseRequest$3.then(ParseRequest.java:137)
02-17 19:07:49.505 5534-5534/? W/System.err: at com.parse.ParseRequest$3.then(ParseRequest.java:133)

When i debug the app with Stetho, i get the following:

Request

URL:http://serverip:1337/parse/classes/_User
Request Method:POST
Status Code:400 Bad Request
Request Headers
Provisional headers are shown
Content-Length:68
Content-Type:application/json
User-Agent:Parse Android SDK 1.13.0 (com.pulse.parsetest/1) API Level 23
X-Parse-App-Build-Version:1
X-Parse-App-Display-Version:1.0
X-Parse-Application-Id: app_id
X-Parse-Client-Key: client_key
X-Parse-Client-Version:a1.13.0
X-Parse-Installation-Id:c8c69739-9053-426e-8e60-87957857a929
X-Parse-OS-Version:6.0
Request Payloadview source
{username: "pulse19890801", password: "password1234", authData: {}}
authData: {}
password: "password1234"
username: `"pulse19890801"

I also deleted the server detail from the index.js. No difference...

@KunalKathrotia
Copy link

Hi i am facing this same issue, did you get any solution? I haven't tried but this fileKey is what is currently missing in my index.js file, so is it necessary?

@gfosco
Copy link
Contributor

gfosco commented Feb 26, 2016

I just submitted a PR to address this, #679

drew-gross added a commit that referenced this issue Feb 26, 2016
Fix for #413 - support empty authData on signup
@vusimoy0
Copy link
Author

Hi

Thanks for the update... not sure if this was updated elsewhere and is working with parse example project?

I deleted my parse directory from the server, clone parse example then ran npm install and got it up and running. The auth data thing is still an issue. I can however create Objects without a problem.

Not sure if i am missing something?

raw java code attached. together with the network code and errors.

Request URL:http://serverurl.domain/parse/classes/_User
Request Method:POST
Status Code:400 Bad Request
Request Headers
Provisional headers are shown
Content-Length:64
Content-Type:application/json
User-Agent:Parse Android SDK 1.13.0 (com.pulse.parsetest/1) API Level 23
X-Parse-App-Build-Version:1
X-Parse-App-Display-Version:1.0
X-Parse-Application-Id: appiD
X-Parse-Client-Key:clientKey
X-Parse-Client-Version:a1.13.0
X-Parse-Installation-Id:a4dfe2c2-a8cb-4ee6-9cdc-acb3950fb918
X-Parse-OS-Version:6.0
Request Payloadview source
{username: "pulse1989", password: "password1234", authData: {}}
authData: {}
password: "password1234"
username: "pulse1989"

Error:
{"code":252,"error":"This authentication method is unsupported."}

android.txt

@gfosco
Copy link
Contributor

gfosco commented Mar 6, 2016

I wrote a test for this in #863. Not able to reproduce. Make sure you're using the latest version, check your package.json and run npm update. If you have further issues, please open a new issue. Thanks.

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