wintexpro / echpochmak

Echpochmak, is a framework based on TONOS Client Library for TON DApp development
Apache License 2.0
7 stars 2 forks source link

[TONClient.queries] WebSocket Failed #4

Open asnov opened 3 years ago

asnov commented 3 years ago
- **Other information** (e.g. detailed explanation, stack traces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

% tondev info TON Labs Dev Tools 0.17.7

default network/blockchain:

Used version: latest Bound to host port: 8080 Docker image: tonlabs/local-node:latest Docker container: tonlabs-local-node-alexnew running

Compilers:

Used version: latest Docker image: tonlabs/compilers:latest Docker container: tonlabs-compilers-alexnew running


http://localhost:8080/graphql is accessible and works fine.

Any advices, please?
rightjelkin commented 3 years ago

The problem is "WebSocket Failed" spam? If so, we are don't know why it happens and created a PR for ton sdk to hide it by flag, but sdk maintainer made a mistake when merging, and I think we should recreate that PR.

Or the prolem is a process hang outing with given no asserts results?

asnov commented 3 years ago

Yes, you're right. The process is hang outing with given no asserts results. This is a problem.

And regarding "WebSocket Failed", I don't think it is spam because it appears during manager.createClient(['http://localhost:8080/graphql']) call from this line: https://github.com/wintexpro/echpochmak/blob/master/tests/example.test.js#L6

For me, it looks like createClient() is not working properly. May be this is a bug. May be this is a my local settings error but as I said I can connect to localhost:8080/graphql without any issues. So, please, advise me any additional method to help you in troubleshooting this issue. Thanks!

RTSTALER commented 3 years ago

@asnov Thanks for the feedback, can you tell me what operating system and node.js version you have?

asnov commented 3 years ago

@RTSTALER , I am on the next system:

$ uname -a
Darwin Alexeys-MacBook-Pro.local 18.7.0 Darwin Kernel Version 18.7.0: Fri Oct 30 12:37:06 PDT 2020; root:xnu-4903.278.44.0.2~1/RELEASE_X86_64 x86_64
$ node -v
v12.7.0
RTSTALER commented 3 years ago

Maybe you can use http://127.0.0.1:8080 instead of http://localhost:8080/graphql?

rightjelkin commented 3 years ago

@RTSTALER , I am on the next system:

$ uname -a
Darwin Alexeys-MacBook-Pro.local 18.7.0 Darwin Kernel Version 18.7.0: Fri Oct 30 12:37:06 PDT 2020; root:xnu-4903.278.44.0.2~1/RELEASE_X86_64 x86_64
$ node -v
v12.7.0

Will try to test it on macos. May be the reason is network features in Docker Desktop for Mac...

asnov commented 3 years ago

I changed to http://127.0.0.1:8080. Here is what I get:

Stopping [tonlabs-local-node-alexnew]... ✓
Removing [tonlabs-local-node-alexnew]... ✓
Creating tonlabs-local-node-alexnew... ✓
Starting tonlabs-local-node-alexnew... ✓
[getClientConfig] for server "http://127.0.0.1:8080" failed {
  message: 'request to http://127.0.0.1:8080/graphql?query=%7Binfo%7Bversion%7D%7D failed, reason: socket hang up',
  data: {
    http_url: 'http://127.0.0.1:8080/graphql',
    ws_url: 'ws://127.0.0.1:8080/graphql'
  }
}
[TONClient.queries] WebSocket Failed
[getClientConfig] for server "http://127.0.0.1:8080" failed {
  message: 'request to http://127.0.0.1:8080/graphql?query=%7Binfo%7Bversion%7D%7D failed, reason: socket hang up',
  data: {
    http_url: 'http://127.0.0.1:8080/graphql',
    ws_url: 'ws://127.0.0.1:8080/graphql'
  }
}
[TONClient.queries] WebSocket Failed
[getClientConfig] for server "http://127.0.0.1:8080" failed {
  message: 'request to http://127.0.0.1:8080/graphql?query=%7Binfo%7Bversion%7D%7D failed, reason: socket hang up',
  data: {
    http_url: 'http://127.0.0.1:8080/graphql',
    ws_url: 'ws://127.0.0.1:8080/graphql'
  }
}
[TONClient.queries] WebSocket Failed
[getClientConfig] for server "http://127.0.0.1:8080" failed {
  message: 'request to http://127.0.0.1:8080/graphql?query=%7Binfo%7Bversion%7D%7D failed, reason: socket hang up',
  data: {
    http_url: 'http://127.0.0.1:8080/graphql',
    ws_url: 'ws://127.0.0.1:8080/graphql'
  }
}
[TONClient.queries] WebSocket Failed
[getClientConfig] for server "http://127.0.0.1:8080" failed {
  message: 'request to http://127.0.0.1:8080/graphql?query=%7Binfo%7Bversion%7D%7D failed, reason: socket hang up',
  data: {
    http_url: 'http://127.0.0.1:8080/graphql',
    ws_url: 'ws://127.0.0.1:8080/graphql'
  }
}
[TONClient.queries] WebSocket Failed
[getClientConfig] for server "http://127.0.0.1:8080" failed {
  message: 'request to http://127.0.0.1:8080/graphql?query=%7Binfo%7Bversion%7D%7D failed, reason: socket hang up',
  data: {
    http_url: 'http://127.0.0.1:8080/graphql',
    ws_url: 'ws://127.0.0.1:8080/graphql'
  }
}
[TONClient.queries] WebSocket Failed
[getClientConfig] for server "http://127.0.0.1:8080" failed {
  message: 'request to http://127.0.0.1:8080/graphql?query=%7Binfo%7Bversion%7D%7D failed, reason: socket hang up',
  data: {
    http_url: 'http://127.0.0.1:8080/graphql',
    ws_url: 'ws://127.0.0.1:8080/graphql'
  }
}
[TONClient.queries] WebSocket Failed
[TONClient.queries] WebSocket Failed
[TONClient.queries] WebSocket Reconnected

At the same time opening http://127.0.0.1:8080/graphql?query=%7Binfo%7Bversion%7D%7D in the browser gives me correct page with {info{version}} GraphQL-request.

RTSTALER commented 3 years ago

@asnov Update the package in npm before version 0.2.13 , the output should show you more information about the error

Aryabahar52 commented 5 months ago

how i can install npm install -g toncli this