-
Notifications
You must be signed in to change notification settings - Fork 294
Loading invalid plugin gives non-useful error #1230
Comments
PR #1104 changed this behavior. |
If we timeout we may or may not have any output from the plugin. A trivial example: % echo "sleep 60" > test
% chmod a+x test
% snapctl plugin load test
Error loading plugin:
timed out waiting for plugin test So I think we need to have the timed out message (or something equivalent). It makes sense to add in any output from the plugin to the tail of the error message. This would give the user more context (when available) about what went wrong.
#1104 isn't a PR. I don't see how the pr linked to that issue ( #1106) changed this behavior. Can you elaborate? |
You are correct, PR #1106 (#1104 was the issue). Trying this same behavior in release v0.15.0, the output will actually be a runtime error PANIC for invalid memory address or nil pointer deference when trying to load a plugin that can not execute on the system. After PR #1106, a warning is seen in the snapd output saying |
The actual error from If this error is actually captured, trying to start a plugin that doesn't match the underlying architecture of the system would result in this type of error:
|
Executable start errors were captured prior to #1055. |
Thanks for digging deeper into it. I wonder if you could capture it fairly easily on the command wrapper struct and add something to the command interface (Maybe |
In testing this, the only changes that were need were to update the command interface to
And the function: From there, inside of |
Fix #1230: Return execute errors if plugin never starts
When loading a plugin that should not run the error does not fit:
In this case, the influxdb plugin is a Linux build but I am loading on my Mac. I believe this used to return the error from exec on the plugin.
The text was updated successfully, but these errors were encountered: