-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cryptic Error with Different User: 'ERROR: parsing time "{\x0a \"registry-1.dock" as "2006-01-02T15:04:05Z07:00": cannot parse "{\x0a \"registry-1.dock" as "2006"' #3066
Comments
I didn't manage to repro with your Dockerfile:
Looking at the error when running with |
Yeah, I can't normally produce it either, except in this odd circumstance. I was hoping there was some sort of hidden logs or config you could point me to. |
Can you try with debug enabled?
|
Exact same output; which is why I'm stumped for debugging. $ BUILDX_GIT_INFO=false docker --debug buildx build -t wip -f Dockerfile .
ERROR: parsing time "{\x0a \"registry-1.dock" as "2006-01-02T15:04:05Z07:00": cannot parse "{\x0a \"registry-1.dock" as "2006" |
I wonder if the error is some code trying to parse a (JWT) access-token, and trying to get the expiration date from it. The For example, this is what i have stored as a token; {"ServerURL":"https://index.docker.io/v1/","Username":"svstijn","Secret":"<REDACTED>"} There output from the error could be if it was printed (only showing the field values?) The And while searching if I found something related to this, I found various examples trying to get the |
Did a quick try with some naive code trying to do so, and what it could look like; https://go.dev/play/p/-tOY8WNVFQj package main
import (
"encoding/json"
"fmt"
"time"
)
func main() {
const resp = `{"ServerURL":"https://index.docker.io/v1/","Username":"my-username","Secret":"REDACTED"}`
type Token struct {
ServerURL string
Username string
Secret string
}
var out2 Token
_ = json.Unmarshal([]byte(resp), &out2)
jsonString := fmt.Sprintf("%v", out2)
fmt.Println(jsonString)
_, err := time.Parse(time.RFC3339, jsonString)
if err != nil {
fmt.Println("ERROR:", err)
}
} That produces;
Also wondering if it could be something in the registry (or in between); there's some partying happening in here; https://github.com/distribution/distribution/blob/98dd92206f26f9d57535f79cb214c86ec07978b3/registry/storage/linkedblobstore.go#L175-L196 |
@crazy-max if it's buildx; could it be something like this code? (not sure how a JSON would end up in that file though); Lines 160 to 173 in 18ccba0
|
Contributing guidelines
I've found a bug and checked that ...
Description
I have docker installed via the recommended steps on website, for ubuntu. (If relevant, I've used docker for years, so I don't think there's an installation issue; see details below).
This is the "main" user I have:
Now, for another process (simplified), there's another needed user, but its setup to be nearly identical to main user. It was created using adduser, with the same uid and gid and groups as main user; you can't even tell the difference (this was called by "otheruser").
Logged into both users, pulling works just fine, and status commands give the same, so I don't think it's the cli. But when I try buildx build (or buildx ls), that's where the cryptic error comes. (Note: it used to work... then something changed, and I can't figure out what).
I feel like I must've caused it somehow... but I have no clue how or why, and I can't seem to find any relevant issues.
Expected behaviour
Actual behaviour
Buildx version
(Both users):
github.com/docker/buildx v0.21.1 7c2359c
Docker info
docker version
docker info
Builders list
Configuration
cat .dockerignore
*
cat Dockerfile
The build directory is on an xfs mount, but the docker data is at the original /var/something/docker, and there's no daemon file configured.
(I've tried with/without --load; can't think of any relevant other flags. --progress is useless, doesn't get that far)
Build logs
Additional info
I've checked that the filesystem is OK / uncorrupted, but I can't think of anything else.
The text was updated successfully, but these errors were encountered: