-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
BUG: iPhone app cannot retrieve playlist tracks from API #89
Comments
resolution steps:
|
For reference, the urls of the iOS app's API calls are in that file: https://github.com/openwhyd/openwhyd-ios/blob/d700d5b45242301591fb5f098d1be4153b54f2b2/Whyd/Config.h#L125 |
Getting the following error in production, when trying to open a playlist from the iOS app: $ tail -F appd.err
===
Thu, 17 Aug 2017 13:54:02 GMT Error
at Console.error (/home/adrien/openwhyd/whydJS/app.js:23:45)
at /home/adrien/openwhyd/whydJS/app/models/post.js:78:13
at handleCallback (/home/adrien/openwhyd/whydJS/node_modules/mongodb/lib/utils.js:120:56)
at /home/adrien/openwhyd/whydJS/node_modules/mongodb/lib/cursor.js:857:22
at handleCallback (/home/adrien/openwhyd/whydJS/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:171:5)
at /home/adrien/openwhyd/whydJS/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:585:22
at queryCallback (/home/adrien/openwhyd/whydJS/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:212:16)
at /home/adrien/openwhyd/whydJS/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:469:18
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
model.fetchPosts ERROR on query { uId: '4d94501d1f78ac091dbc9b4d', 'pl.id': 61 } with params { sort: [ [ 'order', 'asc' ], [ '_id', 'desc' ] ],
limit: '1000,201' } : { MongoError: Failed to parse: { find: "post", filter: { uId: "4d94501d1f78ac091dbc9b4d", pl.id: 61 }, sort: { order: 1, _id: -1 }, limit: "1000,201" }. 'limit' field must be numeric.
at Function.MongoError.create (/home/adrien/openwhyd/whydJS/node_modules/mongodb/node_modules/mongodb-core/lib/error.js:31:11)
at queryCallback (/home/adrien/openwhyd/whydJS/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:212:36)
at /home/adrien/openwhyd/whydJS/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:469:18
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
name: 'MongoError',
message: 'Failed to parse: { find: "post", filter: { uId: "4d94501d1f78ac091dbc9b4d", pl.id: 61 }, sort: { order: 1, _id: -1 }, limit: "1000,201" }. \'limit\' field must be numeric.',
waitedMS: 0,
ok: 0,
errmsg: 'Failed to parse: { find: "post", filter: { uId: "4d94501d1f78ac091dbc9b4d", pl.id: 61 }, sort: { order: 1, _id: -1 }, limit: "1000,201" }. \'limit\' field must be numeric.',
code: 9 }
... while processing that request: $ tail -F appd.out
=== Thu, 17 Aug 2017 13:54:02 GMT GET /u/4d94501d1f78ac091dbc9b4d/playlist/61 (userLibrary.controller) {"format":"json","limit":["1000","20"],"id":"4d94501d1f78ac091dbc9b4d","playlistId":"61"}
fetching user { _id: 4d94501d1f78ac091dbc9b4d } ...
fetchPlaylists: 43.156ms
fetchStats: 22.654ms
fetchLikes: 1.150ms
fetchNbTracks: 8.472ms
=> fetched 0 posts
fetchAndRender: 3.656ms Anomaly: as seen in Consequence: in the corresponding db query, the value of Diagnostic:
Hypothesis:
|
(for diagnosis of bugs from external clients, like #89)
Progress: was able to reproduce the bug, by providing two values of the same => next step: check if the iOS does this. |
After activating the logging of GET parameters of incoming requests on openwhyd.org, I used the iOS app to open a playlist, and observed the following trace:
=> the iOS app is indeed sending two values for the |
Proposed solution:
|
for bug #89 => to be fixed on iOS client: openwhyd/openwhyd-ios#3
Issue #89: iPhone app cannot retrieve playlist tracks from API
Reported by Arasg:
Continuation of openwhyd/openwhyd-ios#1
=> API calls made by the iOS app are to be tested on the back-end
The text was updated successfully, but these errors were encountered: