stephancasas / alfred-mouseless-messenger

Preview and reply to your messages from within Alfred. Keep your hands on that keyboard!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error on first start

superandrew opened this issue · comments

Hi, I followed the guide, however I have this error in debug:

[13:52:27.807] Logging Started...
[13:52:29.735] Mouseless Messenger[Script Filter] Queuing argument '(null)'
[13:52:30.104] Mouseless Messenger[Script Filter] Script with argv '(null)' finished
[13:52:30.107] ERROR: Mouseless Messenger[Script Filter] Code 1: /Users/superandrew/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/DEB99AC7-FAB3-4183-B750-7BCA25029A02: execution error: Error: TypeError: null is not an object (evaluating 'message_body.replace') (-2700)
[13:53:05.780] Mouseless Messenger[Script Filter] Queuing argument '(null)'
[13:53:06.197] Mouseless Messenger[Script Filter] Script with argv '(null)' finished
[13:53:06.202] ERROR: Mouseless Messenger[Script Filter] Code 1: /Users/superandrew/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/94FC029E-A2B3-48D7-BED2-C4FDF66A5804: execution error: Error: TypeError: null is not an object (evaluating 'message_body.replace') (-2700)

This is a new one. I'll write-in a debug/log feature, and re-release to see if we can identify what's happening.

Out of curiosity, are you using iCloud Messages?

yes, I am. Also, not sure if it matters, but I have no python2 installed

The workflow is written in JXA, so Python shouldn't have an effect. iCloud Messages might be a problem though. I'm not certain that it uses the same store as local messages does.

Based on the information from this site, it looks like you have to enable message retention if you want to use iCloud Messages and maintain a local messages database. Otherwise, the data is stored exclusively in iCloud:

Xnip2022-06-26_18-44-33

I don't have that option. It seems from an older Mac Os version.
CleanShot 2022-06-27 at 09 15 05@2x

also, I noticed that restarting the computer apparently fixed the issue.

But. :) I have an error when I select "reply to" someone:

[13:59:39.502] ERROR: Mouseless Messenger[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.F9E07F03-02EE-4823-A3AD-B2D743DD8BD0%3E273D9F21-78DB-4A57-B29C-4F088C3603B9)] Code 1: /Users/superandrew/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/B8DABE6C-53FF-4EEF-8893-E4157AA8AB26: execution error: Error: TypeError: undefined is not an object (evaluating 'chat_title.split('with')[1].trim') (-2700)

Can you show me a screenshot of what you get when typing msg (the recent messages selection)?

Are you experiencing this issue when replying to a group chat or a one-to-one conversation, or is it both?

boh, and in two separate computers

Hi @stephancasas apart from the first error, the other one was my fault. I didn't get you have to enter text directly in alfred to respond, so I pressed enter without text. I'm trying to understand how to change the workflow in order to explain to the user that he has to enter some text but I don't understand exactly how it works.

If you want to change the prompt, it would be in the Reply Dispatch node:

https://github.com/stephancasas/alfred-mouseless-messenger/blob/main/src/reply-input.jxa.js#L15-L16

Going to go ahead and close this issue. If you encounter another problem, please feel free to raise another. Thanks.