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

bug: get config of ext plugin #301

Open
wingyiu opened this issue Jan 25, 2024 · 0 comments
Open

bug: get config of ext plugin #301

wingyiu opened this issue Jan 25, 2024 · 0 comments

Comments

@wingyiu
Copy link

wingyiu commented Jan 25, 2024

Issue description

NPE when get config of ext plugin, then cause 503

@Override
    public Mono<Void> filter(HttpRequest request, HttpResponse response, PluginFilterChain chain) {
      
          String configStr = request.getConfig(this);
            
java.lang.IndexOutOfBoundsException: null
	at java.nio.Buffer.checkIndex(Buffer.java:546) ~[?:1.8.0_111]
	at java.nio.DirectByteBuffer.getInt(DirectByteBuffer.java:685) ~[?:1.8.0_111]
	at com.google.flatbuffers.Table.__vector_len(Table.java:125) ~[flatbuffers-java-1.12.0.jar!/:?]
	at io.github.api7.A6.PrepareConf.Req.confLength(Req.java:20) ~[A6-0.1.0-RELEASE.jar!/:?]
	at org.apache.apisix.plugin.runner.HttpRequest.getConfig(HttpRequest.java:61) ~[apisix-runner-plugin-sdk-0.1.0.jar!/:0.1.0]
	at org.apache.apisix.plugin.runner.filter.DeveloperPlatformSSOFilter.filter(DeveloperPlatformSSOFilter.java:72) ~[apisix-runner-plugin-0.1.0.jar!/:0.1.0]
	at org.apache.apisix.plugin.runner.filter.PluginFilterChain.filter(PluginFilterChain.java:54) ~[apisix-runner-plugin-sdk-0.1.0.jar!/:0.1.0]
	at org.apache.apisix.plugin.runner.handler.A6HttpCallHandler.handle(A6HttpCallHandler.java:57) ~[apisix-runner-core-0.1.0.jar!/:0.1.0]
	at org.apache.apisix.plugin.runner.handler.A6HandlerConfiguration.lambda$createDispatcher$0(A6HandlerConfiguration.java:76) ~[apisix-runner-core-0.1.0.jar!/:0.1.0]
	at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:106) [reactor-core-3.4.13.jar!/:3.4.13]
	at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:120) [reactor-core-3.4.13.jar!/:3.4.13]
	at reactor.core.publisher.FluxHandle$HandleSubscriber.onNext(FluxHandle.java:119) [reactor-core-3.4.13.jar!/:3.4.13]
	

it looks like A6-0.1.0-RELEASE has bug

Environment

  • your apisix-java-plugin-runner version

Minimal test code / Steps to reproduce the issue

What's the actual result? (including assertion message & call stack if applicable)

What's the expected result?

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