Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5795] ArrowDB - Cloud.Users.query not returning "photo"-field

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionHold
Resolution Date2018-08-10T17:34:06.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsArrow Cloud, ArrowDB
Labelsarrowdb
ReporterMathias Eklöf
AssigneeShak Hossain
Created2018-07-10T08:20:50.000+0000
Updated2018-08-10T17:34:06.000+0000

Description

Im using the ti.cloud module, with ArrowDB. All of a sudden, when fetching users from the development and production database - we're not receiving any "photo" field. We are, however, getting the "photo_id". And within the online platform for viewing all the data in our ArrowDB, we can see that each user has a profile picture attached to it so nothing wrong there. Everything worked up until 2 days ago. No idea what happened. Some code examples: var ArrowDB = require('ti.cloud'); this.getUsers = function(_params, _callback) { _conditions = { limit: 1000 }; if(_params) { _conditions.where = {}; for(var k in _params) { _conditions.where[k] = _params[k]; } } // Fetch all users ArrowDB.Users.query(_conditions, function(e) { if(e.success) { _callback(e.users); } else { _callback(); } }); }; // the e.users contains all the fetched users, but without the "photo" field.

Comments

  1. Mostafizur Rahman 2018-07-10

    Hello, Thanks for sharing with us. Do you receive any error ? It would be great if you share the test steps to reproduce the issue.
  2. Mathias Eklöf 2018-07-10

    No, no errors. As I try to explain, it's just a default API call which are done with the code I provided above. But just to be clear; var ArrowDB = require('ti.cloud'); ArrowDB.Users.query({ limit: 1000 }, function(e) { console.log(e.users); }); Those e.users doenst provide the "photo" field.
  3. Sharif AbuDarda 2018-07-10

    Hello, for photo, you have to call it by e.users.photo. See https://docs.appcelerator.com/arrowdb/latest/#!/api/Users-property-photo Thanks.
  4. Mathias Eklöf 2018-07-10

    Please guys, ready my issue. @Sharif, what you are referring to is exactly the bug here. There's no e.users.photo the user.photo-field is missing. And just to be clear, here's my response from Users.query: [INFO] : ( [INFO] : { [INFO] : admin = false; [INFO] : "confirmed_at" = "2018-07-09T13:45:20+0000"; [INFO] : "created_at" = "2018-07-09T13:45:20+0000"; [INFO] : "custom_fields" = { [INFO] : "fb_id" = 1xxxxxxxx0; [INFO] : online = 1; [INFO] : }; [INFO] : "external_accounts" = ( [INFO] : ); [INFO] : "first_name" = Mathias; [INFO] : "friend_counts" = { [INFO] : friends = 0; [INFO] : requests = 0; [INFO] : }; [INFO] : id = 5b4366f0eb0ec60221a45518; [INFO] : "last_name" = "Exxxxf"; [INFO] : "photo_id" = 5b4366f0eb0ec60221a45519; [INFO] : stats = { [INFO] : photos = { [INFO] : "total_count" = 0; [INFO] : }; [INFO] : storage = { [INFO] : used = 0; [INFO] : }; [INFO] : }; [INFO] : "updated_at" = "2018-07-10T16:32:53+0000"; [INFO] : username = "fb_1xxxxxxxx1"; [INFO] : } [INFO] : )
  5. Mathias Eklöf 2018-07-10

    This was just the wildest test I just did. I added: "response_json_depth: 2" to the sent parameters to Users.query. E.g: Users.query({ limit: 1000, response_json_depth: 2 }); This made it work. This should definitely be added to the documentation, I still think it's a bug..
  6. Mostafizur Rahman 2018-08-08

    Hello, Are you experiencing the issue now? Please let us know if you need more help on this. Thanks

JSON Source