We're embedding our ember app in a legacy application, but when you transition from an ember route to a non-ember URL, Ember route throws UnrecognizedUrlError. Looks like when override the location.onUpdateURL event we should check if it's nested under rootURL.
https://github.com/emberjs/ember.js/blob/v2.5.0/packages/ember-routing/lib/system/router.js#L176
I'm not really following how this is triggered here. Is the legacy application another single page app that you are transitioning between? If not, then the page refresh should void any onUpdateURL that we setup anyways...
Yes, the legacy application is SPA. When it pushes a new state to history I think popstate triggers the onUpdateURL callback.
@batjaa Could you make up a reproduction of your issue on Twiddle (or possibly a Github repo if it's hard to trigger on Twiddle)? This is going to be hard for people to help with without it ...
https://github.com/batjaa/ember-root-url-test
Created this repo for reproduction. It's a little bit vague but I hope you get the idea.
The main app (index.html) is a SPA that talks to the browser history API. Assuming some action has triggered the popstate event while transition to a URL from the parent app when you have the ember app embedded and it's running. You can it throws an exception that the URL is not defined.
@batjaa @acorncom @rwjblue is this still an issue, perhaps we should close or create a new reproduction of this, what do you think?
Per our triage policy I'll close this out for now, feel free to reopen if the issue persists on the current release.