TezosTaqueria / taqueria

*BETA* Taqueria provides a seamless development workflow to easily build, test and deploy your Tezos applications.
https://taqueria.io
Apache License 2.0
64 stars 20 forks source link

๐Ÿ› Bug โžพ HttpRequestFailed on macos in local env #1848

Closed SouchonTheo closed 1 year ago

SouchonTheo commented 1 year ago

๐Ÿšฅ Status (Internal Taqueria Team Use Only)

๐Ÿ†˜ What happened?

Problem

When I try this command locally

taq originate counter.tz

I get a response:

Error while performing operation:
HttpRequestFailed: GET http://localhost:20000/chains/main/blocks/head/context/contracts/tz1aSkwEot3L2kmUvcoxzjMomb9mvBNuzFK6/manager_key Error: socket hang up {
  "name": "HttpRequestFailed"
}
No operations performed

More information

Docker

Input

docker ps

Output

CONTAINER ID   IMAGE                                         COMMAND                  CREATED         STATUS         PORTS                      NAMES
f7bc83ad6ff9   ghcr.io/ecadlabs/tzkt-api:v1.11.0-taqueria    "dotnet Tzkt.Api.dll"    7 minutes ago   Up 7 minutes   0.0.0.0:5001->5000/tcp     taq-tzkt-api-local-3f8d8
acdc32e063a3   ghcr.io/ecadlabs/tzkt-sync:v1.11.0-taqueria   "dotnet Tzkt.Sync.dll"   7 minutes ago   Up 7 minutes                              taq-tzkt-sync-local-3f8d8
d500a9014a33   postgres:14.5-alpine                          "docker-entrypoint.sโ€ฆ"   7 minutes ago   Up 7 minutes   0.0.0.0:5432->5432/tcp     taq-postgres-local-3f8d8
7c38d5ad5c19   oxheadalpha/flextesa:20221123                 "/bin/sh"                7 minutes ago   Up 7 minutes   0.0.0.0:20000->20000/tcp   taq-flextesa-local-3f8d8

taq list

Input

taq list accounts local

Output

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Account โ”‚ Balance โ”‚ Address                              โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ bob     โ”‚ 3000 ๊œฉ  โ”‚ tz1aSkwEot3L2kmUvcoxzjMomb9mvBNuzFK6 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ alice   โ”‚ 3000 ๊œฉ  โ”‚ tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ john    โ”‚ 3000 ๊œฉ  โ”‚ tz1Zwoh1QCVAvJ4sVTojMp9pLYp6Ji4NoZy6 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ jane    โ”‚ 3000 ๊œฉ  โ”‚ tz1aHUAC4oviwJuZF1EvVSvFz7cu9KMNYBph โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ joe     โ”‚ 3000 ๊œฉ  โ”‚ tz1MVGjgD1YtAPwohsSfk8i3ZiT1yEGM2YXB โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ†˜ Steps to Reproduce?

I followed the quickstart tutorial step by step

๐Ÿชต Relevant log output

No response

๐Ÿ˜ How impactful is this bug?

๐Ÿค” Notable but managable

โฑ๏ธ Prevalance

No response

๐Ÿ’ป Operating System

MacOS

๐Ÿ•ธ๏ธ System Architecture

arm64 (M1 Macs)

๐ŸŒฎ Taqueria Version

v0.28.2

๐ŸŒฟ Node.js Version

v19.7.0

โ˜Ž๏ธ Contact Details

souchontheo24@gmail.com

Code of Conduct

mweichert commented 1 year ago

@SouchonTheo thanks for the report!

I believe you're running into this issue: https://github.com/ecadlabs/taqueria/issues/1846

I'm about to push a release that will include a fix for the issue above and hopefully resolve your issue.

I'll post back once the release is out. It would be great if you could give it a try and post back whether or not it resolves your issue. If not, perhaps we can dig into the issue a little more. I'd like to see this issue resolved.

Thanks!

SouchonTheo commented 1 year ago

@SouchonTheo thanks for the report!

I believe you're running into this issue: #1846

I'm about to push a release that will include a fix for the issue above and hopefully resolve your issue.

I'll post back once the release is out. It would be great if you could give it a try and post back whether or not it resolves your issue. If not, perhaps we can dig into the issue a little more. I'd like to see this issue resolved.

Thanks!

I add a small precision, I made tests 1min, 1h and 5h after the starting of the sandbox in local and that does not seem to change the problem. I'm waiting for your patch and if the problem is not solved I'll contact you again about this problem.

Thank you for your reply and your work

SouchonTheo commented 1 year ago

Update

After updating taqueria (v0.28.3), I did the test again and the error is still present. Also, the time before the error is displayed is longer, I guess this is related to your latest patch which applies the retry until the end of the timeout.

Best regards,

Theo

mbodecek commented 1 year ago

I ran into the same issue both locally and in CI (linux based docker container).

I believe the start sandbox task is now exiting with flextesa not being fully started yet (or at least able to accept requests).

I can easily replicate this:

Fails: taq start sandbox && curl http://localhost:20000/chains/main/blocks/head

(returns url: (52) Empty reply from server)

Works: taq start sandbox && sleep 10 && curl http://localhost:20000/chains/main/blocks/head

mbodecek commented 1 year ago

Re fix in #1846: I think this doesn't address the situation when I want to use the sandbox externally (e.g. tests)

SouchonTheo commented 1 year ago

Re fix in #1846: I think this doesn't address the situation when I want to use the sandbox externally (e.g. tests)

I ran the command line you sent me and I get a response from the server. I don't find this surprising as I was already able to do it with postman for example.

On the other hand, it reassures me that I'm not the only one this happens to.

On the other hand always the same, I let the server run to be sure to leave it the necessary time but it remains impossible to originate the contract

mweichert commented 1 year ago

Thanks for reporting this. I'll look into this tomorrow morning. It should be something we can easily fix and include in a release this week.

On Mon, Mar 20, 2023 at 9:42โ€ฏPM Thรฉo Souchon @.***> wrote:

Re fix in #1846 https://github.com/ecadlabs/taqueria/issues/1846: I think this doesn't address the situation when I want to use the sandbox externally (e.g. tests)

I ran the command line you sent me and I get a response from the server. I don't find this surprising as I was already able to do it with postman for example.

On the other hand, it reassures me that I'm not the only one this happens to.

On the other hand always the same, I let the server run to be sure to leave it the necessary time but it remains impossible to originate the contract

โ€” Reply to this email directly, view it on GitHub https://github.com/ecadlabs/taqueria/issues/1848#issuecomment-1477168065, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC3LC2RQEURYRC7AZWDERDW5EBRRANCNFSM6AAAAAAVNSQYDE . You are receiving this because you commented.Message ID: @.***>

SouchonTheo commented 1 year ago

I reset my computer to have a cleaner installation on my computer and I used node 16.19.1 and the command works.

So I guess you have to use this version of node on macos to be able to work with the local environment