Skip to content

Page 8. Troubleshoot

Morsmalleo edited this page Jan 1, 2023 · 15 revisions

Table of Errors

All fixes for these errors must be run inside of the Linux Terminal, macOS Terminal, Command Prompt or Powershell over the AhMyth/AhMyth-Server directory!

Terminal Errors + Fixes

Running as root without --no-sandbox is not supported

This happens because you are trying to start AhMyth as root, and by default electron does not allow applications to start as root outside of the chrome-sandbox for security reasons.

To run AhMyth as root out of the chrome sandbox, run the following command;

$ npx electron ./app --no-sandbox start

libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)

This error is usually seen when running recent versions of electron in Virtual Machines, AhMyth needs electron v11.5.0 to operate properly both on Host and Virtual PC OS's, run the command below to fix the issue

$ npm uninstall electron && npm uninstall -g electron && npm install -g electron@11.5.0

sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process

This usually happens when you have two electron installations trying to start one application, hence the error message being printed in the terminal;

InitializeSandbox() called with multiple threads in process gpu-process

With AhMyth, you most likely have electron installed globally as well as locally inside the AhMyth/AhMyth-Server directory which means there will be a node_modules folder located inside the AhMyth/AhMyth-Server directory.

You have two options from here,

either remove electron globally with;

sudo npm uninstall -g electron

or you may choose to remove electron locally with;

rm -rf AhMyth/AhMyth-Server/node_modules

Removing either one will fix the problem, but it is recommended that you remove electron locally by removing the node_modules folder, instead of removing electron globally.

libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed

This error is seen a lot when it comes to using a more recent version of electron in Virtual Machines, when facing this terminal error, you will also experience a broken AhMyth interface.

Users facing this error will need to refer to the libva error: vaGetDriverNameByIndex error fix in order to resolve it until I can figure out what causes the error so it can be fixed.

Usage & GUI Errors + Fixes

Broken AhMyth Interface

This usually happens because of three reasons

A. You have the wrong electron version installed in which case you need to refer to the libva error: vaGetDriverNameByIndex error fix

B. You have two electron installations trying to start AhMyth, in which case you need to refer to the sandbox_linux.cc error fix

C. You are running a more recent version of electron inside a Virtual Machine, in which case you'll need to refer to the libva error: vaGetDriverNameByIndex error fix

Adding source ip:port failed

This is happening due to 4 reason.

  1. User has installed AhMyth as root user and has launched AhMyth as regular user

  2. User installed AhMyth as regular user and is launching AhMyth as root user

  3. User installed AhMyth as root to regular user home instead of root user home

  4. User installed AhMyth as regular user to the root user home instead of the regular user home

Remove AhMyth completely and follow the setup wiki based on your OS to fix this problem.

If the problem still persists the run this command to see if it fixes your problem, if it doesn't then open an issue ticket.

$ sudo chmod -R a+rwX /path/to/AhMyth

Decompiling Failed

This isn't a problem with AhMyth, it's a problem with Apktool as well as the APK it's being used on.

Most of the time this happens when you are trying to decompile an APK that is obfuscated or protected, other times the problem is related to Apktool.

The error log file generated by a failed Decompiling Process will determine why Decompiling fails, they are generated in the Logs folder, whatever the error with Decompiling is in the log file, just copy it and open an issue ticket about it.

Reading Launcher Activity Failed

This happens on The Launch Binding option because the Launchable Activity for the Original APK being bound, has been found by reading the original APK's manifest, but cannot be found in anywhere in the Smali directory, indicating that it's located in one of the "Smali_classes" folders, so it fails to read the launcher activity.

There's nothing you can do about this other than wait for it to be updated and stabilised, all you can do is use The Boot method until it gets fixed.

Cannot Find the Launcher Activity in the Manifest, Please use the "On Boot" Method to use this APK as a Template

Similar to the problem above, however this error happens when AhMyth tries to read the manifest of the original APK in order to find a Smali point to inject its hook, but unfortunately cannot find a Smali point to hook at all from reading the said manifest, therefore it doesn't bother searching for it, so when that happens that means that AhMyth "Cannot find the launcher activity" and you should "try the other binding method" instead for a workaround.

Building Failed

This happens because of a few reasons, see below for more information.

  1. You are running the wrong Java version, when you should be running Java 11.

If this is the case then run the commands below to fix the problem

apt-get install openjdk-11-jdk* openjdk-11-jre* -y && update-alternatives --config java

  1. This should be done automatically, but just in case it's not, you may need to empty the framework directory for AhMyth's Apktool
java -jar path/to/AhMyth/AhMyth-Server/app/app/Factory/./apktool.jar empty-framework-dir --force

  1. You have a broken java installation

If this is the case then you'll need to fix it yourself as this is problem that's not related to AhMyth but your OS.

  1. AhMyth can't build the APK because Apktool is throwing an Unsigned Short Value error in which case you'll need to use another APK as a Template until further updates are implemented to fix this.

Signing Failed

Pretty much the same reasons as above save for one other reason, but the reasons this happens are the following

  1. You are running the wrong Java version, when you should be running Java 11.

If this is the case then run the commands below to fix the problem

apt-get install openjdk-11-jdk* openjdk-11-jre* -y && update-alternatives --config java 

  1. You don't have zipalign installed (32bit OS's Only)

If this is the case, then run the command below to fix the issue, zipalign is required because the new signer for AhMyth requires zipalign to operate properly.

apt-get install zipalign* -y

  1. You have a broken java installation

If this is the case then you'll need to fix it yourself as this is a problem that's related to your Operating System, not AhMyth.

Clone this wiki locally