Skip to content

await connectToRemote() not returning a connection or error #18

Open
@reggie3

Description

@reggie3

The following code doesn't return a connection, nor does connectToRemote() return an error to be caught

 makeRemoteConnection = async () => {
    this.printElement('connecting to remote');
    try {
      let remote = await connectToRemote();
      this.remote = remote;
      this.printElement('remote connected');
      this.printElement(this.remote);
      this.bindListeners();

      // let the webview know we are listening
      this.printElement('emitting webview ready');
      this.remote.emit('WEBVIEW_READY', {
        payload: 'hello'
      });
      this.printElement('WEBVIEW_READY emitted');
    } catch (error) {
      console.log(`Error: ${error}`);
      this.printElement(`remote connect error ${error}`);
    }
  };

I receive the "connecting to remote" message, but I never receive the expected "remote connected" message. Additionally, no error is thrown for catching.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions