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

fastboot issues with 6.0.1 #195

Closed
st-h opened this issue Oct 16, 2020 · 12 comments · Fixed by #196
Closed

fastboot issues with 6.0.1 #195

st-h opened this issue Oct 16, 2020 · 12 comments · Fixed by #196

Comments

@st-h
Copy link

st-h commented Oct 16, 2020

After upgrading to 6.0.1 I have been having issue using this addon. This is the error being printed to the console:

index.js:128 Uncaught (in promise) Error: Assertion Failed: [ember-page-title]: Multiple or no <title> element(s) found. Check for other addons like ember-cli-head updating <title> as well.

The issue seems, that there are 3 title elements being present.
If I run in non-fastboot mode, by adding query param ?fastboot=false, there are 0 title elements (this would be an issue in case the fastboot server unexpectedly stops to work)

I have tried to remove templates/head.hbs and reinstalled the addon, but nothing helped. I think the issue with multiple title tags is related to nested routes, as all my top level routes seem to work fine. And this only seems to occur when reloading the page or when navigation to a nested route.

I do not use anything like ember-cli-head or any other addon I am aware of that would be making changes to the title.

@raido
Copy link
Contributor

raido commented Oct 16, 2020

Could you try adding private service -document to your engines services list from host app?

Ref: https://github.com/adopted-ember-addons/ember-page-title/blob/master/addon/services/page-title-list.js#L22

@st-h
Copy link
Author

st-h commented Oct 16, 2020

@raido Thanks for your reply. I am a little lost, though. We never had a engines services list in our app. I suppose this is related to ember-engines? This app just uses fastboot - no engines.

@raido
Copy link
Contributor

raido commented Oct 16, 2020

Sorry, I confused few things. There's one other issue on repo related to engines, I mixed things :)

Is it possible for you to give more details on route structure or perhaps provide reproduction?

@raido
Copy link
Contributor

raido commented Oct 16, 2020

I was able to reproduce this and cause is known.

@knownasilya
Copy link
Contributor

v6.0.2 published

@st-h
Copy link
Author

st-h commented Oct 25, 2020

thanks guys. looks good so far 👍

@st-h
Copy link
Author

st-h commented Oct 26, 2020

Unfortunately, I came across this again today with v6.0.2. It still occurs when a fastboot app is run in none fastboot mode. This is important for scenarios where the fastboot server might temporarily not be available. I haven't checked in prod mode, but in dev mode this addon breaks the whole application. You can easily test this by adding the query param ?fastboot=false with a fastboot enabled app.

Do you want to reopen this issue, or shall a create a new one?

@raido
Copy link
Contributor

raido commented Oct 26, 2020

Ah, the assertion hits because no title elements are present if fastboot is turned off via query parameter.

@st-h
Copy link
Author

st-h commented Oct 26, 2020

@raido yes, I suspect non fastboot mode expects the title element to be present within the template, but that element is removed when the plugin is installed in a fastboot enabled app.

@raido
Copy link
Contributor

raido commented Oct 26, 2020

PR #198 loosens the dev time assertion a bit for ?fastboot=false use case.

@knownasilya
Copy link
Contributor

Merged, but probably won't be able to release till next week. Please ping @MelSumner if this needs releasing asap.

@knownasilya
Copy link
Contributor

Released as v6.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants