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

Random failures #149

Closed
brandonweiss opened this issue Apr 10, 2015 · 15 comments
Closed

Random failures #149

brandonweiss opened this issue Apr 10, 2015 · 15 comments

Comments

@brandonweiss
Copy link

I've been using this for the last week and have been running into the same random failure issue over and over again. The Ember app will just randomly and inexplicably fail. Sometimes it will just be once. Sometimes it will be for long stretches. If I open the console I can see the two main JS files (vendor.js and [app-name].js) randomly 404-ing. Sometimes only one will 404. Sometimes both will. And then randomly they won't and the app will load.

I don't really know how to debug this. Any idea what might be wrong?

@rwz
Copy link
Collaborator

rwz commented Apr 10, 2015

Hm. It could be build timeout errors. Try increasing your build timeouts like so:

EmberCLI.configure do |c|
  c.app :frontend, build_timeout: 30
end

@brandonweiss
Copy link
Author

We have ours set to 20 right now. I can up to 30 but I have to imagine 20 seconds should be long enough for the build to complete. And why would sometimes only some of the assets alternately fail? I would assume if it was a build timeout they'd all fail?

@brandonweiss
Copy link
Author

I just tried upping it to 30 but I still get the same alternating 404's.

@rwz
Copy link
Collaborator

rwz commented Apr 10, 2015

Hard to say what exactly is wrong. Try updating ember-cli maybe?

Please keep us posted if you find out what's causing this.

@brandonweiss
Copy link
Author

We are on the latest version of everything. It was killing our productivity so we decided to just wire up our own simple version—we'll try again in the future. Thanks!

@biscuitvile
Copy link

I'm getting the same and trying my best to find out why.

ember -v shows the following:

version: 0.2.3
node: 0.12.2
npm: 2.7.6

My initializer looks like this:

EmberCLI.configure do |c|
  c.app :frontend, path: 'frontend', build_timeout: 30
end

and I have the development.rb set to config.consider_all_requests_local = true

Get 404s for vendor.js and admin-frontend.js pretty consistently for long stretches at a time, and then it will work intermittently for a while.

@biscuitvile
Copy link

For me at least my failures are seeming no longer random at all. Creating the most basic rails app with ember-cli-rails and I end up with the following: I get 404's for these assets consistently every time I start the server the first time and only the first time. Any page load after that and these assets load lightning fast.

However if I use Pow as my webserver I get these 404s every single time, consistently. For casual development I don't need to use pow but for some apps, for example Rails apps needing subdomains or to collaborate with other apps on specific local .dev domains, Pow is essential. I'm digging into this issue more but if you are experiencing this issue and using Pow as well and have config.consider_all_requests_local set to true already than I am willing to bet that not using Pow will resolve your issues.

@biscuitvile
Copy link

Nailed it. If any Pow users find this later make sure that Pow can see node. If you tail your development log you won't see this, you need to tail the Pow log then you can see that Pow has no knowledge of node.

I'm a new user to nvm and did not set a default version. Once I set the default version with nvm and restarted my machine these asserts are loading correctly all the time.

I'm so stoked because this gem is awesome!

@biscuitvile
Copy link

@brandonweiss I'm very curious to know if you're a Pow user as well or not.

@brandonweiss
Copy link
Author

Aha, that hadn't occurred to me. I don't normally use Pow, but I was for this particular project.

@seanpdoyle
Copy link
Contributor

@brandonweiss could you be having issues similar to those discussed here? #94

Are you running a forking application server? Have you tried reducing the number of workers / forks to 1?

@brandonweiss
Copy link
Author

No, I'm not funning a forking application server in development. I'm pretty sure it was the Pow issue previously mentioned.

@seanpdoyle
Copy link
Contributor

@brandonweiss sounds good. I'm closing this issue.

Feel free to reopen if issues continue.

@trucam
Copy link

trucam commented Jun 24, 2015

@biscuitvile how did you "make sure that Pow can see node"? Currently struggling with this exact issue!

@jsmestad
Copy link

jsmestad commented Sep 7, 2015

I hit this same issue with ember-cli-rails and pow. Not sure what @biscuitvile did to resolve it exactly. To recreate the issue I do the following:

  1. Launch rails app (through .dev domain on pow)
  2. Page loads
  3. go into app/styles/app.scss and change the file somehow
  4. go to browser and refresh, will error until I restart pow touch tmp/restart.txt

Note: this application works fine without change when using puma via rails s

The error:

EmberCLI::App::BuildError (EmberCLI app "frontend" has failed to build):
  Error: ENOENT, no such file or directory 'frontend/app'
      at Error (native)
      at Object.fs.symlinkSync (fs.js:848:18)
      at symlink (frontend/node_modules/ember-cli/node_modules/symlink-or-copy/index.js:82:14)
      at symlinkOrCopySync (frontend/node_modules/ember-cli/node_modules/symlink-or-copy/index.js:58:5)
      at frontend/node_modules/ember-cli/node_modules/broccoli-funnel/node_modules/broccoli-plugin/read_compat.js:58:9
      at lib$rsvp$$internal$$tryCatch (frontend/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:493:16)
      at lib$rsvp$$internal$$invokeCallback (frontend/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:505:17)
      at lib$rsvp$$internal$$publish (frontend/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:476:11)
      at lib$rsvp$asap$$flush (frontend/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1198:9)
      at process._tickCallback (node.js:355:11)

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

6 participants