openmultiplayer / openmultiplayer/open.mp
Missing legacy plugin on Linux reports "This file is an open.mp component" instead of a missing-file error
@AmyrAhmady is already working on this.
Since Sep 14, 2026.
- Dominant language
- C++
- Stars
- 641
- Forks
- 208
- PR merge metrics
- No merged PRs in 30d
Description
Description
If a legacy plugin listed in config.json (pawn.legacy_plugins) does not exist in
plugins/, the Linux server prints a misleading error telling the user to move the file
to components/, instead of reporting that the file is missing. Windows reports the
missing file correctly, so the two platforms behave differently.
Steps to reproduce
- In
config.json, list a plugin that is not present:"pawn": { "legacy_plugins": [ "streamer" ] } - Make sure
plugins/streamer.sodoes not exist. - Start the server.
Actual behaviour (Linux)
[2026-09-14T16:31:19+0800] [Info] Loading plugin: streamer
[2026-09-14T16:31:19+0800] [Info] This file is an open.mp component. Please move it to components/ folder.
The second line is wrong: streamer is not an open.mp component, the file simply is not there.
Expected behaviour
A message stating that the plugin file could not be found.
Cause
Spawn() discarded Canonicalise()'s return value and handed its output to the loader.
On Linux Canonicalise() uses realpath(), which fails for a missing file and left the
result empty, so dlopen("") ran — that resolves to the main program's handle, and
dlsym("ComponentEntryPoint") on it matched $CAPI's exported symbol, producing the
component message. Windows was unaffected because PathCanonicalizeA() is purely lexical,
so LoadLibraryA still ran and reported the OS error.
Commit hash in master
91a38854
Additional context
I've already run one actions, so if anyone needs to test?
https://github.com/dockfries/open.mp/actions/runs/34826417260
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.