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

[BUG] 404 page not found on Debian unstable #954

Open
josch opened this issue Nov 14, 2022 · 4 comments
Open

[BUG] 404 page not found on Debian unstable #954

josch opened this issue Nov 14, 2022 · 4 comments
Labels

Comments

@josch
Copy link

josch commented Nov 14, 2022

Description

Basically the same as #888

Steps to Reproduce

  1. Download axolotl_1.6.0-1_arm64.deb from the releases page
  2. sudo apt install ./axolotl_1.6.0-1_arm64.deb
  3. run axolotl

Expected behavior: Something that is not a white screen with a 404 error

Actual behavior: A white screen with "404 page not found"

Versions

Please provide the Version as written in Settings->About Axolotl

I wish I had any buttons...

Device

What device or OS are you using?

Debian unstable laptop.

Link to Debug Log

Please provide a link to debug from ~/.cache/upstart/application-click-textsecure.nanuc_textsecure*.log
Be careful it contains sensible data

I have so such file.

@josch josch changed the title [BUG]404 page not found on [BUG] 404 page not found on Debian unstable Nov 14, 2022
@nuehm-arno
Copy link
Collaborator

Hey josch,
logs for Mobian can be found like this:
journalctl --since "2022-03-01 10:00:00" | grep -E 'axolotl|textsecure' > axolotl_logs
with your actual timestamp of interest.
And another question: You said, your OS is Debian usntable on a laptop - is this an x86_64 machine? If so, Axolotl won't work with the deb file installation, because it's built for arm64 machines only.
Cheers

@josch
Copy link
Author

josch commented Nov 23, 2022

No, my laptop is arm64 and not x86_64 -- otherwise the apt install ./axolotl_1.6.0-1_arm64.deb step wouldn't have worked. 🙂

$ dpkg --print-architecture
arm64

Since I filed this bug 9 days ago, I rebooted the machine and now the 404 is gone. The reason is the environment variables exported in /etc/profile.d/axolotl.sh:

# Set environment variables for Axolotl
export AXOLOTL_WEB_DIR=/usr/share/axolotl/axolotl-web/dist
export AXOLOTL_GUI_DIR=/usr/share/axolotl/

Right after installing axolotl_1.6.0-1_arm64.deb, those environment variables are not set yet for the currently running system. It needs a reboot or a re-login or a manual sourcing of /etc/profile.d/axolotl.sh for these variables to take effect.

So this is not a bug in axolotl itself but a bug in the packaging. I'll leave it up to you close this issue or act upon it, for example by making axolotl not need these environment variables.

Now that I no longer get a 404, my next issue is #943 but I already subscribed to that one. 🙂

@nuehm-arno
Copy link
Collaborator

Thanks for the information. You're the first to report the missing sourcing. Normally, the Debian postinst script triggers /etc/profile.d/axolotl.sh to set the variables, but in your case, it didn't. That is a new one and I don't understand why. I'll do some research!

@josch
Copy link
Author

josch commented Nov 24, 2022

The answer is easy. The postinst runs this:

bash -c "source /etc/profile.d/axolotl.sh"
exit 0

So you spawn a bash process and that sources the axolotl.sh. From that point on, that bash process will have all the variables in axolotl.sh set. But then the bash process exits. The shell that spawned bash knows nothing about the variables of the bash process that just exited. Then the postinst shell script exits.

In short: the variables you set in a maintainer script have no influence over the variables set in a user shell.

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

No branches or pull requests

2 participants