Skip to content
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

Error #166

Open
ttdu08of opened this issue Oct 28, 2024 · 24 comments
Open

Error #166

ttdu08of opened this issue Oct 28, 2024 · 24 comments
Labels
support Request for support

Comments

@ttdu08of
Copy link

Hello, I have an error when starting the script... Can you please help ?
image

@MatthewL246
Copy link
Owner

invalid header field value for "Authorization"

The setup script randomly generates the secret key for MinIO, so I wonder if an invalid key is being generated. Can you please follow these steps to share the keys here safely?

# Stop the server
docker compose down

# Back up the current MinIO secrets
mkdir -p backups && cp environment/minio.local.env backups/minio-backup.env

# Regenerate the secrets and invalidate the old ones
./scripts/setup-environment.sh

# Display the MinIO secret key
cat backups/minio-backup.env

Then, please send the old secret key (the line starting with MINIO_ROOT_PASSWORD=) here.

@ttdu08of
Copy link
Author

image

@MatthewL246
Copy link
Owner

It looks like the key is fine, but the script output gives me another idea about what might be going wrong. By default, when you use Git in Windows to clone a repo, it converts the line endings in files from LF (Linux-style) to CRLF (Windows-style), which can break Bash scripts. This is why I recommend cloning the repo inside your WSL distro in the Tips for Windows Users section of the server setup guide.

Can you try re-cloning the repo inside your WSL home directory?

@ttdu08of
Copy link
Author

I did it using the ubuntu application, I didn't use GIT or WSL.

@MatthewL246 MatthewL246 added the support Request for support label Oct 28, 2024
@MatthewL246
Copy link
Owner

Interesting. What's your Git version?

git --version

@ttdu08of
Copy link
Author

My git version is 2.43.0

@MatthewL246
Copy link
Owner

What are the line endings of the scripts?

file ./scripts/*
file ./scripts/internal/*

@ttdu08of
Copy link
Author

Which script? On the CMD?

@MatthewL246
Copy link
Owner

The script files in the repo - just run those two commands and send the output here.

@ttdu08of
Copy link
Author

./setup.sh and docker compose up -d --build ?

@MatthewL246
Copy link
Owner

file ./scripts/*
file ./scripts/internal/*

@ttdu08of
Copy link
Author

ttdu08of commented Oct 28, 2024

exit@DESKTOP-DPBURID:/mnt/c/Users/Théo/Desktop/pretendo-docker$ file ./scripts/*
./scripts/README.md:                   ASCII text, with CRLF line terminators
./scripts/backup.sh:                   Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/compile-custom-inkay.sh:     Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/create-cemu-online-files.sh: Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/create-juxt-community.sh:    Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/full-reset.sh:               Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/get-boss-keys.sh:            Bourne-Again shell script, ASCII text executable
./scripts/internal:                    directory
./scripts/make-pnid-dev.sh:            Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/patch-sssl-certificate.sh:   Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/restore.sh:                  Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/run-in-container:            directory
./scripts/setup-environment.sh:        Bourne-Again shell script, ASCII text executable
./scripts/setup-submodule-patches.sh:  Bourne-Again shell script, ASCII text executable
./scripts/upload-3ds-files.sh:         Bourne-Again shell script, ASCII text executable, with CRLF line terminators
exit@DESKTOP-DPBURID:/mnt/c/Users/Théo/Desktop/pretendo-docker$ file ./scripts/internal/*
./scripts/internal/firstrun-minio-container.sh:        Bourne-Again shell script, ASCII text executable
./scripts/internal/firstrun-mongodb-container.sh:      Bourne-Again shell script, ASCII text executable
./scripts/internal/firstrun-postgres-container.sh:     Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/internal/framework.sh:                       Bourne-Again shell script, ASCII text executable
./scripts/internal/migrations.sh:                      Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/internal/update-account-servers-database.sh: Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/internal/update-miiverse-endpoints.sh:       Bourne-Again shell script, ASCII text executable, with CRLF line terminators
./scripts/internal/update-postgres-password.sh:        Bourne-Again shell script, ASCII text executable, with CRLF line terminators
exit@DESKTOP-DPBURID:/mnt/c/Users/Théo/Desktop/pretendo-docker$

@ttdu08of
Copy link
Author

What should I do now?

@MatthewL246
Copy link
Owner

That is definitely the problem: half of your scripts have CRLF line endings, so those scripts won't work. That is also very strange - I have no idea why half of them would (apparently) randomly have different line endings.

You should be able to rectify the issue by converting them all to LF line endings with the following commands.

sudo apt install dos2unix
find scripts -type f -print0 | xargs -0 dos2unix

@ttdu08of
Copy link
Author

What next?

@MatthewL246
Copy link
Owner

Re-run the setup script, it should be fixed if I'm right about the cause of the error.

@ttdu08of
Copy link
Author

It makes the same error, (I run it with the Ubuntu app)

@MatthewL246
Copy link
Owner

MatthewL246 commented Oct 28, 2024

Can you check if the scripts all have the correct line endings now? Run this and send the output here.

file ./scripts/*
file ./scripts/internal/*
file ./scripts/run-in-container/*

@ttdu08of
Copy link
Author

ttdu08of commented Oct 28, 2024

./scripts/README.md:                   ASCII text
./scripts/backup.sh:                   Bourne-Again shell script, ASCII text executable
./scripts/compile-custom-inkay.sh:     Bourne-Again shell script, ASCII text executable
./scripts/create-cemu-online-files.sh: Bourne-Again shell script, ASCII text executable
./scripts/create-juxt-community.sh:    Bourne-Again shell script, ASCII text executable
./scripts/full-reset.sh:               Bourne-Again shell script, ASCII text executable
./scripts/get-boss-keys.sh:            Bourne-Again shell script, ASCII text executable
./scripts/internal:                    directory
./scripts/make-pnid-dev.sh:            Bourne-Again shell script, ASCII text executable
./scripts/patch-sssl-certificate.sh:   Bourne-Again shell script, ASCII text executable
./scripts/restore.sh:                  Bourne-Again shell script, ASCII text executable
./scripts/run-in-container:            directory
./scripts/setup-environment.sh:        Bourne-Again shell script, ASCII text executable
./scripts/setup-submodule-patches.sh:  Bourne-Again shell script, ASCII text executable
./scripts/upload-3ds-files.sh:         Bourne-Again shell script, ASCII text executable
./scripts/internal/firstrun-minio-container.sh:        Bourne-Again shell script, ASCII text executable
./scripts/internal/firstrun-mongodb-container.sh:      Bourne-Again shell script, ASCII text executable
./scripts/internal/firstrun-postgres-container.sh:     Bourne-Again shell script, ASCII text executable
./scripts/internal/framework.sh:                       Bourne-Again shell script, ASCII text executable
./scripts/internal/migrations.sh:                      Bourne-Again shell script, ASCII text executable
./scripts/internal/update-account-servers-database.sh: Bourne-Again shell script, ASCII text executable
./scripts/internal/update-miiverse-endpoints.sh:       Bourne-Again shell script, ASCII text executable
./scripts/internal/update-postgres-password.sh:        Bourne-Again shell script, ASCII text executable
./scripts/run-in-container/create-account-dat.js:                JavaScript source, ASCII text
./scripts/run-in-container/create-juxt-community.js:             JavaScript source, ASCII text
./scripts/run-in-container/friends-nex-go-rewrite-migration.sql: ASCII text
./scripts/run-in-container/make-pnid-dev.js:                     JavaScript source, ASCII text
./scripts/run-in-container/minio-init.sh:                        POSIX shell script, ASCII text executable
./scripts/run-in-container/mongodb-init.js:                      ASCII text
./scripts/run-in-container/postgres-init.sh:                     POSIX shell script, ASCII text executable
./scripts/run-in-container/update-account-servers-database.js:   JavaScript source, ASCII text
./scripts/run-in-container/update-miiverse-endpoints.js:         JavaScript source, ASCII text

@ttdu08of
Copy link
Author

What should I do ?

@MatthewL246
Copy link
Owner

I am not sure what the problem is at this point, since fixing the line endings didn't solve it.

@ttdu08of
Copy link
Author

Oh right, I wanted to try again with WSL but the problem is that I can't do the “cd” command if you don't mind, can you help me via Anydesk please? Thank you for your help

@MatthewL246
Copy link
Owner

Oh right, I wanted to try again with WSL but the problem is that I can't do the “cd” command

I'm not sure what you mean here. The Ubuntu app is itself WSL: Ubuntu is a Linux distro that runs in the Windows Subsystem for Linux.

can you help me via Anydesk please?

I'm sorry, but I don't have the time to provide 1-on-1 support for issues via remote desktop/video chat.

@ttdu08of
Copy link
Author

Oh right, since I have two applications, one Ubuntu and one WSL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Request for support
Projects
None yet
Development

No branches or pull requests

2 participants