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

DownloadCountPoller dependency injection error #8321

Closed
kevinansfield opened this issue Apr 12, 2017 · 0 comments · Fixed by TryGhost/Admin#641
Closed

DownloadCountPoller dependency injection error #8321

kevinansfield opened this issue Apr 12, 2017 · 0 comments · Fixed by TryGhost/Admin#641
Assignees
Labels
affects:admin Anything relating to Ghost Admin bug [triage] something behaving unexpectedly

Comments

@kevinansfield
Copy link
Member

kevinansfield commented Apr 12, 2017

Issue Summary

If the ajax request in the DownloadCountPoller object fails we get an error because we're injecting dependencies into an object which has no container:

Assertion Failed: Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container.

Reproduction Steps

  1. Start a Ghost blog on a non-local domain (eg. I have my local blogs running on http://ghost.blog via /etc/hosts)
  2. Visit http://ghost.blog/ghost/setup/one
  3. Note the above mentioned error in the web inspector console log

Note: these repro steps may not work, they currently work because https://count.ghost.org is missing CORS headers

Proposed Fix

Create a {{gh-download-count}} component that uses ember-concurrency to poll - that will also cut down on required code because all of the setup/teardown is handled for us.

Currently we also show an error alert if the download count endpoint isn't reachable (or we would if it wasn't for this bug), I don't think that's really necessary, if the endpoint isn't reachable we shouldn't output anything or throw errors.

Technical details:

@kevinansfield kevinansfield added affects:admin Anything relating to Ghost Admin bug [triage] something behaving unexpectedly labels Apr 12, 2017
@kevinansfield kevinansfield self-assigned this Apr 12, 2017
kevinansfield added a commit to kevinansfield/Ghost-Admin that referenced this issue Apr 12, 2017
closes TryGhost/Ghost#8321
- adds `gh-download-count` component that uses ember-concurrency to poll the count endpoint
- removes the no-longer-needed `setup/one` route as ember-concurrency now handles the setInterval bookkeeping for us
kevinansfield added a commit to kevinansfield/Ghost-Admin that referenced this issue Apr 12, 2017
closes TryGhost/Ghost#8321
- adds `gh-download-count` component that uses ember-concurrency to poll the count endpoint
- removes the no-longer-needed `setup/one` route as ember-concurrency now handles the setInterval bookkeeping for us
kevinansfield added a commit to kevinansfield/Ghost-Admin that referenced this issue Apr 12, 2017
closes TryGhost/Ghost#8321
- adds `gh-download-count` component that uses ember-concurrency to poll the count endpoint
- removes the no-longer-needed `setup/one` route as ember-concurrency now handles the setInterval bookkeeping for us
kevinansfield added a commit to kevinansfield/Ghost-Admin that referenced this issue Apr 12, 2017
closes TryGhost/Ghost#8321
- adds `gh-download-count` component that uses ember-concurrency to poll the count endpoint
- removes the no-longer-needed `setup/one` route as ember-concurrency now handles the setInterval bookkeeping for us
kevinansfield added a commit to kevinansfield/Ghost-Admin that referenced this issue Apr 13, 2017
closes TryGhost/Ghost#8321
- adds `gh-download-count` component that uses ember-concurrency to poll the count endpoint
- removes the no-longer-needed `setup/one` route as ember-concurrency now handles the setInterval bookkeeping for us
@kevinansfield kevinansfield added this to the 1.0.0 Beta Ready milestone Apr 17, 2017
acburdine pushed a commit to TryGhost/Admin that referenced this issue Apr 17, 2017
closes TryGhost/Ghost#8321
- adds `gh-download-count` component that uses ember-concurrency to poll the count endpoint
- removes the no-longer-needed `setup/one` route as ember-concurrency now handles the setInterval bookkeeping for us
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:admin Anything relating to Ghost Admin bug [triage] something behaving unexpectedly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant