Jump to content

Dynamic file search does not work with File Action [Fixed 3.1.1 pre-release]


zhaowu
 Share

Recommended Posts

However, it does not work. Also, anything I type is repeated in the query box like in http://d.pr/i/J4nB+. I type test and it become tteesstt

 

Any idea? Thanks.

 

 

Usually when you see the double characters, there is an exception happening somewhere. If you open Console.app, do you see any errors when this is happening?

 

Cheers,

Andrew

Link to comment
Share on other sites

I forgot to check console log ( only tried to debug with Alfred debug utility ). Now I check it again, I got the following message repeating for each keystroke.

9/8/16 13:39:50.608 Alfred 3[902]: -[__NSArrayI stringByStandardizingPath]: unrecognized selector sent to instance 0x7fe648c70540
9/8/16 13:39:50.609 Alfred 3[902]: An uncaught exception was raised
9/8/16 13:39:50.609 Alfred 3[902]: -[__NSArrayI stringByStandardizingPath]: unrecognized selector sent to instance 0x7fe648c70540
9/8/16 13:39:50.613 Alfred 3[902]: (
	0   CoreFoundation                      0x00007fff960cf4f2 __exceptionPreprocess + 178
	1   libobjc.A.dylib                     0x00007fff99345f7e objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff961391ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
	3   CoreFoundation                      0x00007fff9603f571 ___forwarding___ + 1009
	4   CoreFoundation                      0x00007fff9603f0f8 _CF_forwarding_prep_0 + 120
	5   Alfred Framework                    0x00000001004ae6f9 -[AlfredMetadataQuerier startQuery] + 522
	6   Alfred Framework                    0x00000001004d03cc -[AlfredWorkflowInputFileFilter filterWithQuery:] + 837
	7   Alfred Framework                    0x00000001004a2015 -[AlfredWorkflowManager setDirectQuery:forInput:] + 109
	8   CoreFoundation                      0x00007fff9605abbc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
	9   CoreFoundation                      0x00007fff9605ab4f ___CFXRegistrationPost_block_invoke + 63
	10  CoreFoundation                      0x00007fff9605aac7 _CFXRegistrationPost + 407
	11  CoreFoundation                      0x00007fff9605a832 ___CFXNotificationPost_block_invoke + 50
	12  CoreFoundation                      0x00007fff960175e2 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1922
	13  CoreFoundation                      0x00007fff96016835 _CFXNotificationPost + 693
	14  Foundation                          0x00007fff94d1b17a -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
	15  CoreFoundation                      0x00007fff9605abbc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
	16  CoreFoundation                      0x00007fff9605ab4f ___CFXRegistrationPost_block_invoke + 63
	17  CoreFoundation                      0x00007fff9605aac7 _CFXRegistrationPost + 407
	18  CoreFoundation                      0x00007fff9605a832 ___CFXNotificationPost_block_invoke + 50
	19  CoreFoundation                      0x00007fff960175e2 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1922
	20  CoreFoundation                      0x00007fff96016835 _CFXNotificationPost + 693
	21  Foundation                          0x00007fff94d1b17a -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
	22  AppKit                              0x00007fff93b72267 -[NSTextView(NSSharing) didChangeText] + 345
	23  AppKit                              0x00007fff93b6f5e1 -[NSTextView insertText:replacementRange:] + 2674
	24  AppKit                              0x00007fff93b6e6e0 -[NSTextInputContext(NSInputContext_WithCompletion) insertText:replacementRange:completionHandler:] + 79
	25  AppKit                              0x00007fff93b6e683 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke_2250 + 127
	26  AppKit                              0x00007fff93b6e5f5 -[NSTextInputContext do_HandleTSMEvent_insertFixLenTextLoop:whileCondition:dispatchWorkEach:afterEachInsertText:continuation:] + 181
	27  AppKit                              0x00007fff9427ac2f -[NSTextInputContext tryHandleTSMEvent_insertFixLenText_withContext:dispatchCondition:setupForDispatch:nestedWorkaroundCondition:nestedWorkaroundDispatchWork:loopCondition:dispatchWorkEach:afterEachInsertText:continuation:] + 428
	28  AppKit                              0x00007fff93b6e053 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke176 + 4253
	29  AppKit                              0x00007fff93b6cec8 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke_2 + 95
	30  AppKit                              0x00007fff93b6ce3b -[NSTextInputContext tryHandleTSMEvent_HasMarkedText_withDispatchCondition:dispatchWork:continuation:] + 101
	31  AppKit                              0x00007fff93b6cb2b -[NSTextInputContext handleTSMEvent:completionHandler:] + 3173
	32  AppKit                              0x00007fff93b6be5a _NSTSMEventHandler + 324
	33  HIToolbox                           0x00007fff97ebc7be _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1231
	34  HIToolbox                           0x00007fff97ebbc48 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 404
	35  HIToolbox                           0x00007fff97ebbaab SendEventToEventTargetWithOptions + 43
	36  HIToolbox                           0x00007fff97f10f7d SendTSMEvent_WithCompletionHandler + 417
	37  HIToolbox                           0x00007fff97f1146c __SendUnicodeTextAEToUnicodeDoc_WithCompletionHandler_block_invoke + 400
	38  HIToolbox                           0x00007fff97f112bf __SendFilterTextEvent_WithCompletionHandler_block_invoke + 189
	39  HIToolbox                           0x00007fff97f10fcd SendTSMEvent_WithCompletionHandler + 497
	40  HIToolbox                           0x00007fff97f10daf SendFilterTextEvent_WithCompletionHandler + 236
	41  HIToolbox                           0x00007fff97f10a88 SendUnicodeTextAEToUnicodeDoc_WithCompletionHandler + 284
	42  HIToolbox                           0x00007fff97f10838 __utDeliverTSMEvent_WithCompletionHandler_block_invoke_2 + 296
	43  HIToolbox                           0x00007fff97f106dc __utDeliverTSMEvent_WithCompletionHandler_block_invoke + 437
	44  HIToolbox                           0x00007fff97f104cf TSMKeyEvent_WithCompletionHandler + 721
	45  HIToolbox                           0x00007fff97f101c5 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_4 + 251
	46  HIToolbox                           0x00007fff97f10033 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_3 + 325
	47  HIToolbox                           0x00007fff97f0fd71 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_2 + 261
	48  HIToolbox                           0x00007fff97f0fb3a __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke + 253
	49  HIToolbox                           0x00007fff97f0f1f0 TSMProcessRawKeyEventWithOptionsAndCompletionHandler + 3199
	50  AppKit                              0x00007fff93b6bd0b __61-[NSTextInputContext _handleEvent:options:completionHandler:]_block_invoke955 + 131
	51  AppKit                              0x00007fff93b6a9ed -[NSTextInputContext tryTSMProcessRawKeyEvent:dispatchCondition:setupForDispatch:furtherCondition:dispatchWork:continuation:] + 131
	52  AppKit                              0x00007fff93b6a6e7 -[NSTextInputContext _handleEvent:options:completionHandler:] + 1266
	53  AppKit                              0x00007fff93b6a1ba -[NSTextInputContext handleEvent:] + 109
	54  AppKit                              0x00007fff93b6a0c3 -[NSView interpretKeyEvents:] + 204
	55  AppKit                              0x00007fff93b69eee -[NSTextView keyDown:] + 658
	56  AppKit                              0x00007fff94193b15 -[NSWindow _reallySendEvent:isDelayedEvent:] + 2108
	57  AppKit                              0x00007fff93bd2539 -[NSWindow sendEvent:] + 517
	58  AppKit                              0x00007fff93b5316a -[NSApplication sendEvent:] + 4382
	59  Alfred 3                            0x000000010046b086 Alfred 3 + 16518
	60  AppKit                              0x00007fff939b9df2 -[NSApplication run] + 796
	61  AppKit                              0x00007fff93983368 NSApplicationMain + 1176
	62  libdyld.dylib                       0x00007fff8d7b45ad start + 1
	63  ???                                 0x0000000000000001 0x0 + 1
)

Link to comment
Share on other sites

One more question about the JSON utility. I guess it is the scopes key under config tells the following file filter to limit search with scopes. 

 

Where can I find information about what config is accepted by which input object like file filter?

{
  "alfredworkflow" : {
    "config" : {
      "scopes" : [
        "{query}"
      ]
    },
    "variables" : {
      "folder" : "{query}"
    }
  }
}
Link to comment
Share on other sites

I forgot to check console log ( only tried to debug with Alfred debug utility ). Now I check it again, I got the following message repeating for each keystroke.

 

 

I can see what is happening here, the file search is expecting an array of paths, but it is getting an array of arrays (by passing in multiple paths from the file action and placing this into an array in the JSON).

 

Would you mind sharing your workflow with me to save me creating my own to reproduce this?

 

I'm going to move this into the bug forum as Alfred should defend against this situation.

 

Cheers,

Andrew

 

[moved to bugs]

Link to comment
Share on other sites

Where can I find information about what config is accepted by which input object like file filter?

 

 

The easiest thing to do is right click on the file filter and select "Copy Configuration". This can then be pasted into any text editor to see all the configuration items.

 

Cheers,

Andrew

Link to comment
Share on other sites

I can see what is happening here, the file search is expecting an array of paths, but it is getting an array of arrays (by passing in multiple paths from the file action and placing this into an array in the JSON).

 

Would you mind sharing your workflow with me to save me creating my own to reproduce this?

 

I'm going to move this into the bug forum as Alfred should defend against this situation.

 

Cheers,

Andrew

 

[moved to bugs]

The workflow is here http://d.pr/f/KWLk

Link to comment
Share on other sites

  • Andrew changed the title to Dynamic file search does not work with File Action [Fixed 3.1.1 pre-release]

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...