phrase-cli icon indicating copy to clipboard operation
phrase-cli copied to clipboard

Intermittent Error During phrase pull in Workflow

Open jimmymcpeter opened this issue 9 months ago • 5 comments

We are experiencing an intermittent error during the phrase pull step in our workflow. This issue occurs approximately once a week at random times and has been ongoing for about a year. When the error occurs, we just rerun the workflow, and it succeeds. This thread seems to have the most info I've found on it, but I'm not involved with the go language to be any sort of expert. Any advice on how to triage or resolve this?

ERROR: stream error: stream ID 3; INTERNAL_ERROR; received from peer for /home/runner/work/myrepo/myrepo/source/strings.csv

jimmymcpeter avatar Mar 25 '25 15:03 jimmymcpeter

Hey @jimmymcpeter is it a big file? how long does it takes to pull it (when it works)?

jablan avatar Mar 26 '25 08:03 jablan

Hi, thanks for helping with this. It's definitely a big project (over 45k keys).

The ui_text files are where it usually fails but this is sometime different -- these take 5-6 seconds to download and contain 30k keys. I'll attach some screenshots below with timestamps --

Successful sync:

Image

Failed sync:

Image

File sizes:

Image

jimmymcpeter avatar Mar 26 '25 14:03 jimmymcpeter

Thank you @jimmymcpeter for the detailed infos. We tracked the issue internally (STRINGS-2106) and will plan it into the upcoming work.

In the meantime, could you try using the -a param for pulling? It will use the async approach, ensuring that even big files can be downloaded without any issues. This could lead to a bit longer download times, but should ensure successfull downloads (if they were caused by timeouts).

forelabs avatar Apr 22 '25 12:04 forelabs

Hi @forelabs was there a change deployed this morning related to this? I noticed the server did nothing for 60 seconds before throwing a new 504 gateway timeout error (screenshot below).

Image

jimmymcpeter avatar Apr 22 '25 14:04 jimmymcpeter

In the meantime, could you try using the -a param for pulling?

There appears to be an issue with the CLI and the -a param. Should I open this as a separate issue?

phrase version     
2.40.0

phrase pull -a     

panic: reflect: call of reflect.Value.Call on zero Value

goroutine 1 [running]:
reflect.flag.mustBe(...)
        /usr/local/go/src/reflect/value.go:233
reflect.Value.Call({0x0?, 0x0?, 0x30?}, {0xc0000b6a58?, 0xc0003970ba?, 0xd8e420?})
        /usr/local/go/src/reflect/value.go:378 +0x111
github.com/phrase/phrase-cli/cmd/internal.asyncDownloadParams({{0x0, {0x0, 0x0}}, {0x0, {0x0, 0x0}}, {0x0, {0x0, 0x0}}, {0x0, ...}, ...})
        /go/src/github.com/phrase/phrase-cli/cmd/internal/pull.go:276 +0x294
github.com/phrase/phrase-cli/cmd/internal.(*Target).downloadAsynchronously(_, _, _, {{0x0, {0x0, 0x0}}, {0x0, {0x0, 0x0}}, {0x0, ...}, ...})
        /go/src/github.com/phrase/phrase-cli/cmd/internal/pull.go:188 +0x58
github.com/phrase/phrase-cli/cmd/internal.(*Target).DownloadAndWriteToFile(0xc00012e3c0, 0xc0001041c0, 0xc00038e9a0, 0x1)
        /go/src/github.com/phrase/phrase-cli/cmd/internal/pull.go:181 +0x813
github.com/phrase/phrase-cli/cmd/internal.(*Target).Pull(0xc00012e3c0, 0xc0001041c0, 0x1)
        /go/src/github.com/phrase/phrase-cli/cmd/internal/pull.go:131 +0x12b
github.com/phrase/phrase-cli/cmd/internal.(*PullCommand).Run(0xc0000b7bc8, 0xe4ded2?)
        /go/src/github.com/phrase/phrase-cli/cmd/internal/pull.go:82 +0x498
github.com/phrase/phrase-cli/cmd.initPull.func1(0xc0002cb900?, {0xe4daf3?, 0x4?, 0xe4da87?})
        /go/src/github.com/phrase/phrase-cli/cmd/pull.go:25 +0xd4
github.com/spf13/cobra.(*Command).execute(0xc0002ea008, {0xc00010e080, 0x1, 0x1})
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:989 +0xab1
github.com/spf13/cobra.(*Command).ExecuteC(0x1295b00)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:1041
github.com/phrase/phrase-cli/cmd.Execute()
        /go/src/github.com/phrase/phrase-cli/cmd/root.go:70 +0x1a
main.main()
        /go/src/github.com/phrase/phrase-cli/main.go:8 +0xf

jimmymcpeter avatar Apr 22 '25 14:04 jimmymcpeter