hashgraph / hedera-sdk-js

Hedera™ Hashgraph SDK for JavaScript/TypeScript
https://docs.hedera.com/guides/docs/sdks
Apache License 2.0
277 stars 146 forks source link

getNextMirrorNode returning undefined when used with Angular framework #1117

Closed ed-marquez closed 2 years ago

ed-marquez commented 2 years ago

Description

A user is reporting an error coming from angular app when usingjs-sdk.... it all works good from node app, same hedera pkg version though.

Steps to reproduce

Looks like the function getNextMirrorNode returns undefined.

It even sends the message, but can't subscribe to it

     const cancel = client._mirrorNetwork
            .getNextMirrorNode()
            .getChannel()
            .makeServerStreamRequest(
                "ConsensusService",
                "subscribeTopic",
                request,

See error in screenshot in the next section.

Additional context

The error in the attached image occurs:

screenshotError

Hedera network

testnet, other

Version

v2.11.3

Operating system

No response

mehcode commented 2 years ago

Please see https://github.com/hashgraph/hedera-sdk-js/issues/1114. The mirror nodes do not support use in a browser environment.

ed-marquez commented 2 years ago

Got it. Thanks for the quick response. Are we considering adding that in a future release? If so, happy to help find users to help define requirements.

mehcode commented 2 years ago

It couldn't be added here. It would need to be added to the mirror nodes themselves. They don't expose a grpc-web endpoint.