{"record":{"id":"6bd877cd74e79f03","repo":"SeleniumHQ/selenium","slug":"s","errorCode":null,"errorMessage":" %s\n","messagePattern":" %s\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"cpp/linux-specific/x_ignore_nofocus.c","lineNumber":633,"sourceCode":"  if (is_32bit_system() || is_emulated_32bit()) {\n    required_lib_arch = EM_386;\n  } else {\n    required_lib_arch = EM_X86_64;\n  }\n  int suitable_xlib_index = find_xlib_by_arch(possible_locations, locations_len, required_lib_arch);\n  int found_library = FALSE;\n  if (suitable_xlib_index >= 0) {\n    snprintf(library, MAX_LIBRARY_PATH, \"%s\", possible_locations[suitable_xlib_index]);\n    found_library = TRUE;\n  } else {\n    found_library = find_xlib_by_env(library, required_lib_arch);\n  }\n  if (found_library == FALSE) {\n    const char* desired_arch = (required_lib_arch == EM_386 ? \"32-bit\" : \"64-bit\");\n    fprintf(stderr, \"None of the following is a %s version of Xlib:\", desired_arch);\n    int i;\n    for (i = 0; i < locations_len; i++) {\n      fprintf(stderr, \" %s\\n\", possible_locations[i]);\n    }\n    return NULL;\n  }\n\n  ret_handle = dlopen(library, RTLD_LAZY);\n  if (ret_handle == NULL) {\n    fprintf(stderr, \"Failed to dlopen %s\\n\", library);\n    fprintf(stderr, \"dlerror says: %s\\n\", dlerror());\n  }\n\n  return ret_handle;\n}\n\nvoid print_event_to_log(Display* dpy, XEvent* ev)\n{\n#ifdef DEBUG_PRINTOUTS\n  if ((ev->type != PropertyNotify) && (ev->type != ConfigureNotify)) {\n    print_event(g_out_stream, ev, dpy);","sourceCodeStart":615,"sourceCodeEnd":651,"githubUrl":"https://github.com/SeleniumHQ/selenium/blob/aa36b38e696a0909e973bdf5e2f9031ffe842c4b/cpp/linux-specific/x_ignore_nofocus.c#L615-L651","documentation":"This is the per-candidate continuation line of the error-501 diagnostic: the for-loop in get_xlib_handle() prints ' %s\\n' once for each entry in possible_locations (the five hardcoded libX11.so.6 paths) right after the 'None of the following is a ... version of Xlib:' header. It is purely informational stderr output listing exactly which paths were ELF-checked and rejected, and it is emitted from the same code block as error 501. It carries no independent meaning: by itself it just tells you one more scanned path; together with the header and the trailing return NULL it is the 'candidate dump' half of the no-suitable-libX11 report.","triggerScenarios":"Printed for i in [0, locations_len) inside the `if (found_library == FALSE)` branch of get_xlib_handle() — i.e. exactly when find_xlib_by_arch returns -1 for all candidates AND find_xlib_by_env returns FALSE. You will always see locations_len (5) of these lines immediately following the error-501 header line.","commonSituations":"Same root contexts as error 501: stripped containers missing libX11, arch mismatch between JVM/browser and the installed libX11, or libX11 in a path the scanner does not know about with LD_LIBRARY_PATH unset. Developers grep their stderr/logs and key on this ' %s' line because it lists the concrete paths; the fix is identical to error 501.","solutions":["Treat this line as a symptom of error 501 and fix the root cause there: install the arch-matching libX11 (e.g. `apt-get install -y libx11-6`) or set LD_LIBRARY_PATH to a directory holding the correct-arch libX11.so.6.","Use the five paths this line prints as a checklist: confirm whether each exists and what arch `file` reports for it, then install the missing arch package.","Ensure JVM and browser architecture agree with the installed libX11; the loop prints these only because no candidate matched the required EM_386/EM_X86_64.","After installing, re-run and confirm neither the header (501) nor these ' %s' lines reappear, indicating find_xlib_by_arch succeeded."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# This line is informational; validate that a correct-arch libX11 is reachable.\n#!/usr/bin/env bash\nREQUIRED_ARCH=\"64-bit\"\n\nfound=0\nfor lib in /usr/lib/libX11.so.6 \\\n           /usr/lib/x86_64-linux-gnu/libX11.so.6 \\\n           /usr/lib/i386-linux-gnu/libX11.so.6 \\\n           /usr/lib64/libX11.so.6 \\\n           /usr/lib32/libX11.so.6; do\n  [ -f \"$lib\" ] || continue\n  arch=$(file -L \"$lib\" | grep -o 'ELF 32-bit\\|ELF 64-bit')\n  [ \"${arch#ELF }\" = \"$REQUIRED_ARCH\" ] && { found=1; echo \"OK $lib\"; break; }\ndone\n\nif [ \"$found\" -eq 0 ] && [ -n \"$LD_LIBRARY_PATH\" ]; then\n  for d in \"${LD_LIBRARY_PATH//:/ }\"; do\n    lib=\"$d/libX11.so.6\"; [ -f \"$lib\" ] || continue\n    arch=$(file -L \"$lib\" | grep -o 'ELF 32-bit\\|ELF 64-bit')\n    [ \"${arch#ELF }\" = \"$REQUIRED_ARCH\" ] && { found=1; echo \"OK(env) $lib\"; break; }\n  done\nfi\n[ \"$found\" -eq 1 ] || { echo \"no $REQUIRED_ARCH libX11; install libx11-6 or set LD_LIBRARY_PATH\"; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat these ' %s' lines as a checklist: each names a path Selenium ELF-checked; confirm one of them is the right arch.","Pin libX11 (and its arch) in your base image so the scanner always finds a match.","Do not silence stderr to hide these lines; they are the only record of which paths were tried.","Resolve the underlying error-501 condition (install/align libX11) and these lines disappear automatically."],"tags":["linux","native","x11","libx11","selenium","diagnostic","stderr"],"backgroundTag":null,"analyzedSha":"aa36b38e696a0909e973bdf5e2f9031ffe842c4b","analyzedAt":"2026-08-14T02:32:32.244Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}