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

executable file not found #5

Open
kcardona86 opened this issue Apr 29, 2020 · 6 comments
Open

executable file not found #5

kcardona86 opened this issue Apr 29, 2020 · 6 comments

Comments

@kcardona86
Copy link

kcardona86 commented Apr 29, 2020

on Linux after using ./xoauth connect Company1 the below error was thrown when attempting to create a connection but even when creating a token.

kristian@linux-testing:~$ ./xoauth connect Company1
panic: exec: "dbus-launch": executable file not found in $PATH

goroutine 1 [running]:
github.com/xero-github/xoauth/pkg/connect.Authorise(0x7ffd494e2778, 0xd, 0xc0000c1d01, 0x1f90)
/home/runner/work/xoauth/xoauth/pkg/connect/connect.go:34 +0x585
github.com/xero-github/xoauth/cmd.init.0.func3(0xc0000a5900, 0xc000088880, 0x1, 0x2)
/home/runner/work/xoauth/xoauth/cmd/root.go:71 +0x5d
github.com/spf13/cobra.(*Command).execute(0xc0000a5900, 0xc000088800, 0x2, 0x2, 0xc0000a5900, 0xc000088800)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:830 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0xccd960, 0x0, 0x85a3e0, 0xc00006e058)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:914 +0x2fb
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:864
github.com/xero-github/xoauth/cmd.Execute(...)
/home/runner/work/xoauth/xoauth/cmd/root.go:196
main.main()
/home/runner/work/xoauth/xoauth/xoauth.go:13 +0x47

@kcardona86
Copy link
Author

Cannot delete clientName, as it throws same similar error

@madhavvishnubhatta
Copy link

I am also trying to experiment with xero and its API, and I ran into the same issue. I installed dbus-x11 which resolved that issue.

yum install dbus-x11

But then a new error popped up.

error creating client: The name org.freedesktop.secrets was not provided by any .service files

Then I installed gnome-keyring.

yum install gnome-keyring

With that I now have this isue:

error creating client: failed to unlock correct collection '/org/freedesktop/secrets/aliases/default'

I am not sure how to proceed further. I suspect this is because we are trying to do it on a Linux machine without a KDE or some such GUI environment. That is just a guess and I have no solid basis to say that.

I am not sure when I will get back to this, but thought I can share my progress so far for what it is worth.

@kcardona86
Copy link
Author

kcardona86 commented Apr 30, 2020

@scottjs
Copy link

scottjs commented May 4, 2020

I'm facing the same issue, this is going to be running on a headless ubuntu server as part of a queued batch process.

I need the ability to authenticate to this API without having to programatically open a GUI browser to authorise the request, which seems utterly ridiculous.

Has anyone managed to make any progress with it?

@ProjectZero4
Copy link

Having the same issue here. I cannot do machine to machine api calls, all because I've opted to use a headless os. Seems like a design flaw on Xero's behalf here. Can you guys please look into this?

@scottjs
Copy link

scottjs commented Jun 18, 2020

Having the same issue here. I cannot do machine to machine api calls, all because I've opted to use a headless os. Seems like a design flaw on Xero's behalf here. Can you guys please look into this?

It's been a nightmare for us and ended up costing our client much more work than anticipated.

We have a system where when an invoice is raised in our system, we copy it into Xero.

What we ended up having to do was implement a "Xero Authorize" settings page within the client's back office admin panel where an admin user can click the "Authorize" button, then we store the access token and refresh token in the caches.

Theoretically this only has to be done once.

The refresh token lasts 60 days, so we have a scheduled task that runs every month or so to refresh the token and store the new values in the cache.

This essentially keeps the tokens alive indefinitely and any new raised invoices will be seamlessly copied over to Xero.

Not a particularly enjoyable solution.

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