Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange behaviour with require loader #28

Open
ronan-skyscanner opened this issue Nov 22, 2016 · 0 comments
Open

Strange behaviour with require loader #28

ronan-skyscanner opened this issue Nov 22, 2016 · 0 comments

Comments

@ronan-skyscanner
Copy link

ronan-skyscanner commented Nov 22, 2016

I have encountered an issue in multiple occasions with the lua-pb plugin, and it seems with its package loader functionality in particular.

An example:

	no file '/opt/config.proto'
	no file '/usr/local/openresty/site/lualib/config.proto'
	no file '/usr/local/openresty/lualib/config.proto'
	no file './config.proto'
	no file '/usr/local/openresty/luajit/share/luajit-2.1.0-beta2/config.proto'
	no file '/usr/local/share/lua/5.1/config.proto'
	no file '/usr/local/openresty/luajit/share/lua/5.1/config.proto'
	no file '/usr/local/openresty/site/lualib/config.proto'
	no file '/usr/local/openresty/lualib/config.proto'
	no file './config.proto'
	no file '/usr/local/openresty/luajit/share/luajit-2.1.0-beta2/config.proto'
	no file '/usr/local/share/lua/5.1/config.proto'
	no file '/usr/local/openresty/luajit/share/lua/5.1/config.proto'
stack traceback:
coroutine 0:
	[C]: in function 'require'
	/opt/kong/plugins/request-multiplexer/handler.lua:18: in function 'access'
	/usr/local/share/lua/5.1/kong.lua:164: in function 'access'
	access_by_lua(nginx-kong.conf:59):2: in function <access_by_lua(nginx-kong.conf:59):1>, client: 127.0.0.1, server: kong, request: "GET /kongadmin/apis?apikey=***** HTTP/1.1", host: "localhost:8000"

It seems to me that the lua-pb loading logic is being called when it shouldn't be. That is while trying to import config.lua, the lua-pb kicks in and tries to import config.proto.
Worth mentioning that this is hard to pinpoint, and was seen for various files.

Is there a way not to register the pb loader, and instead rely on filenames for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant