Tyk Plugins error when updating golang version

Hello, so we’re currently trying to update our golang from 1.12 to 1.15. Since the update our plugins have been throwing an error of "level=error msg=“Could not load Go-plugin” error=“plugin.Open(“plugins/ldapauth.so”): plugin was built with a different version of package internal/unsafeheader (previous failure)” mwPath=“plugins/ldapauth.so”. Would love to get some more insight on this issue. Thanks a lot.

Side note we are using 3.1.2.

This happens when you compile the plugin in an environment that does not match the gateway compilation environment exactly. To get around this you have two options.

  1. Build the gateway yourself, and then use the same environment to build your plugins, you will not be able to use any of our official packaged gateways, however you will have a singular environment to compile gateways and plugins going forward.

2.Use our plugin compiler offered in a container (I would recommend this over the first option) It is designed to compile plugins, and it contains the exact environment the packaged gateway is built in, therefore able to build a plugin binary that will load into our packaged gateways.

Documentation on compiling plugins using the plugin compiler is available on our documentation website, in fact the whole golang plugin section has been rewritten recently with more examples and information relating to the 3.2.x method of compiling plugins. Please take another look if you haven’t done so recently.

Hope that helps!

Best Regards,
Chris