Skip to content

Only access instance.getURL if the instance has booted#71

Merged
danmcclain merged 1 commit intoember-fastboot:masterfrom
jasonmit:patch-1
Jul 14, 2016
Merged

Only access instance.getURL if the instance has booted#71
danmcclain merged 1 commit intoember-fastboot:masterfrom
jasonmit:patch-1

Conversation

@jasonmit
Copy link
Copy Markdown
Contributor

@jasonmit jasonmit commented Jul 8, 2016

Accessing it if the instance failed to boot causes Ember's router to try and access location.getURL when location is a string ("none") instead the expected Ember.NoneLocation instance.

This is leading to all uncaught errors that occur during the app boot to be masked/swallowed.

ember-fastboot/ember-cli-fastboot#223

I can send a fix into Ember to not invokegetURL when the location object was not created.

@rwjblue
Copy link
Copy Markdown
Member

rwjblue commented Jul 8, 2016

This seems good to me, but I agree that we should probably also make some changes upstream in Ember around this too.

@thoov
Copy link
Copy Markdown
Contributor

thoov commented Jul 8, 2016

There are some other instances where the getURL error is still happening. I plan to work through those cases this weekend (@jasonmit on @thoov's account)

@jasonmit jasonmit force-pushed the patch-1 branch 6 times, most recently from f6a7746 to 8a41177 Compare July 9, 2016 06:20
@jasonmit
Copy link
Copy Markdown
Contributor Author

jasonmit commented Jul 9, 2016

@rwjblue okay, should be fine and ready to merge when you're ready. I'll also start on fixing the upstream bug in Ember.

@danmcclain danmcclain merged commit bf19168 into ember-fastboot:master Jul 14, 2016
@jasonmit jasonmit deleted the patch-1 branch July 18, 2016 02:02
@et
Copy link
Copy Markdown

et commented Jan 6, 2017

@jasonmit - did you ever get a chance to work on the upstream bug in Ember? I'm starting to see this in an acceptance test. Let me know if I can help too 😄

@seanmcc
Copy link
Copy Markdown

seanmcc commented Jul 18, 2017

I just got this error. In my case, the problem was not in an initializer, but a bad route definition. The way I figured this out was to start ember server without fastboot FASTBOOT_DISABLED=true ember serve. The error I saw in the browser was very useful, but for some reason, fastboot errors can be opaque.

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

Successfully merging this pull request may close these issues.

6 participants