Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Cloud users login = invalid but create = already exists

$
0
0

I am getting a lot of error reports from users of my app about TI cloudPush. Perhaps I am doing something wrong, but I can't figure out what. Especially because 80% of the times it just works, I myself have never seen the error.

Background: In my app I store the createUDID value, and the user's account ID (a 10 character code registered on my own webserver). I use the UDID as the cloud login username, the accountID as the password. The accountID is also the channel the user will subscribe to so they can send push notifications to their own devices.

Errors:

When the user starts I try to login, this generates an error ni the cloud logs:

Response Status     401
Response Message    Invalid email/username and password
Parameters  { "action" => "create", "controller" => "user_sessions", "key" => "xxxmyappkeyxxx", "version" => "v1", "format" => "json", "password" => "[FILTERED]", "login" => "xxxTIUDIDxxx", "suppress_response_codes" => "true" }
On fail I try to create that user:
Request Name    POST /v1/users/create.json
Response Status     400
Response Message    Failed to create user: Validation failed - Username is already taken.
Parameters  { "username" => "xxxTIUDIDxxx", "action" => "create", "controller" => "users", "key" => "xxxmyappkeyxxx", "version" => "v1", "format" => "json", "password" => "[FILTERED]", "suppress_response_codes" => "true", "password_confirmation" => "[FILTERED]" }
My source code basically just follows the user sessions example.

For the users that have reported these issues I have tried to lookup their UDIDs in the "Subscribed devices" list in the cloud admin pages (nice that you can't filter there...), but they don't even show up, neither do the accountIDs (= channel in TI cloud).

Can anyone point out what might be causing this? Why do I get the invalid username and password first, but username is already taken after that?


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>