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

FrontendServerClient doesn't handle properly filepaths with spaces on windows, so webdev launch fails #1380

Closed
tslominski opened this issue Aug 7, 2021 · 1 comment · Fixed by #1382

Comments

@tslominski
Copy link

webdev doesn't compile on windows - 2.14.0-377.0.dev: Invalid radix-10 number (at character 1)

When trying to launch barebone web app on Windows 10 using dart 2.14.0-377.0.dev (via PhpStorm) I've got this error chain:

$ D:\langs\dart\bin\dart.exe pub global run webdev daemon web:53322 --launch-app=web/index.html

Invalid radix-10 number (at character 1)
user\AppData\Local\Pub\Cache\global_packages\webdev\incremental\webdev.dart...
^
dart:core int.parse
package:frontend_server_client/src/frontend_server_client.dart 175:32 FrontendServerClient.compile
===== asynchronous gap ===========================
package:pub/src/dart.dart 182:18 precompile
===== asynchronous gap ===========================
package:pub/src/entrypoint.dart 358:5 Entrypoint._precompileExecutable
===== asynchronous gap ===========================
package:pub/src/entrypoint.dart 350:12 Entrypoint.precompileExecutable
===== asynchronous gap ===========================
package:pub/src/log.dart 347:18 warningsOnlyUnlessTerminal
===== asynchronous gap ===========================
package:pub/src/global_packages.dart 418:9 GlobalPackages.runExecutable.
===== asynchronous gap ===========================
package:pub/src/executable.dart 103:7 runExecutable
===== asynchronous gap ===========================
package:pub/src/global_packages.dart 412:12 GlobalPackages.runExecutable
===== asynchronous gap ===========================
package:pub/src/command/global_run.dart 72:22 GlobalRunCommand.runProtected

Somehow works well with when switching to last stable version of dart (2.13.4). Works well on linux (with path without spaces)
Tested with "barebone" web app created by PHPStorm

Full path to cache is "C:\Users\Registered user\AppData\Local\Pub", seems to be truncated in error message

When I look at frontend_server_client.dart, I find this:
case _CompileState.gettingSourceDiffs:
if (line.startsWith(feBoundaryKey)) {
state = _CompileState.done;
var parts = line.split(' ');
outputDillPath = parts[1];
errorCount = int.parse(parts[2]);
continue;
}

It seems there is problem when path to cache contains spaces

pubspec.yaml:
name: test
description: An absolute bare-bones web app.
version: 1.0.0

homepage: https://www.example.com

environment:
sdk: '>=2.12.0 <3.0.0'

dependencies:

path: ^1.7.0

dev_dependencies:
build_runner: ^1.10.0
build_web_compilers: ^2.11.0
lints: ^1.0.0

@annagrin
Copy link
Contributor

@jakemac53 - for frontend server client.

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

Successfully merging a pull request may close this issue.

2 participants