mozilla / tofino

Project Tofino is a browser interaction experiment.
https://mozilla.github.io/tofino
Apache License 2.0
647 stars 68 forks source link

Install on Windows fails #1557

Closed joewalker closed 7 years ago

joewalker commented 7 years ago

Tried on Vista and Win10, both fail. Trimmed log file...

Program: Starting Squirrel Updater: --install .
Program: Starting install, writing to C:\Users\Owner\AppData\Local\SquirrelTemp
Program: About to install to: C:\Users\Owner\AppData\Local\Tofino
CheckForUpdateImpl: Couldn't write out staging user ID, this user probably shouldn't get beta anything: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Owner\AppData\Local\Tofino\packages\.betaId'.
...
CheckForUpdateImpl: Failed to load local releases, starting from scratch: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Owner\AppData\Local\Tofino\packages\RELEASES'.
...
CheckForUpdateImpl: Reading RELEASES file from C:\Users\Owner\AppData\Local\SquirrelTemp
CheckForUpdateImpl: First run or local directory is corrupt, starting from scratch
ApplyReleasesImpl: Writing files to app directory: C:\Users\Owner\AppData\Local\Tofino\app-0.2.0
IEnableLogger: Failed to install package to app dir: System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
...
Mossop commented 7 years ago

Freaking windows and its inability to cope with long pathnames

bgrins commented 7 years ago

Looks like the same issue as https://github.com/atom/atom/issues/5109. Here's a workaround that some people are using: https://github.com/atom/atom/issues/5109#issuecomment-153311100

bgrins commented 7 years ago

The consensus here is to not use such a long path: https://github.com/Squirrel/Squirrel.Windows/issues/192

bgrins commented 7 years ago

The fix for the issue in atom was to shorten some paths: https://github.com/atom/atom/pull/5175

bgrins commented 7 years ago

Downloading https://github.com/mozilla/tofino/releases/download/v0.2.0/Tofino-0.2.0-full.nupkg and unzipping it, then running find . -exec dirname {} \; | gawk '{ print length, $0 }' | sort -rn | head -10, shows some of the longest paths in the archive:

213 ./lib/net45/resources/app/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property
213 ./lib/net45/resources/app/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property
213 ./lib/net45/resources/app/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property
213 ./lib/net45/resources/app/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules/is-property
202 ./lib/net45/resources/app/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match
202 ./lib/net45/resources/app/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match
202 ./lib/net45/resources/app/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match
202 ./lib/net45/resources/app/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match
201 ./lib/net45/resources/app/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/node_modules
201 ./lib/net45/resources/app/node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/gauge/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan
bgrins commented 7 years ago

If I cd lib/net45/resources/app/ && npm dedupe in the nupkg I get much shorter results:

104 ./lib/net45/resources/app/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args
104 ./lib/net45/resources/app/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args
104 ./lib/net45/resources/app/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args
104 ./lib/net45/resources/app/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args
100 ./lib/net45/resources/app/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib
98 ./lib/net45/resources/app/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate
98 ./lib/net45/resources/app/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate
98 ./lib/net45/resources/app/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate
98 ./lib/net45/resources/app/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate
98 ./lib/net45/resources/app/node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate
bgrins commented 7 years ago

Another manifestation of this when attempting to extract tofino-win32-ia32.zip

error extracting zip
bgrins commented 7 years ago

@joewalker can you try running this build and see if it extracts and runs properly?

Zip: https://mozilla-releng-tofino.s3.amazonaws.com/mozilla/tofino/builds/win-paths/tofino-win32-ia32.zip Installer: https://mozilla-releng-tofino.s3.amazonaws.com/mozilla/tofino/builds/win-paths/tofino-win32-ia32.exe

joewalker commented 7 years ago

The install is particularly nice, from double clicking on the installer to running without any user interaction in virtually no time at all. I could also unzip the zip file without trouble. +1

bgrins commented 7 years ago

Alright, updated master build at https://mozilla-releng-tofino.s3.amazonaws.com/mozilla/tofino/builds/master/tofino-win32-ia32.exe should be working