Giter VIP home page Giter VIP logo

Comments (35)

moranje avatar moranje commented on June 12, 2024

I really need to know what it is you entered into Alfred. "Nothing works" is hardly something I can reproduce.

from alfred-workflow-todoist.

repercussion avatar repercussion commented on June 12, 2024

Literally anything to do with this workflow.

t:
todo
todos
todo: settings

from alfred-workflow-todoist.

repercussion avatar repercussion commented on June 12, 2024

Here's me trying to do a t:

[2018-10-03 22:37:04][ERROR: input.scriptfilter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON:
TypeError: Cannot read property 'explanation' of undefined
Stack: TypeError: Cannot read property 'explanation' of undefined
    at /Users/***/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6CFE4471-B485-43B7-9745-D0DE93A90AA2/alfred-workflow-todoist.js:31713:59
    at Array.forEach (<anonymous>)
    at Object.init (/Users/***/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6CFE4471-B485-43B7-9745-D0DE93A90AA2/alfred-workflow-todoist.js:31709:31)
    at Stamp (/Users/***/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6CFE4471-B485-43B7-9745-D0DE93A90AA2/alfred-workflow-todoist.js:5901:1207)
    at /Users/***/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6CFE4471-B485-43B7-9745-D0DE93A90AA2/alfred-workflow-todoist.js:31807:36
    at step (/Users/***/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6CFE4471-B485-43B7-9745-D0DE93A90AA2/alfred-workflow-todoist.js:5894:23)
    at Object.next (/Users/***/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6CFE4471-B485-43B7-9745-D0DE93A90AA2/alfred-workflow-todoist.js:5875:53)
    at fulfilled (/Users/***/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6CFE4471-B485-43B7-9745-D0DE93A90AA2/alfred-workflow-todoist.js:5865:58)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
[2018-10-03 22:37:06][ERROR: input.scriptfilter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON:
TypeError: Cannot read property 'explanation' of undefined
Stack: TypeError: Cannot read property 'explanation' of undefined
    at /Users/***/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6CFE4471-B485-43B7-9745-D0DE93A90AA2/alfred-workflow-todoist.js:31713:59
    at Array.forEach (<anonymous>)
    at Object.init (/Users/***/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6CFE4471-B485-43B7-9745-D0DE93A90AA2/alfred-workflow-todoist.js:31709:31)
    at Stamp (/Users/***/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6CFE4471-B485-43B7-9745-D0DE93A90AA2/alfred-workflow-todoist.js:5901:1207)
    at /Users/***/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6CFE4471-B485-43B7-9745-D0DE93A90AA2/alfred-workflow-todoist.js:31807:36
    at step (/Users/***/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6CFE4471-B485-43B7-9745-D0DE93A90AA2/alfred-workflow-todoist.js:5894:23)
    at Object.next (/Users/***/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6CFE4471-B485-43B7-9745-D0DE93A90AA2/alfred-workflow-todoist.js:5875:53)
    at fulfilled (/Users/***/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6CFE4471-B485-43B7-9745-D0DE93A90AA2/alfred-workflow-todoist.js:5865:58)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)

from alfred-workflow-todoist.

moranje avatar moranje commented on June 12, 2024

Try completely uninstalling the old workflow. todo, todos and todo:setting work on my end. I'll upload a version with better error reporting.

PS: this version ins't feature complete yes adding labels and projects to tasks isn't working yet.

from alfred-workflow-todoist.

moranje avatar moranje commented on June 12, 2024

@repercussion I've updated the workflow

from alfred-workflow-todoist.

melikarslan avatar melikarslan commented on June 12, 2024

I had 4.0.2 and removed it completely before installing 5.1.0, but now todo:setting commands do not work and I can't use workflow at all.

from alfred-workflow-todoist.

moranje avatar moranje commented on June 12, 2024

Yes, unfortunate reference to a file that doesn't exist on your computer I'm afraid. That is fixed in the latest release.

from alfred-workflow-todoist.

repercussion avatar repercussion commented on June 12, 2024

Alrighty. Completely removed then reinstalled. Here's the output of todo:setting:

`Starting debug for 'Alfred Workflow Todoist'

[2018-10-04 20:57:19][ERROR: input.scriptfilter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON:
TypeError: Cannot read property 'explanation' of undefined

ALFRED WORKFLOW TODOIST

os: macOS
query:
node.js: v10.11.0
alfred: 3.7
workflow: 5.1.2
Stack: TypeError: Cannot read property 'explanation' of undefined
at /Users/xxxxx/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.160E4142-8110-40DD-9B5C-AE61D69B426F/alfred-workflow-todoist.js:33694:59
at Array.forEach ()
at Object.init (/Users/xxxxx/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.160E4142-8110-40DD-9B5C-AE61D69B426F/alfred-workflow-todoist.js:33690:31)
at Stamp (/Users/xxxxx/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.160E4142-8110-40DD-9B5C-AE61D69B426F/alfred-workflow-todoist.js:7759:1207)
at /Users/xxxxx/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.160E4142-8110-40DD-9B5C-AE61D69B426F/alfred-workflow-todoist.js:33788:36
at step (/Users/xxxxx/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.160E4142-8110-40DD-9B5C-AE61D69B426F/alfred-workflow-todoist.js:7883:23)
at Object.next (/Users/xxxxx/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.160E4142-8110-40DD-9B5C-AE61D69B426F/alfred-workflow-todoist.js:7864:53)
at fulfilled (/Users/xxxxx/Documents/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.160E4142-8110-40DD-9B5C-AE61D69B426F/alfred-workflow-todoist.js:7854:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)`

from alfred-workflow-todoist.

moranje avatar moranje commented on June 12, 2024

Ah I understand now, I'll try and upload a fix tonight

from alfred-workflow-todoist.

raygan avatar raygan commented on June 12, 2024

Thanks. I think I'm seeing the same issue on High Sierra. This is what I see in the log when I try to configure my API token:

[2018-10-05 08:26:32][ERROR: input.scriptfilter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON:
TypeError: Cannot read property 'explanation' of undefined

ALFRED WORKFLOW TODOIST
----------------------------------------
os: macOS High Sierra
query: 
node.js: v8.11.3
alfred: 3.7
workflow: 5.1.2
Stack: TypeError: Cannot read property 'explanation' of undefined
    at /Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:33694:59
    at Array.forEach (<anonymous>)
    at Object.init (/Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:33690:31)
    at Stamp (/Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:7759:1207)
    at /Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:33788:36
    at step (/Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:7883:23)
    at Object.next (/Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:7864:53)
    at fulfilled (/Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:7854:58)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

from alfred-workflow-todoist.

moranje avatar moranje commented on June 12, 2024

This problem affects anyone who used the workflow before

from alfred-workflow-todoist.

raygan avatar raygan commented on June 12, 2024

Ah, yep. I installed it a while back and couldn't get it to work for some reason. Uninstalled it and tried it again recently.

from alfred-workflow-todoist.

moranje avatar moranje commented on June 12, 2024

@repercussion @melikarslan @raygan Please try version v5.1.3.

from alfred-workflow-todoist.

raygan avatar raygan commented on June 12, 2024

Well, I was able to get it to let me try to set a token, but every time I try my API token I get a message saying Error: Can't set token to XXXX where XXXX is my API token. I'm certain what I have entered is correct, and I even tried having todoist generate me a new API token.

This might be a separate issue though. Should I open a new issue or continue here?

from alfred-workflow-todoist.

raygan avatar raygan commented on June 12, 2024

Nothing shows up in the "Interesting information" log but here's what I see when I try All Information:

(I've edited out my token)

[2018-10-05 15:07:51][input.scriptfilter] Queuing argument ''
[2018-10-05 15:07:51][input.scriptfilter] Script with argument '(null)' finished
[2018-10-05 15:07:51][input.scriptfilter] {"items":[{"arg":"\"\"","type":"default","valid":false,"autocomplete":" token","title":"SETTING: token","subtitle":"Must be a valid todoist token (40 chars and only 0-9 and a-f)","icon":{"path":"icon.png"},"uid":"14829c7cdc23091063e8b94401152171"},{"arg":"\"\"","type":"default","valid":false,"autocomplete":" language","title":"SETTING: language","subtitle":"Must be one of: en, da, pl, zh, ko, de, pt, ja, it, fr, sv, ru, es, nl","icon":{"path":"icon.png"},"uid":"9dd7e9504b418eb3429908ceff1882bb"},{"arg":"\"\"","type":"default","valid":false,"autocomplete":" max_items","title":"SETTING: max_items","subtitle":"Must be a number between 1 and 20","icon":{"path":"icon.png"},"uid":"79f94ff0f48d3e9729f047225ee563ec"},{"arg":"\"\"","type":"default","valid":false,"autocomplete":" cache_timeout","title":"SETTING: cache_timeout","subtitle":"Must be a number between 1 and 604800","icon":{"path":"icon.png"},"uid":"ab760d0a8ced041b043fc51895167d0d"},{"arg":"\"\"","type":"default","valid":false,"autocomplete":" anonymous_statistics","title":"SETTING: anonymous_statistics","subtitle":"Can either be true of false","icon":{"path":"icon.png"},"uid":"de95fc97080194fafbf484d85526e13c"}]}
[2018-10-05 15:07:55][input.scriptfilter] Queuing argument ' token'
[2018-10-05 15:07:55][input.scriptfilter] Script with argument '(null)' finished
[2018-10-05 15:07:55][input.scriptfilter] {"items":[{"arg":"{\"key\":\"token\",\"value\":\"\"}","type":"default","valid":true,"autocomplete":"","title":"New:  (βœ•)","subtitle":"Current value:  (Must be a valid todoist token (40 chars and only 0-9 and a-f))","icon":{"path":"icon.png"},"uid":"e0e6719d948da282274c0ca0ea076766"}]}
[2018-10-05 15:07:56][input.scriptfilter] Queuing argument ' token '
[2018-10-05 15:07:56][input.scriptfilter] Script with argument '(null)' finished
[2018-10-05 15:07:56][input.scriptfilter] {"items":[{"arg":"{\"key\":\"token\",\"value\":\"\"}","type":"default","valid":true,"autocomplete":"","title":"New:  (βœ•)","subtitle":"Current value:  (Must be a valid todoist token (40 chars and only 0-9 and a-f))","icon":{"path":"icon.png"},"uid":"e0e6719d948da282274c0ca0ea076766"}]}
[2018-10-05 15:07:56][input.scriptfilter] Queuing argument ' token XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
[2018-10-05 15:07:57][input.scriptfilter] Script with argument '(null)' finished
[2018-10-05 15:07:57][input.scriptfilter] {"items":[{"arg":"{\"key\":\"token\",\"value\":\"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"}","type":"default","valid":true,"autocomplete":"","title":"New: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX (βœ•)","subtitle":"Current value:  (Must be a valid todoist token (40 chars and only 0-9 and a-f))","icon":{"path":"icon.png"},"uid":"679881aa0c8c75c18500f6e8170ae7d6"}]}
[2018-10-05 15:07:58][input.scriptfilter] Processing output of 'action.script' with arg '{"key":"token","value":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"}'
[2018-10-05 15:07:58][action.script] Processing output of 'utility.junction' with arg 'Error: Can't set token to XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

ALFRED WORKFLOW TODOIST
----------------------------------------
os: macOS High Sierra
query: undefined
node.js: v8.11.3
alfred: 3.7
workflow: 5.1.3
Stack: Error: Can't set token to XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    at /Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:33830:56
    at step (/Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:7883:23)
    at Object.next (/Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:7864:53)
    at fulfilled (/Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:7854:58)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3
'
[2018-10-05 15:07:58][utility.junction] Processing output of 'utility.filter' with arg 'Error: Can't set token to XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

ALFRED WORKFLOW TODOIST
----------------------------------------
os: macOS High Sierra
query: undefined
node.js: v8.11.3
alfred: 3.7
workflow: 5.1.3
Stack: Error: Can't set token to XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    at /Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:33830:56
    at step (/Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:7883:23)
    at Object.next (/Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:7864:53)
    at fulfilled (/Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:7854:58)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3
'
[2018-10-05 15:07:58][utility.filter] Processing output of 'output.notification' with arg 'Error: Can't set token to XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

ALFRED WORKFLOW TODOIST
----------------------------------------
os: macOS High Sierra
query: undefined
node.js: v8.11.3
alfred: 3.7
workflow: 5.1.3
Stack: Error: Can't set token to XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    at /Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:33830:56
    at step (/Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:7883:23)
    at Object.next (/Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:7864:53)
    at fulfilled (/Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:7854:58)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3
'
[2018-10-05 15:07:58][utility.junction] Processing output of 'utility.filter' with arg 'Error: Can't set token to XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

ALFRED WORKFLOW TODOIST
----------------------------------------
os: macOS High Sierra
query: undefined
node.js: v8.11.3
alfred: 3.7
workflow: 5.1.3
Stack: Error: Can't set token to XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    at /Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:33830:56
    at step (/Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:7883:23)
    at Object.next (/Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:7864:53)
    at fulfilled (/Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A9507121-AA29-4E5F-B32C-22316714BE2B/alfred-workflow-todoist.js:7854:58)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3

from alfred-workflow-todoist.

moranje avatar moranje commented on June 12, 2024

@raygan I don't understand yet (unless your token isn't made up of 40 characters ranging from 0 to 9 and a to f, you can test this here). I'm not able to reproduce this on my side. Can you try out this beta version. It has better logging added so I can see the query you entered. It also automatically hides the token from the log.

Download

Alfred Workflow Todoist.zip

Instructions

  1. Don't unpack :)
  2. Rename Alfred.Workflow.Todoist.zip to Alfred.Workflow.Todoist.alfredworkflow

from alfred-workflow-todoist.

melikarslan avatar melikarslan commented on June 12, 2024

I'have updated to 5.2.0 and still can't set my token. Debugging shows no useful info, just says "can't set token to "

from alfred-workflow-todoist.

moranje avatar moranje commented on June 12, 2024

Just to make sure:

  1. Your token is 40 chars and consists only of 0-9 and a-f, try aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  2. You entered something like todo:setting token <token>
  3. When you entered the token you should have seen a cross change to a check mark
  4. Have you tried changing other settings?

from alfred-workflow-todoist.

moranje avatar moranje commented on June 12, 2024

πŸŽ‰ This issue has been resolved in version 5.3.0 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

from alfred-workflow-todoist.

moranje avatar moranje commented on June 12, 2024

I was having a bit of misunderstanding with the automated build today, but the latest (5.4.1) should fix this problem

from alfred-workflow-todoist.

raygan avatar raygan commented on June 12, 2024

I've updated to the latest release (5.4.2) but I'm still not able to set my token or use the workflow. When I enter "todo:setting" I only see [2018-10-08 08:45:02][input.scriptfilter] Queuing argument '' in the log and I get a notification that says "How unfortunate... TypeError: Cannot read property "type" of undefined." It continues the say "Hold on..." in the Alfred window indefinitely.

from alfred-workflow-todoist.

raygan avatar raygan commented on June 12, 2024

I uninstalled and tried the beta version you linked earlier. There I can at least try to set the token (the script filter for todo:settings brings up the token and other settings options) but trying to set the token still gives me an error. Here's the log:

[2018-10-08 08:53:17][utility.debug] 'Something went wrong

spawn /Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/node_modules/node-notifier/vendor/terminal-notifier.app/Contents/MacOS/terminal-notifier ENOENT: Error

ALFRED WORKFLOW TODOIST
----------------------------------------
os: macOS High Sierra
query: {"key":"token","value":"<token>"}
node.js: v8.11.3
alfred: 3.7
workflow: 5.1.4-beta.1
Stack: Error: spawn /Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/node_modules/node-notifier/vendor/terminal-notifier.app/Contents/MacOS/terminal-notifier ENOENT
    at _errnoException (util.js:992:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    at onErrorNT (internal/child_process.js:372:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3
Error: Can't set token to <token>

ALFRED WORKFLOW TODOIST
----------------------------------------
os: macOS High Sierra
query: {"key":"token","value":"<token>"}
node.js: v8.11.3
alfred: 3.7
workflow: 5.1.4-beta.1
Stack: Error: Can't set token to <token>
', {}

I double checked my token using the regex you linked to as well and it's definitely 40 characters, 0-9 and a-f. I get the same error when I try entering a token like aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.

from alfred-workflow-todoist.

melikarslan avatar melikarslan commented on June 12, 2024

As of 5.4.3 I can set application token.

But project names are not suggested anymore when creating tasks.

Also update workflow function does not work.

from alfred-workflow-todoist.

moranje avatar moranje commented on June 12, 2024

Yeah I noticed, sorry guys, to hasty

from alfred-workflow-todoist.

moranje avatar moranje commented on June 12, 2024

I've added a lot of extra tests and I think I've caught a bunch of weird (not so) edge cases. Please try version 5.4.4.

@melikarslan both the suggestion of projects as well as labels AND adding them to the tasks aren't supported yet. It's the first thing on my list. Should be fairly simple to implement now that caching works.

@raygan Let me know if this fixes things on your end, I'm dying to close this issue... :)

from alfred-workflow-todoist.

raygan avatar raygan commented on June 12, 2024

I'm sorry to say I'm still seeing pretty much the same issue with 5.4.4. The script filter worked to choose "todo:setting token" but I still got an error that my (definitely valid) API key was the wrong format. Here's the log:

[2018-10-09 17:23:46][utility.debug] 'Something went wrong

Error: uuid should match pattern "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" (undefined)

ALFRED WORKFLOW TODOIST
----------------------------------------
os: macOS High Sierra
query: {"key":"token","value":"<token>"}
node.js: v8.11.3
alfred: 3.7
workflow: 5.4.4
Stack: Error: uuid should match pattern "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" (undefined)
', {}

Also still getting this error with aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Let me know if there's anything I could try to help get to the bottom of it.

from alfred-workflow-todoist.

moranje avatar moranje commented on June 12, 2024

At least that's a clear error. I think the uuid key in your settings.json contains capital chars A-F.

@raygan try again, this should be fixed in 5.4.5

from alfred-workflow-todoist.

raygan avatar raygan commented on June 12, 2024

Fantastic! With 5.4.5 I was able to set my token and add tasks.

Unfortunately I'm getting an error when I try to view tasks by typing "todos". Should I open a new issue? Here's the log:

[2018-10-10 11:53:42][input.scriptfilter] Queuing argument ''
[2018-10-10 11:53:49][input.scriptfilter] Script with argument '(null)' finished
[2018-10-10 11:53:49][input.scriptfilter] Something went wrong

HTTPError: Response code 404 (Not Found)

ALFRED WORKFLOW TODOIST
----------------------------------------
os: macOS High Sierra
query: 
node.js: v8.11.3
alfred: 3.7
workflow: 5.4.5
Stack: HTTPError: Response code 404 (Not Found)
    at EventEmitter.emitter.on (/Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.D70E5EDC-F6C7-4EBF-AD30-9024E3822A50/alfred-workflow-todoist.js:30348:19)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
[2018-10-10 11:53:49][ERROR: input.scriptfilter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON:
Something went wrong

HTTPError: Response code 404 (Not Found)

ALFRED WORKFLOW TODOIST
----------------------------------------
os: macOS High Sierra
query: 
node.js: v8.11.3
alfred: 3.7
workflow: 5.4.5
Stack: HTTPError: Response code 404 (Not Found)
    at EventEmitter.emitter.on (/Users/raygan/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.D70E5EDC-F6C7-4EBF-AD30-9024E3822A50/alfred-workflow-todoist.js:30348:19)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

from alfred-workflow-todoist.

moranje avatar moranje commented on June 12, 2024

@raygan you keep throwing these puzzles at me. You're not behind a proxy right? Can just make sure the token is set? You should see it when entering a new token as the 'old' value. Last I got a 4xx error was because I had emptied my token.

from alfred-workflow-todoist.

raygan avatar raygan commented on June 12, 2024

Sorry to be such a puzzle! I definitely have a token set now. It shows when I type β€œtodo:setting token”. Not behind any sort of proxy.

from alfred-workflow-todoist.

moranje avatar moranje commented on June 12, 2024

Can you create a task? The 404 makes no sense, the url is the same. Can you run something for me?

Download

  1. Postman
  2. Try the following config and run it, to see if you are able to connect to the todoist API

schermafbeelding 2018-10-10 om 21 34 30

from alfred-workflow-todoist.

raygan avatar raygan commented on June 12, 2024

Yes, I'm able to get my tasks with Postman.

postman 2018-10-10 13-43-56

After some further testing I'm not able to reliably post todos via the workflow. The very first one I tried worked, but after that it's only worked once out of about a dozen tries. It isn't generating an error that I can see. Pretty strange.

I should add that using the same computer and token I'm able to use other todoist clients reliably, like this command line client.

from alfred-workflow-todoist.

moranje avatar moranje commented on June 12, 2024

This is a headscratcher, let me ponder on this a little while longer. In the meanwhile, I just released 5.5.0 which should fix nothing of this sort but who knows...

from alfred-workflow-todoist.

moranje avatar moranje commented on June 12, 2024

I will try to see if there's any way to get more information about the problem from the todoist response. I'll update this post with a beta version.

Edit: @raygan

I've added additional error logging methods which should provide a little more information about the request made to the API.

A invalid token response on my end looks like this:

{
  host: undefined,
  hostname: 'beta.todoist.com',
  method: 'POST',
  path: '/API/v8/tasks',
  socketPath: undefined,
  protocol: 'https:',
  url: 'https://beta.todoist.com/API/v8/tasks',
  statusCode: 403,
  statusMessage: 'Forbidden',
  headers: {
    'content-type': 'text/plain; charset=utf-8',
    'content-length': '10',
    connection: 'close',
    date: 'Thu, 11 Oct 2018 18:25:07 GMT',
    'x-content-type-options': 'nosniff',
    'x-cache': 'Error from cloudfront',
    via: '1.1 ac987789ab8e4a7dbf75086d523e8589.cloudfront.net (CloudFront)',
    'x-amz-cf-id': 'UnhLV3xZXpddZKvxUy6RXroa93UqEcUGLUOJ2Qp9_bON9FwY9qlcIg=='
  }
}

Download

  1. Don't unpack
  2. Change extension from .zip to .alfredworkflow

Alfred Workflow Todoist.zip

from alfred-workflow-todoist.

moranje avatar moranje commented on June 12, 2024

Not sure if this is still a problem but I can't reproduce so let's open a separate issue if this pops up again

from alfred-workflow-todoist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.