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

Template 'index.html' not found #3009

Closed
noob2020-alt opened this issue Jun 30, 2024 · 9 comments
Closed

Template 'index.html' not found #3009

noob2020-alt opened this issue Jun 30, 2024 · 9 comments
Labels

Comments

@noob2020-alt
Copy link

noob2020-alt commented Jun 30, 2024

Please forgive me as I am new to setting this up. I have tried to connect to caldera through various steps and I think I at the final point, but can't get the web UI working. I get the Template index not found.

Info that may be of use:

Running VM on ESXi 8
Ubuntu 22.04 LTS (Jammy Jellyfish)
16 GM ram
1 TB storage (thin provisioned)

So far I have used the posts in this issues thread to fix various errors I have encountered which has been helpful.

My steps:

Due to being a fresh Ubuntu 22.04 instal I had to add some dependencies for the issues I saw when trying to install Caldera on Ubuntu 24.04.

Installed upon first boot:
python3-pip


golang ( I found this on stack overflow)
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt update
sudo apt install golang-go


npm
pip3 install docker, donut
snap install vue
pip3 install cryptography, openssl version (found in the issues thread)

This got the program running ok on the cli, but the webpage there is an issue.

Once I managed to narrow down the errors and install the appropriate fixes, I did the following:

rm -r conf/local.yml
python3 server.py --fresh

caldera-cmd

##NOTE I attempted the --insecure --build command first.

Since there were not errors, I went to the web UI and went to the webpage:

http://127.0.0.1:8888 -- output Template 'index.html' not found

I then saw a thread about changing the .env file in the magma folder.

I did this and rebooted system.

python3 server.py --build ## to attempt to rebuild the server:

caldera-build

I did the command
npm i [email protected]. - to address the issue with vue
npm audit fix force -- to resolve the vulnerabilities found when compiling vue.

npm is installed and I attempted to try again by changing the npm to pnpm (saw this in the issue thread.).

Still not able to get a webpage.

I am not sure what I am doing wrong.

Copy link

Looks like your first issue -- we aim to respond to issues as quickly as possible. In the meantime, check out our documentation here: http://caldera.readthedocs.io/

@elegantmoose
Copy link
Contributor

Sounds like the UI components are not building and completing.

Can you run python3 server.py --fresh --insecure --build and provide full stacktrace?

@noob2020-alt
Copy link
Author

Apologies for the delay. Here is the output:

Screenshot 2024-07-02 at 5 16 03 PM
Screenshot 2024-07-02 at 5 25 42 PM

I tried to troubleshoot the errors, but was not successful.

@elegantmoose
Copy link
Contributor

And you are sure you have NodeJS v16 or higher?

@lukasz-gospodarek
Copy link

Have the same error, running caldera from docker-compose

@noob2020-alt
Copy link
Author

And you are sure you have NodeJS v16 or higher?

Sorry for the long delay.
Yes I am sure I have it installed.

I am going to try and rebuild the VM again and try again, but this is an issue

@cmndcntrlcyber
Copy link

cmndcntrlcyber commented Sep 3, 2024

I was having this issue also. I tried option B first, but Option A fixed it for me, after some troubleshooting with ChatGPT, I got this answer:

The issue you're encountering is related to the Node.js version installed on your system. The warnings indicate that several packages require a newer version of Node.js than the one currently installed (v12.22.9`). Specifically, many of the packages require at least Node.js version 14, 16, or 18.

Steps to Resolve the Issue

1. Upgrade Node.js

To resolve these warnings and ensure compatibility with the packages you are trying to install, you should upgrade Node.js to a more recent version. Here's how you can do that:

Option A: Using Node Version Manager (NVM)

  • NVM is a tool that allows you to manage multiple versions of Node.js on your system.

  • If you don't have NVM installed, you can install it by running:

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
  • After installation, load NVM into your shell session:

    source ~/.nvm/nvm.sh
  • Install the latest LTS (Long Term Support) version of Node.js:

    nvm install --lts
  • You can switch to the newly installed version using:

    nvm use --lts

Option B: Direct Installation

  • Alternatively, you can install or upgrade Node.js directly by downloading it from the official website or using a package manager like apt for Ubuntu:

    sudo apt-get update
    sudo apt-get install -y nodejs npm

    This method might not give you the latest version, so using NVM is generally recommended.

2. Verify the Node.js Version

  • After upgrading, verify the Node.js and npm versions:

    node -v
    npm -v
  • Ensure that the Node.js version is at least 14 or higher.

3. Re-run the npm Install

  • After upgrading Node.js, try installing the dependencies again:
    npm install @vue/compiler-sfc --save-dev

4. Rebuild the Project

  • Once you've resolved the Node.js version issue, rebuild the project:
    npm run build

5. Re-run the Caldera Server Command

  • Finally, attempt to run your original command again:
    python3 server.py --fresh --insecure --build

Upgrading Node.js should eliminate the EBADENGINE warnings and allow your project dependencies to install and function correctly.

@elegantmoose
Copy link
Contributor

@cmndcntrlcyber Appreciate that write up, hopefully it helps.

@noob2020-alt
Copy link
Author

Many thanks to you for these commands. Much appreciated. This helped me get it working along with another fix. There is also an issue with having to update the .env file and changing the ip address to the actual host address and not 0.0.0.0.

I found this on another forum. Since the "--build" function points to the default.yml file, I had to change the address in the default.yml file and the .env file.

Using IPv4 192.168.1.1 as an example address--

I change the address in the following tow files:

caldera/conf/default.yml -- changed the host.app line to https://192.168.1.1

Copied the .env file to another folder:

cp plugins/magma/.env.template plugins/magma/.env

Changed the ip to match the ip in the hosts file:

nano plugins/magma.env -- changed ip from localhost to 192.168.1.1

Ran the command given above:

python3 server.py --insecure --build

image

Many thanks again for the response.

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

4 participants