Skip to content

Subscription stuck with state: Initialising connection #1308

Closed
@vytautas-pranskunas-

Description

@vytautas-pranskunas-

I have this code:


    final websocketLink = WebSocketLink(
      subscriptionUri,
      config: SocketClientConfig(
        autoReconnect: true,
        delayBetweenReconnectionAttempts: const Duration(seconds: 2),
        initialPayload: () {
          return authTokenService.addAuthHeader(EnvVariables.currentHost);
        },
      ),
      subProtocol: GraphQLProtocol.graphqlTransportWs,
    );

    link = Link.split(
      (request) => request.isSubscription,
      websocketLink,
      link,
    );

but subscription stuck with state: Initialising connection and no messages are comming through.
It would useful to have documentation (at least me - could not find it) or if you guys could share any possible reasons for this.

Without this i canno tmove my app to new backend which uses new protocol :(

p.s. I even reduced it to:

    final websocketLink = WebSocketLink(
      subscriptionUri,
      subProtocol: GraphQLProtocol.graphqlTransportWs,
    );

    link = Link.split(
      (request) => request.isSubscription,
      websocketLink,
      link,
    );
  }

by removing auth but result is the same....

Metadata

Metadata

Assignees

No one assigned

    Labels

    ⌛ reproduction neededIssue is subtle and requires a true accessible reproduction to debugPriority: Waiting to be assignedTo be inside the next release process, it need to be marked with some level of prioritydart clientIssue relates mainly to the standalone dart clienthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions