ockam: Unable to run `ockam relay create` while following Quick start guide

Observed behavior

running ockam relay create return error OCK500

 Failed to create forwarder (origin: Api, kind: Invalid, source location: /project/implementations/rust/ockam/ockam_core/src/api.rs:144:44)
  help: Please report this issue, with a copy of your logs, to https://github.com/build-trust/ockam/issues

  Version 0.92.0, hash: 42124b03e6e979489d5be66862736fe7229ec147

stdout.log

stderr.log

Steps to reproduce

Follow Quick start guide

Expected behavior

relay is successfully initialized

Ockam Version

0.92.0

About this issue

  • Original URL
  • State: open
  • Created 10 months ago
  • Comments: 23 (23 by maintainers)

Most upvoted comments

That’s pretty interesting! I’ll check how this affects the desktop app. Maybe that was the reason of the problem we currently have about not being able to open the enroll url twice.

That’s a great find 👏 👏

that_detached does seem like the better option for us here. @adrianbenavides @etorreborre what do you think?

@mrinalwadhwa you are right.

I’m guessing the code to open in the browser might not be working https://github.com/build-trust/ockam/blob/develop/implementations/rust/ockam/ockam_command/src/enroll/oidc_service.rs#L148

This is exactly the place it is getting stuck. open::that seems to be waiting for the spawned process to exit before returning on my machine(only on firefox). open::that_detached seems to work perfectly for me, this creates a fork and doesn’t wait for the process to exit.

comments in src code of open::that

/// A [`std::io::Error`] is returned on failure. Because different operating systems
/// handle errors differently it is recommend to not match on a certain error.
///
/// # Beware
///
/// Sometimes, depending on the platform and system configuration, launchers *can* block.
/// If you want to be sure they don't, use [`that_in_background()`] or [`that_detached`] instead.
pub fn that(path: impl AsRef<OsStr>) -> io::Result<()> {
 

Intriguing, you suspect something went wrong in the spinner code? https://github.com/build-trust/ockam/blob/develop/implementations/rust/ockam/ockam_command/src/terminal/mod.rs#L429

If you’re up for it, that would be a good thing to try and debug with a build of the current develop branch.

Ok. It worked. I use ubuntu + i3 as my window manager. I did not work here. But when I use ubuntu with the default window manager, it works.

But I don’t understand why. I have used gh client for auth in past. It has a similar auth mechanism where you log in the browser and the ack is received in terminal. It worked perfectly fine in ubuntu +i3.

I CTRL-C exited from it.

That would explain why its not working … it can sometimes take a bit to provision your project, which then offers the relay service.

We should definitely improve the output and error messages to convey that better.

If you have some more time, please ockam reset and give the whole flow another try.