-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Pub hangs creating lock file #6986
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
Comments
Can you give me a few more details here? When you create the file manually, are you creating an empty file? What are the contents? Can you try running pub update without a lock file and let me know what that does? Thanks! Added NeedsInfo label. |
This comment was originally written by [email protected] The file was initially empty (steps taken: create empty text file, rename+change extension), I've just named it pubspec.lock and when running pub install again it just filled itself up with the following json encoded content. {"packages":{"web_components":{"version":"0.2.6+1","source":"hosted","description":"web_components"},"js":{"version":"0.0.10","source":"hosted","description":"js"},"args":{"version":"0.0.0-r.15130","source":"sdk","description":"args"},"unittest":{"version":"0.0.0-r.15130","source":"sdk","description":"unittest"},"html5lib":{"version":"0.2.0","source":"hosted","description":"html5lib"},"logging":{"version":"0.0.0-r.15130","source":"sdk","description":"logging"}}} pub update seems to work without any problem even missing the lock file, then the file just appears right after the operation with the following content {"packages":{"web_components":{"version":"0.2.7","source":"hosted","description":"web_components"},"js":{"version":"0.0.10","source":"hosted","description":"js"},"args":{"version":"0.0.0-r.15130","source":"sdk","description":"args"},"unittest":{"version":"0.0.0-r.15130","source":"sdk","description":"unittest"},"html5lib":{"version":"0.2.1","source":"hosted","description":"html5lib"},"logging":{"version":"0.0.0-r.15130","source":"sdk","description":"logging"},"meta":{"version":"0.0.0-r.15130","source":"sdk","description":"meta"}}} Prompt me if requiring any other kind of information. |
It's strange that this works but pub install doesn't. Can you do me a favor and delete your lock file and then try pub install again? Sorry for all the back and forth, but I don't know how to repro this issue here. Thanks! |
This comment was originally written by [email protected] Just did as told, but it's just hanging as before. Although it seems to be only happening on pub install. |
OK, thanks. I'll see if I can take a look at this. However, I still don't know how to reproduce it locally so any other information you can give me will help. Do you know if there's anything unusual about your file system, OS, etc.? Any ideas why creating a file might fail? Added Accepted label. |
This comment was originally written by [email protected] I've also tried under administrative rights, but it didn't solve the issue. Some time ago I've messed up with the language settings on this machine; I don't know whether that might actually be the problem but other SDKs, like the Android one, are perfectly able to write on the filesystem of this pc. |
This comment was originally written by [email protected] I have exactly the same issue. Creating the lock file manually "solves" it. If there is something I can do to help just give me a ping. |
As always, precise steps to reproduce the problem on a machine here will help immensely. Right now, I see that this is an issue, but I can't reproduce it myself so I don't know how to go about fixing it. |
This comment was originally written by [email protected]
Expect pub working, instead it hangs forever.
Pub has worked, packages installed, pubspec.lock updated. BTW, what kind of machine you are using to reproduce this bug?
|
This comment was originally written by [email protected] Sorry. Actually I have had dart of revision 15369 as active version.
Get a stacktrace: Resolving dependencies... |
This comment was originally written by [email protected] Filed http://code.google.com/p/dart/issues/detail?id=7180 for this new one. |
Thanks for the new bug, that definitely sounds like a different issue. |
Anyone who can reproduce this issue, if you'd like to help me track this down could you please:
That should spew a pile of detailed logs at you. If you can repro the issue, please save those to a fail and attach them to this bug. Thanks! In the meantime, I'll see if I can reproduce this on my Windows machine here. Added Started label. |
This comment was originally written by [email protected] Done. c:\dart\samples\solar3d>pub --verbose install On this step process hangs up. |
This comment was originally written by @aam Just reproduced Vadim's issue(on freshly installed Russian Win7). It hangs at the same "Reading text file" step(mangled pseudo-graphics is what the output actually looks like): === |
This comment was originally written by [email protected] I suspect that if reading lock file have been guarded by WinApi FileExists function, process would pass on. |
We're still trying to get a machine configured in a way that we can repro this. In the meantime, can any of you try the following and let me know if this helps?
Future<LockFile> _loadLockFile() { log.fine("Loading lockfile."); return readTextFile(lockFilePath).transform((text) => Try to repro the problem. This may fix the issue, which would be good, or it may not. Either way, I still don't know why the issue is appearing. |
Hi, Mads! Based on the logging, it looks like this is hanging in a call to: new File(path).readAsString(Encoding.UTF_8) If it had proceeded much farther, there would be more log output so I think it's the dart:io call itself that never returns. On all of our machines, this of course does the right thing when the file doesn't exist (it completes to an exception), but that doesn't seem to be the case for the users on this bug. Any idea why that may be? cc @madsager. |
Can the logging be broken up so that you know whether it's the new File() or readAsString() that isn't returning? |
From deadpikasso:
When launching pub install either from command line or from DartEditor, the command hangs indefinitely. I'm on Windows 7 Home x64, Dart version 0.2.4.2_r15130.
pub --trace install outputs nothing
I've done some little debug into the util/pub and it actually hangs on the creation of the lock file, couldn't go further tho.
Creating the file manually solved the issue, and everything worked as expected, but I can't get it working without creating the file beforehand.
The text was updated successfully, but these errors were encountered: