wayneashleyberry / wunderline

✅️ Command-line client for Wunderlist, the easiest way to get stuff done.
https://git.io/vM45l
MIT License
309 stars 29 forks source link

Wunderline cannot push or see items from the website #53

Closed mruessler closed 8 years ago

mruessler commented 9 years ago

I am using Wunderline on a linux system. wunderline whoami does work and shows my account information. But tasks that are created are not pushed to the website. I also cannot see website tasks on the commandline. I am using version 3.3.2

mruessler commented 9 years ago

So, how can I get debug information or a log file to see what Wunderline is doing?

wayneashleyberry commented 9 years ago
NODE_DEBUG=request wunderline inbox
mruessler commented 9 years ago

This gives me the following output:

REQUEST { method: 'get',
  json: true,
  baseUrl: 'https://a.wunderlist.com/api/v1',
  headers:
   { 'X-Access-Token': '*****',
     'X-Client-ID': '#####' },
  uri: '/lists',
  callback: [Function] }
REQUEST make request https://a.wunderlist.com/api/v1/lists
REQUEST onRequestResponse https://a.wunderlist.com/api/v1/lists 200 { 'cache-control': 'max-age=0, private, must-revalidate',
  'content-type': 'application/json',
  date: 'Tue, 28 Jul 2015 07:22:28 GMT',
  server: 'nginx',
  'x-current-user-id': '17354948',
  'x-request-id': 'af8cc6da-9db1-4647-8a88-d6b8e5afb965-8148',
  'content-length': '176',
  connection: 'Close' }
REQUEST finish init function https://a.wunderlist.com/api/v1/lists
REQUEST response end https://a.wunderlist.com/api/v1/lists 200 { 'cache-control': 'max-age=0, private, must-revalidate',
  'content-type': 'application/json',
  date: 'Tue, 28 Jul 2015 07:22:28 GMT',
  server: 'nginx',
  'x-current-user-id': '17354948',
  'x-request-id': 'af8cc6da-9db1-4647-8a88-d6b8e5afb965-8148',
  'content-length': '176',
  connection: 'Close' }
REQUEST end event https://a.wunderlist.com/api/v1/lists
REQUEST has body https://a.wunderlist.com/api/v1/lists 176
REQUEST emitting complete https://a.wunderlist.com/api/v1/lists
REQUEST { method: 'get',
  json: true,
  baseUrl: 'https://a.wunderlist.com/api/v1',
  headers:
   { 'X-Access-Token': '*****',
     'X-Client-ID': '#####' },
  url: '/tasks',
  qs: { list_id: 168099849 },
  callback: [Function] }
REQUEST { method: 'get',
  json: true,
  baseUrl: 'https://a.wunderlist.com/api/v1',
  headers:
   { 'X-Access-Token': '*****',
     'X-Client-ID': '#####' },
  url: '/subtasks',
  qs: { list_id: 168099849 },
  callback: [Function] }
REQUEST make request https://a.wunderlist.com/api/v1/tasks?list_id=168099849
REQUEST make request https://a.wunderlist.com/api/v1/subtasks?list_id=168099849
REQUEST onRequestResponse https://a.wunderlist.com/api/v1/tasks?list_id=168099849 200 { 'cache-control': 'max-age=0, private, must-revalidate',
  'content-type': 'application/json',
  date: 'Tue, 28 Jul 2015 07:22:29 GMT',
  server: 'nginx',
  'x-current-user-id': '17354948',
  'x-request-id': '0122d4e1-a0b4-4659-8e5c-c9840a9a70b8-8149',
  'content-length': '392',
  connection: 'Close' }
REQUEST finish init function https://a.wunderlist.com/api/v1/tasks?list_id=168099849
REQUEST response end https://a.wunderlist.com/api/v1/tasks?list_id=168099849 200 { 'cache-control': 'max-age=0, private, must-revalidate',
  'content-type': 'application/json',
  date: 'Tue, 28 Jul 2015 07:22:29 GMT',
  server: 'nginx',
  'x-current-user-id': '17354948',
  'x-request-id': '0122d4e1-a0b4-4659-8e5c-c9840a9a70b8-8149',
  'content-length': '392',
  connection: 'Close' }
REQUEST end event https://a.wunderlist.com/api/v1/tasks?list_id=168099849
REQUEST has body https://a.wunderlist.com/api/v1/tasks?list_id=168099849 392
REQUEST emitting complete https://a.wunderlist.com/api/v1/tasks?list_id=168099849
REQUEST onRequestResponse https://a.wunderlist.com/api/v1/subtasks?list_id=168099849 200 { 'cache-control': 'max-age=0, private, must-revalidate',
  'content-type': 'application/json',
  date: 'Tue, 28 Jul 2015 07:22:29 GMT',
  server: 'nginx',
  'x-current-user-id': '17354948',
  'x-request-id': 'e5806215-caa5-4c3e-a62c-6bbc158caf76-8149',
  'content-length': '2',
  connection: 'Close' }
REQUEST finish init function https://a.wunderlist.com/api/v1/subtasks?list_id=168099849
REQUEST response end https://a.wunderlist.com/api/v1/subtasks?list_id=168099849 200 { 'cache-control': 'max-age=0, private, must-revalidate',
  'content-type': 'application/json',
  date: 'Tue, 28 Jul 2015 07:22:29 GMT',
  server: 'nginx',
  'x-current-user-id': '17354948',
  'x-request-id': 'e5806215-caa5-4c3e-a62c-6bbc158caf76-8149',
  'content-length': '2',
  connection: 'Close' }
REQUEST end event https://a.wunderlist.com/api/v1/subtasks?list_id=168099849
REQUEST has body https://a.wunderlist.com/api/v1/subtasks?list_id=168099849 2
REQUEST emitting complete https://a.wunderlist.com/api/v1/subtasks?list_id=168099849

…followed by my tasks. Again, these are only the two tasks from wunderline. My account tasks do not appear.

wayneashleyberry commented 9 years ago

hey @mruessler, would you mind installing 4.0.1 and trying again?

mruessler commented 9 years ago

@wayneashleyberry sure, I have attached a new try. Unfortunately, it still does not work. I tried the new commands, added a new item to a list, and also created a new list. Still, the terminal does not understand the server–no information from my account comes in or can be seen in the web version.

$ NODE_DEBUG=request wunderline inbox
REQUEST { method: 'get',
  json: true,
  baseUrl: 'https://a.wunderlist.com/api/v1',
  headers: 
   { 'X-Access-Token': '*****',
     'X-Client-ID': '#####' },
  uri: '/lists',
  callback: [Function] }
REQUEST make request https://a.wunderlist.com/api/v1/lists
REQUEST onRequestResponse https://a.wunderlist.com/api/v1/lists 200 { 'cache-control': 'max-age=0, private, must-revalidate',
  'content-type': 'application/json',
  date: 'Tue, 04 Aug 2015 12:46:34 GMT',
  server: 'nginx',
  'x-current-user-id': '17354948',
  'x-request-id': 'e59dc7b1-e9c1-45b0-940f-231f09bbeab9-2394',
  'content-length': '349',
  connection: 'Close' }
REQUEST finish init function https://a.wunderlist.com/api/v1/lists
REQUEST response end https://a.wunderlist.com/api/v1/lists 200 { 'cache-control': 'max-age=0, private, must-revalidate',
  'content-type': 'application/json',
  date: 'Tue, 04 Aug 2015 12:46:34 GMT',
  server: 'nginx',
  'x-current-user-id': '17354948',
  'x-request-id': 'e59dc7b1-e9c1-45b0-940f-231f09bbeab9-2394',
  'content-length': '349',
  connection: 'Close' }
REQUEST end event https://a.wunderlist.com/api/v1/lists
REQUEST has body https://a.wunderlist.com/api/v1/lists 349
REQUEST emitting complete https://a.wunderlist.com/api/v1/lists
REQUEST response body [ { id: 168099849,
    title: 'inbox',
    owner_type: 'user',
    owner_id: 17354948,
    list_type: 'inbox',
    public: false,
    revision: 3,
    created_at: '2015-07-20T07:47:34.041Z',
    type: 'list' },
  { id: 169910455,
    title: 'Work',
    owner_type: 'user',
    owner_id: 17354948,
    list_type: 'list',
    public: false,
    revision: 2,
    created_at: '2015-08-04T12:40:46.018Z',
    type: 'list' } ]
REQUEST { method: 'get',
  json: true,
  baseUrl: 'https://a.wunderlist.com/api/v1',
  headers: 
   { 'X-Access-Token': '*****',
     'X-Client-ID': '#####' },
  url: '/tasks',
  qs: { list_id: 168099849 },
  callback: [Function] }
REQUEST { method: 'get',
  json: true,
  baseUrl: 'https://a.wunderlist.com/api/v1',
  headers: 
   { 'X-Access-Token': '*****',
     'X-Client-ID': '#####' },
  url: '/subtasks',
  qs: { list_id: 168099849 },
  callback: [Function] }
REQUEST make request https://a.wunderlist.com/api/v1/tasks?list_id=168099849
REQUEST make request https://a.wunderlist.com/api/v1/subtasks?list_id=168099849
REQUEST onRequestResponse https://a.wunderlist.com/api/v1/tasks?list_id=168099849 200 { 'cache-control': 'max-age=0, private, must-revalidate',
  'content-type': 'application/json',
  date: 'Tue, 04 Aug 2015 12:46:34 GMT',
  server: 'nginx',
  'x-current-user-id': '17354948',
  'x-request-id': 'cca3728a-0bd8-481f-a62d-ad3eee72954d-2394',
  'content-length': '392',
  connection: 'Close' }
REQUEST finish init function https://a.wunderlist.com/api/v1/tasks?list_id=168099849
REQUEST response end https://a.wunderlist.com/api/v1/tasks?list_id=168099849 200 { 'cache-control': 'max-age=0, private, must-revalidate',
  'content-type': 'application/json',
  date: 'Tue, 04 Aug 2015 12:46:34 GMT',
  server: 'nginx',
  'x-current-user-id': '17354948',
  'x-request-id': 'cca3728a-0bd8-481f-a62d-ad3eee72954d-2394',
  'content-length': '392',
  connection: 'Close' }
REQUEST end event https://a.wunderlist.com/api/v1/tasks?list_id=168099849
REQUEST has body https://a.wunderlist.com/api/v1/tasks?list_id=168099849 392
REQUEST emitting complete https://a.wunderlist.com/api/v1/tasks?list_id=168099849
REQUEST onRequestResponse https://a.wunderlist.com/api/v1/subtasks?list_id=168099849 200 { 'cache-control': 'max-age=0, private, must-revalidate',
  'content-type': 'application/json',
  date: 'Tue, 04 Aug 2015 12:46:34 GMT',
  server: 'nginx',
  'x-current-user-id': '17354948',
  'x-request-id': '4228e0f0-525c-4da0-a763-39bfdfeb6f2c-2394',
  'content-length': '2',
  connection: 'Close' }
REQUEST finish init function https://a.wunderlist.com/api/v1/subtasks?list_id=168099849
REQUEST response end https://a.wunderlist.com/api/v1/subtasks?list_id=168099849 200 { 'cache-control': 'max-age=0, private, must-revalidate',
  'content-type': 'application/json',
  date: 'Tue, 04 Aug 2015 12:46:34 GMT',
  server: 'nginx',
  'x-current-user-id': '17354948',
  'x-request-id': '4228e0f0-525c-4da0-a763-39bfdfeb6f2c-2394',
  'content-length': '2',
  connection: 'Close' }
REQUEST end event https://a.wunderlist.com/api/v1/subtasks?list_id=168099849
REQUEST has body https://a.wunderlist.com/api/v1/subtasks?list_id=168099849 2
REQUEST emitting complete https://a.wunderlist.com/api/v1/subtasks?list_id=168099849
INBOX (2)
item 1                                                                    ☆
item 2                                                                    ☆
wayneashleyberry commented 9 years ago

The inbox is actually being returned at the end there though...

INBOX (2)
item 1                                                                    ☆
item 2                                                                    ☆
mruessler commented 9 years ago

True, but the two items have been created via wunderline, and never appeared on the website. Furthermore, the current items from my inbox (added via website) do not appear in the inbox as shown by wunderline.

wayneashleyberry commented 9 years ago

If you run wunderline whoami do you get the same email address and email address that you're logging into the website with?

mruessler commented 9 years ago

Yes, I get the correct account information. After installing 4.0.1 I entered my client id and access token again and checked whether it worked. In principle wunderline is able to read from the account…

wayneashleyberry commented 8 years ago

Hi @mruessler, are you still having issues?

mruessler commented 8 years ago

Hi @wayneashleyberry, sorry for not getting back earlier. I just updated to 4.1.6 and tried the new version. At first, the issue seemed to persist. Then, I could see a new task which I created in the browser in wunderline. I also used flush to renew my authentication. But now I experience a different issue:

/usr/lib/node_modules/wunderline/wunderline-auth.js:47
    console.log('Thanks ' + body.name.split(' ')[0] + ', Wunderline has been authenticated.')
                                     ^

TypeError: Cannot read property 'split' of undefined
    at Request._callback (/usr/lib/node_modules/wunderline/wunderline-auth.js:47:38)
    at Request.self.callback (/usr/lib/node_modules/wunderline/node_modules/request/request.js:198:22)
    at emitTwo (events.js:100:13)
    at Request.emit (events.js:185:7)
    at Request.<anonymous> (/usr/lib/node_modules/wunderline/node_modules/request/request.js:1035:10)
    at emitOne (events.js:95:20)
    at Request.emit (events.js:182:7)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/wunderline/node_modules/request/request.js:962:12)
    at emitNone (events.js:85:20)
    at IncomingMessage.emit (events.js:179:7)

This message is thrown at me after entering the access token. When I use wunderline -V I get

undefined <undefined>
Authenticated at 2016-01-22T08:24:18.624Z

So I am not really sure whether I can check for my original issue.

mruessler commented 8 years ago

Small update: I updated to version 4.1.7 and now have a slightly different error.

$ wl inbox
/usr/lib/node_modules/wunderline/lib/get-inbox.js:29
    var lists = body.filter(function (item) {
                     ^

TypeError: body.filter is not a function
    at Request._callback (/usr/lib/node_modules/wunderline/lib/get-inbox.js:29:22)
    at Request.self.callback (/usr/lib/node_modules/wunderline/node_modules/request/request.js:199:22)
    at emitTwo (events.js:100:13)
    at Request.emit (events.js:185:7)
    at Request.<anonymous> (/usr/lib/node_modules/wunderline/node_modules/request/request.js:1036:10)
    at emitOne (events.js:95:20)
    at Request.emit (events.js:182:7)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/wunderline/node_modules/request/request.js:963:12)
    at emitNone (events.js:85:20)
    at IncomingMessage.emit (events.js:179:7)
Thor77 commented 8 years ago

That's not related to this issue, but to #62

mruessler commented 8 years ago

After updating to 4.2.0 my problems vanished. Now everything works as expected.