westerlind / alfred-raindrop-search

Search or add Raindrop.io bookmarks from Alfred
MIT License
240 stars 13 forks source link

Error: interface conversion: interface {} is nil, not float64 in Raindrop.io Workflow for Alfred #33

Closed snowliondev closed 1 week ago

snowliondev commented 1 week ago

Trying to add a bookmark to Raindrop with "ra" shortcut. The option disappears when chosen.

Error Details:

14:47:32 workflow.go:328: ---- Search Raindrop.io/2.0.12 (AwGo/0.27.1) -----
14:47:32 workflow.go:343: ------------------ FATAL ERROR -------------------
14:47:32 workflow.go:344: interface conversion: interface {} is nil, not float64 : goroutine 1 [running]:
runtime/debug.Stack()
    /opt/homebrew/Cellar/go/1.22.5/libexec/src/runtime/debug/stack.go:24 +0x64
github.com/deanishe/awgo.(*Workflow).Run.func2()
    /Users/andreas/go/pkg/mod/github.com/deanishe/awgo@v0.29.0/workflow.go:344 +0xf4
panic({0x102c4f920?, 0x140001b7ad0?})
    /opt/homebrew/Cellar/go/1.22.5/libexec/src/runtime/panic.go:770 +0x124
main.sub_collection_names({0x140001cc908, 0x23, 0x23}, 0x2d3e384)
    /Users/andreas/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.1B8F238D-BB91-410E-8CE1-61AD0823A468/raindrop_common.go:471 +0x254
main.render_collections({0x1400018e2d0?, 0x6?, 0x9}, {0x140001cc908, 0x23, 0x23}, {0x102b7aca0, 0x4}, {0x102b7bd30, 0x6}, ...)
    /Users/andreas/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.1B8F238D-BB91-410E-8CE1-61AD0823A468/raindrop_common.go:409 +0xa1c
main.select_collection({0x16d51b878, 0x0}, {0x16d51b82b, 0x4a}, {0x16d51b890, 0x50}, {0x0, 0x0}, 0x0)
    /Users/andreas/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.1B8F238D-BB91-410E-8CE1-61AD0823A468/raindrop_add.go:106 +0x1104
main.run()
    /Users/andreas/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.1B8F238D-BB91-410E-8CE1-61AD0823A468/raindrop_main.go:58 +0x770
github.com/deanishe/awgo.(*Workflow).Run(0x140000005a0, 0x102ca3ca8)
    /Users/andreas/go/pkg/mod/github.com/deanishe/awgo@v0.29.0/workflow.go:358 +0x2bc
main.main()
    /Users/andreas/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.1B8F238D-BB91-410E-8CE1-61AD0823A468/raindrop_main.go:86 +0x1f0
14:47:32 workflow.go:345: ---------------- END STACK TRACE -----------------

Environment:

westerlind commented 1 week ago

Hi @snowliondev

I have tried to fix this, so test the attached version here to see if that works better.

Search Raindrop.io-test.alfredworkflow.zip

snowliondev commented 1 week ago

Excellent, that is working well! Thank you.

westerlind commented 1 week ago

Great! I have released the fixed version as 2.0.13 now.