Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No return value #4

Open
baseliners opened this issue Mar 10, 2019 · 5 comments
Open

No return value #4

baseliners opened this issue Mar 10, 2019 · 5 comments

Comments

@baseliners
Copy link

Hi - I'm trying to use this with Ulysses (I originally tried Rob Walton's modules but they did not work and looks like the root cause might be xcall). When I try the following:

xcall.app/Contents/MacOS/xcall -url "ulysses://x-callback-url/get-version"

.. it opens Ulysses in the background (even though it looks like it shouldn't since activateApp has been omitted) but then does not return anything and just waits (no error returned either). Any ideas? I'm on macOS 10.14.3. Thanks!

@martinfinke
Copy link
Owner

Hi, thanks for trying xcall!

It sounds like Ulysses isn't calling the x-success callback…I'm afraid I can't look into why that happens, but maybe the Ulysses support can help. Just to confirm: Are you using Ulysses version 2.8 or later? get-version is only supported since that version of Ulysses.

.. it opens Ulysses in the background (even though it looks like it shouldn't since activateApp has been omitted)

The word "activate" is a bit ambiguous in this case, but activateApp just controls whether the target app is brought to the foreground. The app has to be started to handle the call, even if activateApp is NO.

@nielsbom
Copy link

I didn't see the feedback until I moved xcall.app into my Applications folder. Maybe try that?

@baseliners
Copy link
Author

It sounds like Ulysses isn't calling the x-success callback…I'm afraid I can't look into why that happens, but maybe the Ulysses support can help. Just to confirm: Are you using Ulysses version 2.8 or later? get-version is only supported since that version of Ulysses.

Yes I'm using the latest version of Ulysses (15.2).

I didn't see the feedback until I moved xcall.app into my Applications folder. Maybe try that?

I tried that but still no luck. Presume this is still working for you w/ macOS Mojave? (I'm on 10.14.3)

Will ping Ulysses team as well to see if they can reproduce it or help debug. Thanks!

@pr1mal
Copy link

pr1mal commented Feb 5, 2020

I'm facing similar issue, but with Bear.app
Symptoms: xcall creates note in Bear and then waits forever.

I was able to make some investigation. Here are brief results:

  1. Bear requires x-success/x-error callbacks to be URL-encoded to be able to recognize them, and this behavior conforms with X-Callback-URL 1.0 SPEC
  2. xcall.app does not URL-encode its x-success and x-error callbacks

So I URL-encode x-success/x-error callbacks PR#6. While this change does not solve the problem in my case - xcall continues to wait forever - this time it makes Bear.app to respond to x-success with new note identifier. Problem is that MacOS is unable to route this response back to xcall, because for some reason Bear.app tries to execute URL-encoded call:
see screenshot

I have also started thread at r/bearapp regarding this problem. Haven't heard anything useful yet though.

This is my first time digging that deep into x-callback-url stuff, first time ObjC and first time XCode, so I'm not sure where is the problem and what to do next to make this whole thing working for me. I would appreciate any advice/help/direction.
Thanks!

pr1mal added a commit to pr1mal/xcall that referenced this issue Feb 6, 2020
Fix for issue martinfinke#4. Reason is that MacOS was not always able to identify
particular xcall.app instance as 'xcall066958CA' protocol owner which
caused sometimes inability to get x-success/x-error responses

Project preferences changes in URL Types section:
- Role changed from 'Viewer' to 'Editor' to allow xcall.app to be identified
  by MacOS as protocol owner
- Added identifier of original xcall.app developer - Martin Finke
@pr1mal
Copy link

pr1mal commented Feb 6, 2020

I think I was able to fix this. Please see updated PR#6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants