Proxy not working

Hi all, we have tried to upgrade our current ember app from 3.28 to the newest version 6.x. Seems to be impossible due to the amount of braking changes. As a new approach we have created a blank ember app and now we plan to mograte the existing functionality from the legacy app. First thing which does not work is the emper proxy. While starting the app the log says “proxying to http://localhost:3000” but every try to fetch data remains at http://localhost:4200 where the ember app is running. sorry for this but I am so fed up with ember and JavaScript vodoo :slight_smile: hope someone cann help

Hi Marco! Sorry to hear your having issues here. I’ll be honest with you though, going straight from 3.28 to 6.0 is not something I’d recommend even for a trivlal app. That’s years of framework development and deprecations in a big-bang update and I would expect there to be a lot of issues. Porting to a blank app might work ok but could be more work in the long run and you could lose git history etc. Really though you’ll end up translating code the same way you would by upgrading so you may not save yourself any trouble.

What I’d probably suggest is taking upgrades in smaller chunks, make sure you fix any deprecation warnings as you go, and always update ember addons to the newest compatible version before upgrading ember itself.

My recommendation would look something like this:

  • 3.28 => 4.0 - this is a massive hurdle for many people because 3.28 had so many deprecations. Make extra sure you’ve fixed any deprecations, updated addons to whatever versions that support 3.28 still, then ember-cli-update to 4.0.
  • 4.0 => 4.4 - from 4.0 on you can be more generous with your version jumps because things changed slower but there were still deprecations added and this will prepare you for major bumps. Clear the deprecation warnings and move on to the next LTS/4-version chunk.
  • 4.4 => 4.8
  • 4.8 => 4.12
  • 4.12 => 5.0 - should be simple if you’ve cleared all the 4.x deprecations as you go
  • 5.0 => 5.4 - same deal as above
  • 5.4 => 5.8
  • 5.8 => 5.12
  • 5.12 => 6.0

Honestly going from 3.28 => 4.0 might be the hardest part for you. I would suggest not trying to do huge version jumps though, and make extra sure you clear your deprecation warnings before bumping major versions.

As for the proxy issue… it’s still documented here so that doesn’t seem like something that was removed or changed, maybe try asking in Discord or filing a bug issue in the ember-cli project?

1 Like

This suggests the proxy is working as expected. The ember-cli dev server will intercept requests to localhost:4200 and forward them to localhost:3000. The app will still fetch against localhost:4200