Skip to content

Multipart File requests fail with IllegalArgumentException (on +1.9.2) #1126

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

Closed
maesenka opened this issue Apr 2, 2016 · 2 comments
Closed
Assignees
Milestone

Comments

@maesenka
Copy link

maesenka commented Apr 2, 2016

All multipart file requests in versions 1.9.36 result in IllegalArgumentExceptions.

016-04-02 14:04:24,459 [New I/O worker #35] WARN  - AbstractNioSelector: Unexpected exception in the selector loop.
java.lang.IllegalArgumentException: writtenAmount must be a positive integer: -1
    at org.jboss.netty.channel.DefaultWriteCompletionEvent.<init>(DefaultWriteCompletionEvent.java:36) ~[netty-3.10.5.Final.jar:na]
    at org.jboss.netty.channel.Channels.fireWriteComplete(Channels.java:324) ~[netty-3.10.5.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.write0(AbstractNioWorker.java:299) [netty-3.10.5.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.writeFromSelectorLoop(AbstractNioWorker.java:158) [netty-3.10.5.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:114) [netty-3.10.5.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337) ~[netty-3.10.5.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) [netty-3.10.5.Final.jar:na]
    at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) [netty-3.10.5.Final.jar:na]
    at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [netty-3.10.5.Final.jar:na]
    at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) [netty-3.10.5.Final.jar:na]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_40]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_40]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40]

I'm pretty sure that the bug was introduced in commit 54def5a. If I revert this commit my MultiPart file requests succeed.

@maesenka maesenka changed the title Multipart File requests fail with IllegalArgumentException Multipart File requests fail with IllegalArgumentException (1.9) Apr 2, 2016
@maesenka maesenka changed the title Multipart File requests fail with IllegalArgumentException (1.9) Multipart File requests fail with IllegalArgumentException (on +1.9.2) Apr 2, 2016
maesenka added a commit to WegenenVerkeer/RxHttpClient that referenced this issue Apr 2, 2016
AsyncHttpClient issue #1126 (AsyncHttpClient/async-http-client#1126)
prevents File uploads.
@slandelle
Copy link
Contributor

Could you provide a reproducer, please?

@slandelle
Copy link
Contributor

Fixed. Thanks for reporting

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