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

Exception: java.util.concurrent.CompletionException: java.io.IOException #2240

Closed
luccascorrea opened this issue May 10, 2018 · 2 comments
Closed
Labels
Milestone

Comments

@luccascorrea
Copy link


What happened

I was testing a flutter app. I pressed the back button on my phone until the app was closed.
Then I reopened the app from the multitasking menu and clicked on the "Run" button on Intellij, so
it would restart the app.

Version information

Android Studio 3.1.2 • Flutter plugin io.flutter 24.2.1 • Dart plugin 173.4700

Flutter 0.3.2 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 44b7e7d3f4 (3 weeks ago) • 2018-04-20 01:02:44 -0700
Engine • revision 09d05a3891
Tools • Dart 2.0.0-dev.48.0.flutter-fe606f890b

Exception

java.io.IOException: unexpected response: {"id":8,"error":"Bad state: No element"}

java.util.concurrent.CompletionException: java.io.IOException: unexpected response: {"id":8,"error":"Bad state: No element"}
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:292)
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:308)
	at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:593)
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
	at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
	at io.flutter.run.daemon.DaemonApi$Command.completeExceptionally(DaemonApi.java:365)
	at io.flutter.run.daemon.DaemonApi.dispatch(DaemonApi.java:171)
	at io.flutter.run.daemon.DaemonApi$1.onTextAvailable(DaemonApi.java:131)
	at sun.reflect.GeneratedMethodAccessor59.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.execution.process.ProcessHandler$5.invoke(ProcessHandler.java:239)
	at com.sun.proxy.$Proxy16.onTextAvailable(Unknown Source)
	at com.intellij.execution.process.ProcessHandler.notifyTextAvailable(ProcessHandler.java:213)
	at com.intellij.execution.process.BaseOSProcessHandler$SimpleOutputReader.onTextAvailable(BaseOSProcessHandler.java:295)
	at com.intellij.util.io.BaseOutputReader.sendText(BaseOutputReader.java:202)
	at com.intellij.util.io.BaseOutputReader.processInput(BaseOutputReader.java:186)
	at com.intellij.util.io.BaseOutputReader.readAvailableNonBlocking(BaseOutputReader.java:105)
	at com.intellij.util.io.BaseDataReader.readAvailable(BaseDataReader.java:85)
	at com.intellij.util.io.BaseDataReader.doRun(BaseDataReader.java:163)
	at com.intellij.util.io.BaseDataReader$1$1.run(BaseDataReader.java:66)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:194)
	at com.intellij.util.io.BaseDataReader$1.run(BaseDataReader.java:63)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: unexpected response: {"id":8,"error":"Bad state: No element"}
	... 22 more
@stevemessick
Copy link
Member

See additional repro instructions in #2405

@stevemessick
Copy link
Member

The root cause of this problem is an error thrown by the Dart code in the flutter tool. Without more information there isn't much we can do. See #2657 for more detail.

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

No branches or pull requests

2 participants