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

On windows, using a ramdisk leads to "Cannot resolve symbolic links" #26113

Open
AlexBokhankovich opened this issue Jan 5, 2019 · 12 comments
Open
Labels
c: crash Stack traces logged to the console dependency: dart Dart team may need to help us P2 Important issues not at the top of the work list platform-windows Building on or for Windows specifically team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team

Comments

@AlexBokhankovich
Copy link

AlexBokhankovich commented Jan 5, 2019

Steps to Reproduce

  1. create new flutter app
  2. add package, for example 'english_words: ^3.1.5'
  3. run 'flutter packages get'

Logs

flutter packages get --verbose
[  +45 ms] executing: [D:\flutter\] git rev-parse --abbrev-ref --symbolic @{u}
[ +112 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[   +3 ms] origin/stable
[        ] executing: [D:\flutter\] git rev-parse --abbrev-ref HEAD
[  +64 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[        ] executing: [D:\flutter\] git ls-remote --get-url origin
[  +57 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[        ] executing: [D:\flutter\] git log -n 1 --pretty=format:%H
[  +61 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[        ] 5391447fae6209bb21a89e6a5a6583cac1af9b4b
[        ] executing: [D:\flutter\] git log -n 1 --pretty=format:%ar
[  +58 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar
[        ] 5 weeks ago
[   +1 ms] executing: [D:\flutter\] git describe --match v*.*.* --first-parent --long --tags
[  +64 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[        ] v1.0.0-0-g5391447fa
[ +240 ms] Running "flutter packages get" in startup_namer...
[   +4 ms] Using D:\flutter\.pub-cache for the pub cache.
[   +3 ms] executing: [D:\startup_namer\] D:\flutter\bin\cache\dart-sdk\bin\pub.bat --verbosity=warning --verbose get --no-precompile
[+4384 ms] Cannot resolve symbolic links, path = 'H:\Temp\pub_8c3f82f8-10c0-11e9-bee5-60a44c618283' (OS Error: Неверная функция.
[  +12 ms] , errno = 1)
[  +53 ms] Running "flutter packages get" in startup_namer... (completed)
[  +13 ms] "flutter get" took 4 561ms.
pub get failed (66)

#0      throwToolExit (package:flutter_tools/src/base/common.dart:26:3)
#1      pub (package:flutter_tools/src/dart/pub.dart:170:5)
<asynchronous suspension>
#2      pubGet (package:flutter_tools/src/dart/pub.dart:104:13)
<asynchronous suspension>
#3      PackagesGetCommand._runPubGet (package:flutter_tools/src/commands/packages.dart:59:11)
<asynchronous suspension>
#4      PackagesGetCommand.runCommand (package:flutter_tools/src/commands/packages.dart:82:11)
<asynchronous suspension>
#5      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:401:18)
#6      _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#7      _rootRunUnary (dart:async/zone.dart:1132:38)
#8      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#9      _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#10     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
#11     Future._propagateToListeners (dart:async/future_impl.dart:671:32)
#12     Future._complete (dart:async/future_impl.dart:476:7)
#13     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#14     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async/runtime/libasync_patch.dart:33:20)
#15     _rootRun (dart:async/zone.dart:1124:13)
#16     _CustomZone.run (dart:async/zone.dart:1021:19)
#17     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#18     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#19     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#20     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
#21     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)
flutter doctor -v
[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [Version 10.0.17763.195], locale ru-RU)
    • Flutter version 1.0.0 at D:\flutter
    • Framework revision 5391447fae (5 weeks ago), 2018-11-29 19:41:26 -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at D:\AndroidSDK
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = D:\AndroidSDK
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[√] Android Studio (version 3.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 31.3.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[√] VS Code, 64-bit edition (version 1.30.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 2.21.1

[!] Connected device
    ! No devices available

! Doctor found issues in 1 category.
@zoechi
Copy link
Contributor

zoechi commented Jan 5, 2019

Looks similar to #8882 might be caused by pub though

@zoechi zoechi added c: crash Stack traces logged to the console tool Affects the "flutter" command-line tool. See also t: labels. dependency: dart Dart team may need to help us platform-windows Building on or for Windows specifically labels Jan 5, 2019
@zoechi zoechi added this to the Goals milestone Jan 5, 2019
@AlexBokhankovich
Copy link
Author

I there any workaround or fix for this? i'm currently blocked by that issue and can't even go through flutter get started guide

@zoechi
Copy link
Contributor

zoechi commented Jan 5, 2019

I haven't seen this issue before and don't know what exactly causes it.
H:\Temp is not a link, right?

@AlexBokhankovich
Copy link
Author

AlexBokhankovich commented Jan 5, 2019

Right, "H" drive is the ramdisk, I've moved Temp directory there.
I've also set both env vars TMP and TEMP to H:/Temp

@zoechi
Copy link
Contributor

zoechi commented Jan 5, 2019

I'd suggest you try without that redirect as workaround.

@AlexBokhankovich
Copy link
Author

Got it. I will try and let you know if it helps

@AlexBokhankovich
Copy link
Author

AlexBokhankovich commented Jan 5, 2019

It looks like changing TEMP and TMP env vars back to %USERPROFILE%\AppData\Local\Temp did the trick. @zoechi Thank you a lot. The issue is fixed but as for me it is not fix but workaround, since changing TMP location is not something unusual or unofficial hack etc.

@zoechi
Copy link
Contributor

zoechi commented Jan 5, 2019

Right, it seems like #8882 where a system call is made that is not valid on windows.

@tmokmss
Copy link

tmokmss commented Jun 2, 2019

Still reproduces on the latest release.
Could you fix this?

@tz182736
Copy link

tz182736 commented Dec 12, 2019

solution: move back build folder to C: drive.

issues as below:
As of 2019 Dec 12 with all latest version on windows 10, I still have the same issues with ramdisk symbolic link error.

I am using ImDisk Ramdrive for build folder.

command

flutter --verbose assemble --depfile R:\build\app\intermediates\flutter\debug/flutter_build.d --output R:\build\app\intermediates\flutter\debug -dTargetFile=C:_dev\easytech\ET LOTTERY\et_lottery_app_flutter\lib\main.dart -dTargetPlatform=android -dBuildMode=debug debug_android_application

exception

FileSystemException: FileSystemException: Cannot resolve symbolic links, path = 'R:\build\app\intermediates\flutter\debug' (OS Error: Incorrect function.
, errno = 1)

#0      FileSystemEntity._throwIfError (dart:io/file_system_entity.dart:833:7)
#1      FileSystemEntity.resolveSymbolicLinksSync (dart:io/file_system_entity.dart:397:5)
#2      ForwardingFileSystemEntity.resolveSymbolicLinksSync (package:file/src/forwarding/forwarding_file_system_entity.dart:58:49)
#3      SourceVisitor.visitPattern (package:flutter_tools/src/build_system/source.dart:121:49)
#4      _PatternSource.accept (package:flutter_tools/src/build_system/source.dart:213:49)
#5      Target._resolveConfiguration (package:flutter_tools/src/build_system/build_system.dart:234:14)
#6      Target.resolveOutputs (package:flutter_tools/src/build_system/build_system.dart:192:12)
#7      Target._toNode (package:flutter_tools/src/build_system/build_system.dart:136:39)
#8      BuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:420:30)
#9      AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:170:50)
#10     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:615:18)
<asynchronous suspension>
#11     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:515:33)
<asynchronous suspension>
#12     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:146:29)
#13     _rootRun (dart:async/zone.dart:1126:13)
#14     _CustomZone.run (dart:async/zone.dart:1023:19)
#15     _runZoned (dart:async/zone.dart:1518:10)
#16     runZoned (dart:async/zone.dart:1465:12)
#17     AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
#18     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:505:20)
#19     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
#20     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:413:21)
<asynchronous suspension>
#21     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:146:29)
#22     _rootRun (dart:async/zone.dart:1126:13)
#23     _CustomZone.run (dart:async/zone.dart:1023:19)
#24     _runZoned (dart:async/zone.dart:1518:10)
#25     runZoned (dart:async/zone.dart:1465:12)
#26     AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
#27     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:364:19)
#28     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#29     new Future.sync (dart:async/future.dart:224:31)
#30     CommandRunner.run (package:args/command_runner.dart:112:14)
#31     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:250:18)
#32     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:63:22)
#33     _rootRun (dart:async/zone.dart:1126:13)
#34     _CustomZone.run (dart:async/zone.dart:1023:19)
#35     _runZoned (dart:async/zone.dart:1518:10)
#36     runZoned (dart:async/zone.dart:1502:12)
#37     run.<anonymous closure> (package:flutter_tools/runner.dart:61:18)
<asynchronous suspension>
#38     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:146:29)
#39     _rootRun (dart:async/zone.dart:1126:13)
#40     _CustomZone.run (dart:async/zone.dart:1023:19)
#41     _runZoned (dart:async/zone.dart:1518:10)
#42     runZoned (dart:async/zone.dart:1465:12)
#43     AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
#44     runInContext (package:flutter_tools/src/context_runner.dart:64:24)
#45     run (package:flutter_tools/runner.dart:50:10)
#46     main (package:flutter_tools/executable.dart:65:9)
#47     main (file:///C:/_packages/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#48     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:305:32)
#49     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)

flutter doctor

[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.18363.535], locale en-US)
    • Flutter version 1.12.13+hotfix.5 at C:\_packages\flutter
    • Framework revision 27321ebbad (33 hours ago), 2019-12-10 18:15:01 -0800
    • Engine revision 2994f7e1e6
    • Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\_packages\android-sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = C:\_packages\android-sdk
    • Java binary at: C:\_applications\android-studio-3.5.3\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[✓] Android Studio (version 3.5)
    • Android Studio at C:\_applications\android-studio-3.5.3
    • Flutter plugin version 42.1.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.1.0 (API 27) (emulator)

• No issues found!

@jmagman jmagman added this to Awaiting triage in Tools - Windows review Jan 10, 2020
@christopherfujino christopherfujino moved this from Awaiting triage to Engineer reviewed in Tools - Windows review Jan 17, 2020
@christopherfujino christopherfujino changed the title "flutter packages get" throws an exception: "Cannot resolve symbolic links" On windows, using a ramdisk leads to "Cannot resolve symbolic links" Jan 17, 2020
@seakingii
Copy link

CMD:

set TEMP=c:\tmp
set TMP=c:\temp

flutter pub get

@kf6gpe kf6gpe added the P2 Important issues not at the top of the work list label May 29, 2020
@Hixie Hixie removed this from the None. milestone Aug 17, 2020
@wangkaibule
Copy link

wangkaibule commented Oct 28, 2020

Here's the comment from ImDisk discussion forum

(for the WinAPI GetFinalPathNameByHandle returning ERROR_INVALID_FUNCTION ):

The issue is "inherent" to the nature of IMDISK (that bypasses the Volume Mount Manager)
Olof already commented on it:
http://reboot.pro/topic/21152-possible-bug-or-incompatibility-in-imdisk/

Try with Arsenal Image Mounter, it should work fine, as it is a "real" virtual disk driver.

Arsenal Image Mounter has free version with basic functionality (including Ramdisk), which is mentioned in the official ImDisk driver site.

@flutter-triage-bot flutter-triage-bot bot added team-tool Owned by Flutter Tool team triaged-tool Triaged by Flutter Tool team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: crash Stack traces logged to the console dependency: dart Dart team may need to help us P2 Important issues not at the top of the work list platform-windows Building on or for Windows specifically team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team
Projects
Tools - Windows review
  
Engineer reviewed
Development

No branches or pull requests

8 participants