dennis-tra / alfred-dict.cc-workflow

🌍 Alfred 4/5 workflow to get translations from dict.cc
137 stars 4 forks source link

Release 2.0.0 #8

Closed dennis-tra closed 2 years ago

dennis-tra commented 2 years ago

An issue to discuss problems associated with version 2.0.0

svenjacobs commented 2 years ago

Seems to work fine so far, thank you 👍🏼

natterstefan commented 2 years ago

I can confirm that as well. 👍 Thanks, @dennis-tra!

dennis-tra commented 2 years ago

Did you have to explicitly give execute-permissions to the binaries?

svenjacobs commented 2 years ago

Did you have to explicitly give execute-permissions to the binaries?

I followed the instructions and manually executed the binary once, right clicked on it with the Options key pressed, then selected "open" and acknowledged the dialog. I did not try to execute the workflow before, so I don't know whether this is necessary or not.

natterstefan commented 2 years ago

Did you have to explicitly give execute-permissions to the binaries?

Yes, I had to.

sven-s commented 2 years ago

Works fine for me (M1 Pro). I needed to grant the permissions.

muffix commented 2 years ago

Clearing the extended file attributes before installing the workflow into Alfred worked for me. xattr -c ~/Downloads/Dict.cc.alfredworkflow clears all of them, but just removing com.apple.quarantine would probably have sufficed.

depressiveRobot commented 2 years ago

The workflow works so far. Thanks for updating.

However, when searching for foo, I get the following error:

[10:58:51.446] ERROR: Dict.cc[Script Filter] Code 1: 🍺
10:58:50 workflow.go:328: -------- Dict.cc/2.0.0-rc2 (AwGo/0.27.1) ---------
10:58:50 workflow.go:134: Escaping query string foo
10:58:50 workflow.go:144: HTTP GET https://ende.dict.cc?s=foo
10:58:51 workflow.go:343: ------------------ FATAL ERROR -------------------
10:58:51 workflow.go:344: runtime error: index out of range [1] with length 1 : goroutine 1 [running]:
runtime/debug.Stack()
    /usr/local/opt/go/libexec/src/runtime/debug/stack.go:24 +0x88
github.com/deanishe/awgo.(*Workflow).Run.func2(0x140001465a0)
    /Users/dennistrautwein/.cache/go/pkg/mod/github.com/deanishe/awgo@v0.29.1/workflow.go:344 +0xf0
panic({0x1005ea420, 0x1400001e0f0})
    /usr/local/opt/go/libexec/src/runtime/panic.go:1038 +0x21c
github.com/dennis-tra/alfred-dict.cc-workflow/workflow.(*Dictcc).HandleQuery(0x1400010ff38, {0x14000104ef0, 0x1, 0x1})
    /Users/dennistrautwein/private/git/alfred-dict.cc-workflow/workflow/workflow.go:92 +0x5b0
github.com/dennis-tra/alfred-dict.cc-workflow/workflow.(*Dictcc).Run(0x1400010ff38)
    /Users/dennistrautwein/private/git/alfred-dict.cc-workflow/workflow/workflow.go:47 +0x278
github.com/deanishe/awgo.(*Workflow).Run(0x140001465a0, 0x1400010ff28)
    /Users/dennistrautwein/.cache/go/pkg/mod/github.com/deanishe/awgo@v0.29.1/workflow.go:358 +0x310
main.main()
    /Users/dennistrautwein/private/git/alfred-dict.cc-workflow/main.go:10 +0x98
10:58:51 workflow.go:345: ---------------- END STACK TRACE -----------------
10:58:51 feedback.go:509: Sent 1 result(s) to Alfred
10:58:51 workflow.go:376: [ERROR] runtime error: index out of range [1] with length 1
10:58:51 workflow.go:402: ------------------ 383.123917ms ------------------
[10:58:51.465] Dict.cc[Script Filter] {
  "variables": {
    "AW_SESSION_ID": "P9V4ECBXP93E42CLKRBG0VZE"
  },
  "items": [
    {
      "title": "runtime error: index out of range [1] with length 1",
      "valid": false,
      "icon": {
        "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
      }
    }
  ]
}
svenjacobs commented 2 years ago

However, when searching for foo, I get the following error:

I'm getting the same error. It seems to happen for some words that start with fo. For instance foot is also affected. However for or four work 🤷🏼‍♂️

josefschoeggl commented 2 years ago

Thanks a lot for the quick update, it works again!

dennis-tra commented 2 years ago

Hi @depressiveRobot, thanks for reporting! I haven't run into this problem yet.

I found the reason and will release another RC in a couple of minutes 👍

Edit: Released https://github.com/dennis-tra/alfred-dict.cc-workflow/releases/tag/2.0.0-rc3 I'll give this release another week or so and if nothing comes up publish a proper version 2.0.0 🚀


On another note, thanks so much to everyone who "bought me a coffee" the last couple of days :) ☕️ it really makes my day every time I receive the email notification :)

svenjacobs commented 2 years ago

I found another minor issue with RC3. It seems that single quotes are escaped in the output:

Screenshot 2022-03-28 at 08 41 34
dennis-tra commented 2 years ago

@svenjacobs thanks for reporting and generally the feedback you're providing :)

I have fixed it and will release another RC today. Right now I'm just string replacing \' by '. Not very elegant but it works. There might be other escaped characters but I haven't come across any - so I'll go with that "solution" for now.

While I was at it I've also added a new alternative action to the search results. When you hold or and then press enter the browser opens dict.cc with your query :)

dennis-tra commented 2 years ago

Alright, I'm using the workflow for a week now and it seems to be working fine 🎉

@sven-s You mentioned in the other issue https://github.com/dennis-tra/alfred-dict.cc-workflow/issues/7 you could sign the binary? I'm not very familiar with the process and only have done it once with https://github.com/mitchellh/gon. If it's not too much of hassle for you I would really appreciate you could sign the current binaries of rc-4. If you don't have time for that I'll just release the current ones on Wednesday :)

sven-s commented 2 years ago

@dennis-tra I am also not familiar with the process, since I only developed iOS Apps for customers, but I will look at the process this evening and and the tool you mentioned. It is always fun to learn something new ;-)

dennis-tra commented 2 years ago

Hi everyone, thanks for the help! Yesterday, I finally released the new version:

https://github.com/dennis-tra/alfred-dict.cc-workflow/releases/tag/2.0.0

I'll close this issue, but feel free to open new ones if anything comes up.


@sven-s I figured that the workflow on the release page can just be exchanged if we come around notarizing the included binaries :) so I just went ahead and released it 👍

sven-s commented 2 years ago

@dennis-tra yesterday I started to look into the gon stuff and managed to sign a binary. Today I will try to notarize it.