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

[Placeholder] Sorry! Something went wrong. #9

Closed
SmartBoy84 opened this issue Jun 1, 2023 · 4 comments
Closed

[Placeholder] Sorry! Something went wrong. #9

SmartBoy84 opened this issue Jun 1, 2023 · 4 comments
Assignees
Labels
question Further information is requested wontfix This will not be worked on

Comments

@SmartBoy84
Copy link

I know way too little with how bash works but exporting the SB_IMAGE env var separately before running the command doesn't seem to work as the script fails with Sorry! Something went wrong.
However, SB_IMAGE=ghcr.io/seia-soto/shadowbox:latest sudo --preserve-env bash -c ./install_server.sh worked for me.

Thank you for this (issue was kind of an excuse to say this lmao)

@seia-soto seia-soto self-assigned this Jun 1, 2023
@seia-soto seia-soto added the question Further information is requested label Jun 1, 2023
@seia-soto
Copy link
Owner

seia-soto commented Jun 1, 2023

I don't have enough resource to test the full deployment yet due to some high load task now but export seems working as expected.

There's nothing useful as I can see now, but I expect that it can be related to environmental specific problem such as shell you're using or pre-existing image in same name.

I'll test further when I can allocate some computational resource here.

Last login: Thu Jun  1 08:25:56 on ttys004

~
% export TEST_AA=1                                                 

~
% echo 'echo $TEST_AA' | bash
1

@seia-soto seia-soto changed the title Weird command issue Weird command issue (Sorry! Something went wrong.) Jun 1, 2023
@seia-soto
Copy link
Owner

seia-soto commented Jun 1, 2023

Possible troubleshootings

For someone visited this page due to the error above, please try one of followings manually:

Adding sudo or running as root

# master release, updated daily (might fail sometime)
export SB_IMAGE="ghcr.io/seia-soto/shadowbox:master"

# stable release, NOT MORE UPDATED (It is for outline-server v1.9 or lower, use `latest` instead)
export SB_IMAGE="ghcr.io/seia-soto/shadowbox:release"

# latest release, updated irregularly
export SB_IMAGE="ghcr.io/seia-soto/shadowbox:latest"

curl -sL "https://raw.githubusercontent.com/Jigsaw-Code/outline-server/master/src/server_manager/install_scripts/install_server.sh" | sed '/local MACHINE_TYPE/,/fi/{d}' | sudo --preserve-env bash

Manually populating the environment variables

This answer is based on @SmartBoy84 's solution and will create a file called script.sh in the same directory of shell's working directory.

curl -sL "https://raw.githubusercontent.com/Jigsaw-Code/outline-server/master/src/server_manager/install_scripts/install_server.sh" | sed '/local MACHINE_TYPE/,/fi/{d}' > ./install_server.sh

SB_IMAGE=ghcr.io/seia-soto/shadowbox:latest sudo --preserve-env bash -c ./install_server.sh

@seia-soto seia-soto changed the title Weird command issue (Sorry! Something went wrong.) [Placeholder] Sorry! Something went wrong. Jun 1, 2023
@seia-soto seia-soto added the wontfix This will not be worked on label Jun 1, 2023
@seia-soto seia-soto pinned this issue Jun 1, 2023
@SmartBoy84
Copy link
Author

It seems env can be separately set but bash needs to be run with --preserve-env flag on the pi
So maybe just change | bash to | sudo --preserve-env bash in the README?

@seia-soto
Copy link
Owner

Thanks @SmartBoy84 for pointing out, I updated the comment.

@seia-soto seia-soto closed this as not planned Won't fix, can't repro, duplicate, stale Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants