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

cookie error "io.netty.handler.codec.http.cookie.Cookie.name()" because "c" is null #2482

Open
rkanil opened this issue Jan 21, 2024 · 5 comments

Comments

@rkanil
Copy link

rkanil commented Jan 21, 2024

The issue is related to https://github.com/karatelabs/karate/pull/1782/files#diff-dba062e24f62861c07c4ecb3e71913f704b8a7cf4fb99f3b484a8f1864c42e9e

An earlier fix related to cookie error "io.netty.handler.codec.http.cookie.Cookie.name()" because "c" is null
The error is again shown in Karate version 1.4.1.
I am using Java version 11 and the server i am accessing has no cookies. The cookie name is 'empty' with a value of 'Secure'. The above error related to null cookie name keeps showing.

@rkanil
Copy link
Author

rkanil commented Jan 21, 2024

This error was reported in earlier versions of 1.2, the fix was with Cookie Decoder - LAX but that didn't work in my case. So I downloaded the Karate-Core repo and changed to STRICT but that also didn't work. Not sure what the root problem that is causing this error.

@rkanil rkanil changed the title https://github.com/karatelabs/karate/pull/1782/files#diff-dba062e24f62861c07c4ecb3e71913f704b8a7cf4fb99f3b484a8f1864c42e9e cookie error "io.netty.handler.codec.http.cookie.Cookie.name()" because "c" is null Jan 21, 2024
@ptrthomas
Copy link
Member

this is most likely because your server sent a cookie without a name or something. normally we insist on a way to replicate: https://github.com/karatelabs/karate/wiki/How-to-Submit-an-Issue - the best way forward is if you debug and submit a PR to add an extra null check in the code. else we will close this after some time

@rkanil
Copy link
Author

rkanil commented Jan 22, 2024

You are right Peter, the server is sending a cookie with 'no name' but with a value of 'secure'. Can you share some info on how to debug the issue. Do i need to do in the Java Code or though the feature file?

@ptrthomas
Copy link
Member

@rkanil use a java "runner" entry point to run a feature file and run it from an IDE in debug mode, that's all

@rkanil
Copy link
Author

rkanil commented Feb 3, 2024

Ok Peter, I will try it and get back with additional debug logs. Thanks

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

No branches or pull requests

2 participants