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

"Could not start pub serve" since upgrade to 1.5.1 #19659

Closed
DartBot opened this issue Jun 25, 2014 · 19 comments
Closed

"Could not start pub serve" since upgrade to 1.5.1 #19659

DartBot opened this issue Jun 25, 2014 · 19 comments
Assignees
Labels
closed-obsolete Closed as the reported issue is no longer relevant
Milestone

Comments

@DartBot
Copy link

DartBot commented Jun 25, 2014

This issue was originally filed by alastair....@gmail.com


What steps will reproduce the problem?

  1. Upgrade dart editor to 1.5.1
  2. Attempt to run a project
  3. Launch fails with error: "Could not start pub serve or connect to pub"

What is the expected output? What do you see instead?

Expected: the project launches in dartium. What I see: a message box with the text above. In the Tools menu of dart editor, the "Pub serve" option is greyed out and replaced with "Pub serve [stopped]".

What version of the product are you using? On what operating system?

Problem only began today with upgrade to 1.5.1. On linux/64. Tested on another linux/64 system to confirm it wasn't just my build machine; the exact same behaviour occurs.

Please provide any additional information below.

If I missed a memo and we're not supposed to be serving our apps up in development with pub serve, then do point me to the memo!

@DartBot
Copy link
Author

DartBot commented Jun 25, 2014

This comment was originally written by alastair....@gmail.com


I should probably note that other pub-related commands (e.g. pub get, pub upgrade) seem to work fine.

I can also run pub serve from the command line, but I can't coax it into serving my application. Perhaps I'm getting the syntax wrong - it is just pub serve [path to folder containing project], yes? That doesn't work for me, I get the message

Error in pubspec.yaml:
Could not find a file named "pubspec.yaml" in "<path to dart-sdk/bin folder>".

The same error occurs no matter what folder path I include in the pub serve command line.

Out of interest, how do I downgrade my install? Everything worked fine prior to 1.5.1, and at the moment I can't do anything so a downgrade would at least leave me able to get some work done. Cheers A.

@floitschG
Copy link
Contributor

Tentatively assigning to editor.


Added Area-Editor, Triaged labels.

@floitschG
Copy link
Contributor

Seems like this is a duplicate of 19656


Added Duplicate label.
Marked as being merged into #19656.

@DartBot
Copy link
Author

DartBot commented Jun 25, 2014

This comment was originally written by alastair....@gmail.com


What about this makes you think it's a duplicate of 19656?

@munificent
Copy link
Member

Unduping since that doesn't look related to me.

it is just pub serve [path to folder containing project], yes?

Like other pub commands, you need to run it from within your package's root directory. So:

$ cd path/to/package
$ pub serve


Added Triaged label.
Marked as being merged into #.

@DartBot
Copy link
Author

DartBot commented Jun 25, 2014

This comment was originally written by alastair.carey...@gmail.com


Does that mean pub must be in my path? I don't think it is. That wasn't a problem prior to 1.5.1 since I never used pub from the command line. Perhaps 1.5.1 now assumes pub is in path?

@DartBot
Copy link
Author

DartBot commented Jun 25, 2014

This comment was originally written by alastair....@gmail.com


(Although running pub get, pub update from within dart editor still works fine, it's just pub serve that is broken. So I don't think it can be as simple as a path problem.)

@keertip
Copy link
Contributor

keertip commented Jun 25, 2014

@alastair,

Apart from the dialog, do you see any other messages in the console, as to why pub serve is not starting?

@DartBot
Copy link
Author

DartBot commented Jun 25, 2014

This comment was originally written by alastair....@gmail.com


The following message is printed in the console:

--- 17:45:37 Starting pub serve : <project name> ---

That's it.

@DartBot
Copy link
Author

DartBot commented Jun 25, 2014

This comment was originally written by alastair....@gmail.com


I used the information from @­mystrom to attempt to serve the project from the command line:

$ cd /path/to/project
$ /path/to/dart/dart-sdk/bin/pub serve

But it never gets past the line "Loading source assets", and running Dartium and pointing it to the URL for my project doesn't work.

How do I revert my dart editor and tools from 1.5.1 to the previous stable version? I can't get anything done at the moment and this is costing me money.

@keertip
Copy link
Contributor

keertip commented Jun 25, 2014

Did you do an update to 1.5.1? If so, download a fresh copy of 1.5.1, install elsewhere and try it and see if that solves the problem.

@DartBot
Copy link
Author

DartBot commented Jun 25, 2014

This comment was originally written by alastair.ca...@gmail.com


The editor upgraded itself to 1.5.1 automatically.

I've uninstalled and reinstalled. There doesn't seem to be any way to download a previous version from the website, or I'd just do that. I guess I'll start archiving the downloads myself from now on.

This happens on both my development machines, not just one, so I don't think it's my configuration particularly. And with both machines refusing to do anything remotely useful, I'm seriously stuck here.

@keertip
Copy link
Contributor

keertip commented Jun 25, 2014

You can also run the app without pub serve, while we figure out the problem. Go to Run > Manage Launches and your launch config, uncheck pub serve. Then launching will not use pub serve.

@DartBot
Copy link
Author

DartBot commented Jun 25, 2014

This comment was originally written by alastair....@gmail.com


Yes, I noticed that setting. However, it doesn't work. The dart editor reports an error in some sort of javascript file that appears to come packaged with the polymer project. Again, this didn't happen in the last stable version of dart. I don't know if that's because something changed in polymer, or if it's to do with not running a server, or something else. The whole situation is very confusing - it's as though everything has collapsed at once.

Is there no way to revert to the previous version?

@DartBot
Copy link
Author

DartBot commented Jun 25, 2014

This comment was originally written by alastair.care...@gmail.com


More specifically, the error is in the web_components package, v0.3.5, in platform.js, on line 12. Is this an error that could be caused by the lack of pub serve, or is it entirely coincidental that it has just started to happen now?

@munificent
Copy link
Member

But it never gets past the line "Loading source assets", and running Dartium and pointing it to the URL for my project doesn't work.

Can you trying running:

$ /path/to/dart/dart-sdk/bin/pub serve --verbose

and include the output here? Also, is there any chance you could share your package with us?

@DartBot
Copy link
Author

DartBot commented Jun 25, 2014

This comment was originally written by alastair....@gmail.com


I will provide the output from the pub serve --verbose command shortly.

I removed my project from the Dart Editor and created a new project using the polymer sample. pub serve doesn't have a problem launching it (it's MUUUCH slower than previous versions, but it works). However, it still bombs out with the same error in web_components as I mentioned above. And this is sample code distributed with the dart editor!

Still, this suggests that pub serve doesn't like something about my project. So, definitely progress.

@DartBot
Copy link
Author

DartBot commented Jun 25, 2014

This comment was originally written by alastair.ca...@gmail.com


Output from pub serve --verbose:

pub serve --verbose
FINE: Pub 1.5.1
FINE: Loaded package graph.
FINE: Bound "null" to localhost:0.
Loading source assets...
FINE: Providing sources for lawndart|lib.
FINE: Providing sources for args|lib.
FINE: Providing sources for browser|lib.
FINE: Providing sources for collection|lib.
FINE: Providing sources for petitparser|lib.
FINE: Providing sources for meta|lib.
FINE: Providing sources for barback|lib.
FINE: Providing sources for code_transformers|lib.
FINE: Providing sources for template_binding|lib.
FINE: Providing sources for polymer|lib.
FINE: Providing sources for smoke|lib.
FINE: Providing sources for stack_trace|lib.
FINE: Providing sources for html5lib|lib.
FINE: Providing sources for fixnum|lib.
FINE: Providing sources for path|lib.
FINE: Providing sources for utf|lib.
FINE: Providing sources for logging|lib.
FINE: Providing sources for observe|lib.
FINE: Providing sources for yaml|lib.
FINE: Providing sources for web_components|lib.
FINE: Providing sources for lzma|lib.
FINE: Providing sources for source_maps|lib.
FINE: Providing sources for polymer_expressions|lib.
FINE: Providing sources for analyzer|lib.
FINE: Providing sources for immediate|lib.

It hangs here. The project's name is immediate. The folder immediate/lib is a symlink. This would seem to be the root cause of the problem - pub serve no longer digests symlinks.

@DartBot
Copy link
Author

DartBot commented Jun 25, 2014

This comment was originally written by alastair....@gmail.com


Correction: it isn't a hang. After several minutes, pub serve reports:

Exhausted heap space, trying to allocate 112 bytes.
Exhausted heap space, trying to allocate 80 bytes.
Exhausted heap space, trying to allocate 96 bytes.
Exhausted heap space, trying to allocate 80 bytes.
Exhausted heap space, trying to allocate 80 bytes.
Exhausted heap space, trying to allocate 80 bytes.
Exhausted heap space, trying to allocate 80 bytes.
Exhausted heap space, trying to allocate 80 bytes.
Exhausted heap space, trying to allocate 80 bytes.
Exhausted heap space, trying to allocate 160 bytes.
Exhausted heap space, trying to allocate 128 bytes.
Exhausted heap space, trying to allocate 80 bytes.
Exhausted heap space, trying to allocate 80 bytes.
Unhandled exception:
Out of memory

@DartBot DartBot added Type-Defect closed-obsolete Closed as the reported issue is no longer relevant labels Jun 25, 2014
@DartBot DartBot added this to the 1.9 milestone Jun 25, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-obsolete Closed as the reported issue is no longer relevant
Projects
None yet
Development

No branches or pull requests

4 participants