xtekky/gpt4free · error

android runtime present but runner missing; rerun g4f-go to

Error message

android runtime present but runner missing; rerun g4f-go to build it

What it means

Error "android runtime present but runner missing; rerun g4f-go to build it" thrown in xtekky/gpt4free.

Source

Thrown at g4f-go/runtime_android.go:75

	// Check for Termux's official package name
	return strings.Contains(string(output), "com.termux"), nil
}

// androidPythonHome is the prefix dir of the merged android python layout.
func androidPythonHome(binDir string) string {
	return filepath.Join(binDir, "python-home")
}

// androidPythonExecutable returns the C runner path once the runtime is
// merged (otherwise an error telling the user to install Termux).
func androidPythonExecutable(binDir string) (string, error) {
	runner := filepath.Join(binDir, "pyandroid")
	if fi, err := os.Stat(runner); err == nil && !fi.IsDir() {
		return runner, nil
	}
	if fi, err := os.Stat(androidPythonHome(binDir)); err == nil && fi.IsDir() {
		// runtime present but runner not built yet
		return "", fmt.Errorf("android runtime present but runner missing; rerun g4f-go to build it")
	}
	return "", nil
}

// androidPythonExe returns the interpreter path for the android layout
// (the dlopen target inside the runner).
func androidPythonExe(binDir string) string {
	return filepath.Join(androidPythonHome(binDir), "lib", "libpython3.14.so")
}

// buildAndroidRunner compiles pyandroid_runner.c against the downloaded
// python headers using Termux's clang, then links against libpython.
func buildAndroidRunner(binDir string) error {
	if ok, err := IsTermuxInstalled(); err != nil || !ok {
		return fmt.Errorf("Termux is required to build the python runner (install com.termux and retry)")
	}
	home := androidPythonHome(binDir)
	lib := filepath.Join(home, "lib")

View on GitHub (pinned to 973504e177)

Solutions

  1. Re-run g4f-go so it rebuilds the missing pyandroid runner.

When it happens

Trigger: Thrown at g4f-go/runtime_android.go:75 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of xtekky/gpt4free@973504e177 (2026-08-14). Data as JSON: /api/errors/0d25dbcce722146e. Report an issue: GitHub.