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

I suddenly started to get this error while Hot reloding my flutter app, and its not everytime im getting it sometimes it just works fine, like every 1 in 3 times it throws this error. #51850

Closed
adityabansalx opened this issue Mar 25, 2023 · 4 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. vm-hot-reload

Comments

@adityabansalx
Copy link

adityabansalx commented Mar 25, 2023

Unhandled exception:
FileSystemException: writeFrom failed, path = '' (OS Error: The pipe is being closed.

, errno = 232)
#0 _RandomAccessFile.writeFromSync (dart:io/file_impl.dart:858:7)
#1 _StdConsumer.addStream. (dart:io/stdio.dart:309:15)
#2 _RootZone.runUnaryGuarded (dart:async/zone.dart:1593:10)
#3 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#4 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#5 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#6 _StreamController._add (dart:async/stream_controller.dart:648:7)
#7 _StreamController.add (dart:async/stream_controller.dart:596:5)
#8 _StreamSinkImpl.add (dart:io/io_sink.dart:136:17)
#9 _IOSinkImpl.write (dart:io/io_sink.dart:269:5)
#10 _IOSinkImpl.writeln (dart:io/io_sink.dart:289:5)
#11 _StdSink.writeln (dart:io/stdio.dart:342:11)
#12 FrontendCompiler.recompileDelta (package:frontend_server/frontend_server.dart:840:19)
#13 listenAndCompile. (package:frontend_server/frontend_server.dart:1284:20)
#14 _RootZone.runUnaryGuarded (dart:async/zone.dart:1593:10)
#15 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#16 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#17 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)
#18 _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)
#19 _StringAdapterSink.add (dart:convert/string_conversion.dart:238:11)
#20 _LineSplitterSink._addLines (dart:convert/line_splitter.dart:153:13)
#21 _LineSplitterSink.addSlice (dart:convert/line_splitter.dart:128:5)
#22 StringConversionSinkMixin.add (dart:convert/string_conversion.dart:163:5)
#23 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)
#24 _RootZone.runUnaryGuarded (dart:async/zone.dart:1593:10)
#25 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#26 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#27 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)
#28 _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)
#29 _StringAdapterSink.add (dart:convert/string_conversion.dart:238:11)
#30 _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:243:7)
#31 _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:317:20)
#32 _Utf8ConversionSink.add (dart:convert/string_conversion.dart:310:5)
#33 _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:72:18)
#34 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)
#35 _RootZone.runUnaryGuarded (dart:async/zone.dart:1593:10)
#36 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#37 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#38 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#39 _StreamController._add (dart:async/stream_controller.dart:648:7)
#40 _StreamController.add (dart:async/stream_controller.dart:596:5)
#41 _Socket._onData (dart:io-patch/socket_patch.dart:2355:41)
#42 _RootZone.runUnaryGuarded (dart:async/zone.dart:1593:10)
#43 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#44 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#45 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#46 _StreamController._add (dart:async/stream_controller.dart:648:7)
#47 _StreamController.add (dart:async/stream_controller.dart:596:5)
#48 new _RawSocket. (dart:io-patch/socket_patch.dart:1877:33)
#49 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1334:14)
#50 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#51 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#52 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:123:13)
#53 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:193:5)
the Dart compiler exited unexpectedly.

This is very hard to reproduce as its occurrence seems pretty random, Or please can anyone suggest which area to look for..

@lrhn lrhn added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. vm-hot-reload labels Mar 25, 2023
@mraleph
Copy link
Member

mraleph commented Mar 27, 2023

We would need considerably more information about this to be able to figure what is going wrong. Do you have any other error messages showing up?

/cc @brianquinlan for any ideas on how we could maybe print more informations about this
/cc @aam just fyi

@mraleph mraleph added the needs-info We need additional information from the issue author (auto-closed after 14 days if no response) label Mar 27, 2023
@dart-lang dart-lang deleted a comment from Khushipatil13 Apr 2, 2023
@adityabansalx
Copy link
Author

adityabansalx commented Apr 9, 2023

Just found these logs in verbose mode.
The connection just drops unexpectedly, seconds after running

[+2167 ms] flutter: WebsocketChannel was unable to establish connection
[ +1 ms] flutter: =========== stream onError: SYNC STREAM ERROR
[ +2 ms] flutter: ========CHANNEL RETRY
[ +86 ms] flutter: CONNECTIVITY BAR REBUILD
[+6314 ms] Service protocol connection closed.
[ +1 ms] Lost connection to device.
[ +1 ms] DevFS: Deleting filesystem on the device (file:///C:/Users/Aditya/AppData/Local/Temp/oomsapp8873134/oomsapp/)
[ +253 ms] Ignored error while cleaning up DevFS: TimeoutException after 0:00:00.250000: Future not completed
[ +4 ms] "flutter run" took 120,953ms.
[ +254 ms] ensureAnalyticsSent: 248ms
[ +2 ms] Running 1 shutdown hook
[ +22 ms] Shutdown hooks complete
[ +1 ms] exiting with code 0

seems like it has something to do with the Socket connection. I'm digging more into it.
Any suggestions, of what might have caused this...?

@github-actions github-actions bot removed the needs-info We need additional information from the issue author (auto-closed after 14 days if no response) label Apr 9, 2023
@adityabansalx
Copy link
Author

adityabansalx commented Apr 9, 2023

Just discovered more errors in verbose mode.
The connection just drops unexpectedly, seconds after running

...
[ +1 ms] InitializeBuildStatus:
[ ] Creating "printing_plugin.dir\Debug\printing_plugin.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[ ] CustomBuild:
[ ] All outputs are up-to-date.
[ +12 ms] ClCompile:
[ ] All outputs are up-to-date.
[ +15 ms] Link:
[ ] All outputs are up-to-date.
[ ] printing_plugin.vcxproj -> C:\src\allprojects\fip\flutterProject\oomsapp\build\windows\plugins\printing\Debug\printing_plugin.dll
[ +10 ms] FinalizeBuildStatus:
[ ] Deleting file "printing_plugin.dir\Debug\printing_plugin.tlog\unsuccessfulbuild".
[ +1 ms] Touching "printing_plugin.dir\Debug\printing_plugin.tlog\printing_plugin.lastbuildstate".
[ ] Done Building Project "C:\src\allprojects\fip\flutterProject\oomsapp\build\windows\plugins\printing\printing_plugin.vcxproj"
(default targets).
[ +13 ms] InitializeBuildStatus:
[ ] Creating "oomsapp.dir\Debug\oomsapp.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[ +5 ms] CustomBuild:
[ ] All outputs are up-to-date.
[ +43 ms] ClCompile:
[ ] C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\HostX64\x64\CL.exe /c
/IC:\src\allprojects\fip\flutterProject\oomsapp\windows
/IC:\src\allprojects\fip\flutterProject\oomsapp\windows\flutter\ephemeral
/IC:\src\allprojects\fip\flutterProject\oomsapp\windows\flutter\ephemeral\cpp_client_wrapper\include
/IC:\src\allprojects\fip\flutterProject\oomsapp\windows\flutter\ephemeral.plugin_symlinks\connectivity_plus\windows\include
/IC:\src\allprojects\fip\flutterProject\oomsapp\windows\flutter\ephemeral.plugin_symlinks\flutter_secure_storage_windows\windows\include
/IC:\src\allprojects\fip\flutterProject\oomsapp\windows\flutter\ephemeral.plugin_symlinks\printing\windows\include /Zi /nologo /W4 /WX
/diagnostics:column /Od /Ob0 /D _UNICODE /D UNICODE /D WIN32 /D _WINDOWS /D _HAS_EXCEPTIONS=0 /D _DEBUG /D "FLUTTER_VERSION="1.0.0+1"" /D FLUTTER_VERSION_MAJOR=1 /D
FLUTTER_VERSION_MINOR=0 /D FLUTTER_VERSION_PATCH=0 /D FLUTTER_VERSION_BUILD=1 /D NOMINMAX /D UNICODE /D _UNICODE /D "CMAKE_INTDIR="Debug"" /Gm- /EHsc /RTC1 /MDd /GS
/fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /std:c++17 /Fo"oomsapp.dir\Debug\" /Fd"oomsapp.dir\Debug\vc143.pdb" /external:W4 /Gd /TP /wd4100 /errorReport:queue
C:\src\allprojects\fip\flutterProject\oomsapp\windows\flutter\generated_plugin_registrant.cc
C:\src\allprojects\fip\flutterProject\oomsapp\windows\runner\flutter_window.cpp
[ +455 ms] generated_plugin_registrant.cc
[ +440 ms] flutter_window.cpp
[ +797 ms] Generating Code...
[ +164 ms] ResourceCompile:
[ +1 ms] All outputs are up-to-date.
[ +21 ms] Link:
[ +1 ms] C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE
/OUT:"C:\src\allprojects\fip\flutterProject\oomsapp\build\windows\runner\Debug\oomsapp.exe" /INCREMENTAL /ILK:"oomsapp.dir\Debug\oomsapp.ilk"
/NOLOGO ..\flutter\Debug\flutter_wrapper_app.lib ..\plugins\connectivity_plus\Debug\connectivity_plus_plugin.lib
..\plugins\flutter_secure_storage_windows\Debug\flutter_secure_storage_windows_plugin.lib ..\plugins\printing\Debug\printing_plugin.lib
C:\src\allprojects\fip\flutterProject\oomsapp\windows\flutter\ephemeral\flutter_windows.dll.lib kernel32.lib user32.lib gdi32.lib winspool.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed
/manifestinput:C:\src\allprojects\fip\flutterProject\oomsapp\windows\runner\runner.exe.manifest /DEBUG
/PDB:"C:/src/allprojects/fip/flutterProject/oomsapp/build/windows/runner/Debug/oomsapp.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT
/IMPLIB:"C:/src/allprojects/fip/flutterProject/oomsapp/build/windows/runner/Debug/oomsapp.lib" /MACHINE:X64 /machine:x64
oomsapp.dir\Debug\Runner.res
[ +2 ms] oomsapp.dir\Debug\flutter_window.obj
[ ] oomsapp.dir\Debug\main.obj
[ ] oomsapp.dir\Debug\utils.obj
[ +1 ms] oomsapp.dir\Debug\win32_window.obj
[ ] oomsapp.dir\Debug\generated_plugin_registrant.obj
[ +435 ms] LINK : fatal error LNK1168: cannot open C:\src\allprojects\fip\flutterProject\oomsapp\build\windows\runner\Debug\oomsapp.exe for
writing [C:\src\allprojects\fip\flutterProject\oomsapp\build\windows\runner\oomsapp.vcxproj]
[ +14 ms] Done Building Project "C:\src\allprojects\fip\flutterProject\oomsapp\build\windows\runner\oomsapp.vcxproj" (default targets) --
FAILED.
[ +2 ms] Done Building Project "C:\src\allprojects\fip\flutterProject\oomsapp\build\windows\ALL_BUILD.vcxproj" (default targets) -- FAILED.
[ ] Done Building Project "C:\src\allprojects\fip\flutterProject\oomsapp\build\windows\INSTALL.vcxproj" (default targets) -- FAILED.
[ +2 ms] Build FAILED.
[ +8 ms] "C:\src\allprojects\fip\flutterProject\oomsapp\build\windows\INSTALL.vcxproj" (default target) (1) ->
[ ] "C:\src\allprojects\fip\flutterProject\oomsapp\build\windows\ALL_BUILD.vcxproj" (default target) (3) ->
[ ] "C:\src\allprojects\fip\flutterProject\oomsapp\build\windows\runner\oomsapp.vcxproj" (default target) (9) ->
[ ] (Link target) ->
[ ] LINK : fatal error LNK1168: cannot open C:\src\allprojects\fip\flutterProject\oomsapp\build\windows\runner\Debug\oomsapp.exe for
writing [C:\src\allprojects\fip\flutterProject\oomsapp\build\windows\runner\oomsapp.vcxproj]
[ +1 ms] 0 Warning(s)
[ ] 1 Error(s)
[ ] Time Elapsed 00:00:20.94
[ +47 ms] Building Windows application... (completed in 26.6s)
[ +2 ms] Exception: Build process failed.
[ +2 ms] "flutter run" took 29,482ms.
[ +7 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:722:9)

#2 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1257:27)

#3 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#4 CommandRunner.runCommand (package:args/command_runner.dart:209:13)

#5 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:283:9)

#6 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)

#8 run.. (package:flutter_tools/runner.dart:64:9)

#9 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#10 main (package:flutter_tools/executable.dart:91:3)

[ +252 ms] ensureAnalyticsSent: 248ms
[ ] Running 1 shutdown hook
[ +4 ms] Shutdown hooks complete
[ ] exiting with code 1

@a-siva
Copy link
Contributor

a-siva commented Dec 21, 2023

Seems like you are running into a build error here[ ] (Link target) ->

[ ] LINK : fatal error LNK1168: cannot open C:\src\allprojects\fip\flutterProject\oomsapp\build\windows\runner\Debug\oomsapp.exe for
writing [C:\src\allprojects\fip\flutterProject\oomsapp\build\windows\runner\oomsapp.vcxproj]
[ +1 ms] 0 Warning(s)
[ ] 1 Error(s)

hot reload does not rebuild the app but looks like you are rebuilding the app while it is running ?

Not sure if this is a Dart issue.

@a-siva a-siva closed this as completed Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. vm-hot-reload
Projects
None yet
Development

No branches or pull requests

4 participants