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

Test Error with Angular Web Stagehand Template #2086

Closed
tsteward opened this issue Mar 15, 2019 · 6 comments
Closed

Test Error with Angular Web Stagehand Template #2086

tsteward opened this issue Mar 15, 2019 · 6 comments

Comments

@tsteward
Copy link

I create the default web-angular using Stagehand.

I run this command to run tests as described in documentation:

pub run build_runner test --fail-on-severe -- -p chrome

I get the following error:

PS D:\Users\tstew\playground\angular_test> pub run build_runner test --fail-on-severe -- -p chrome
[INFO] Generating build script completed, took 465ms
[INFO] Reading cached asset graph completed, took 603ms
[INFO] Checking for updates since last build completed, took 1.1s
[INFO] Running build completed, took 2m 9s
[INFO] Caching finalized dependency graph completed, took 523ms
[INFO] Creating merged output dir `D:\Users\tstew\AppData\Local\Temp\build_runner_test2899cb90-46ec-11e9-82b6-7c67a23a2b21\`...

You have hit a bug in build_runner
Please file an issue with reproduction steps at https://github.com/dart-lang/build/issues


FileSystemException: Cannot create link, path = 'D:\Users\tstew\AppData\Local\Temp\build_runner_test2899cb90-46ec-11e9-82b6-7c67a23a2b21\test\packages' (OS Error: A required privilege is not held by the client.
, errno = 1314)
dart:io                                                                       _Link.createSync
package:build_runner_core/src/environment/create_merged_dir.dart 93:16        _createMergedOutputDir.<fn>
package:build_runner_core/src/logging/logging.dart 25:30                      logTimedAsync
package:build_runner_core/src/environment/create_merged_dir.dart 72:9         _createMergedOutputDir
package:build_runner_core/src/environment/create_merged_dir.dart 44:16        createMergedOutputDirectories
package:build_runner_core/src/environment/io_environment.dart 81:18           IOEnvironment.finalizeBuild
package:build_runner_core/src/environment/overridable_environment.dart 52:49  OverrideableEnvironment.finalizeBuild
package:build_runner_core/src/generate/build_impl.dart 218:33                 _SingleBuild.run
package:build_runner_core/src/generate/build_impl.dart 93:42                  BuildImpl.run
package:build_runner_core/src/generate/build_runner.dart 24:14                BuildRunner.run
package:build_runner/src/generate/build.dart 111:30                           build
package:build_runner/src/entrypoint/test.dart 90:26                           TestCommand.run
package:args/command_runner.dart 196:27                                       CommandRunner.runCommand
package:args/command_runner.dart 111:29                                       CommandRunner.run.<fn>
dart:async                                                                    new Future.sync
package:args/command_runner.dart 111:11                                       CommandRunner.run
package:build_runner/src/entrypoint/run.dart 23:31                            run
.dart_tool\build\entrypoint\build.dart 132:22                                 main
  • Dart VM version: 2.2.0 (Tue Feb 26 15:04:32 2019 +0100) on "windows_x64"
  • build_runner 1.2.3
  • stagehand version: 3.2.0
  • Windows 10 Version 1809 (OS Build 17763.379)
  • Google Chrome Version 73.0.3683.75 (Official Build) beta (64-bit)
dependencies:
  angular: ^5.2.0
  angular_components: ^0.11.0

dev_dependencies:
  angular_test: ^2.2.0
  build_runner: ^1.1.2
  build_test: ^0.10.3
  build_web_compilers: ^1.0.0
  pedantic: ^1.0.0
  test: ^1.5.1
@jakemac53
Copy link
Contributor

@tsteward can you try running in a console with admin privileges? I think this might be due to a recent change in the sdk, see dart-lang/sdk#33966 for context.

@jakemac53
Copy link
Contributor

If that does in fact repro the issue we can add a try/catch here https://github.com/dart-lang/build/blob/master/build_runner_core/lib/src/environment/create_merged_dir.dart#L97 and try to handle it more gracefully.

@tsteward
Copy link
Author

When I run in an admin console I don't get the error.

@jakemac53
Copy link
Contributor

Ok, thanks. It looks like we get a pretty specific error code 1314 that we can check for at least.

I am not sure what the proper behavior should be for us - unfortunately it doesn't look like we can fall back on junctions but copying the entire contents of the packages dir isn't really an option either.

@CosmicPangolin
Copy link

CosmicPangolin commented Jun 19, 2019

@jakemac53 I'm also hitting this issue when using firebase functions interop in dart...noticed this has been open for a while.

@jakemac53
Copy link
Contributor

Oh, this issue should actually be closed. We have implemented the explicit check for this exception and will point users at the docs for how to enable developer mode in Windows which resolves the problem without needing an elevated console.

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

No branches or pull requests

3 participants