-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Error: Cannot re-register: service:store
, as it has already been resolved.
#80
Comments
My guess is that it is related to emberjs/data#3690 |
Thanks! I've got a hacky work-around to rebuild the registry before calling destroy in the
That gives me the same results as the ember-data patch you linked to but I don't have to maintain a patched version of ember-data. But, now I'm getting this error:
This looks like I'm probably not requiring in a necessary package. Any idea what package |
I'm seeing this exact same thing on a project, fwiw. Also at a loss. |
@paulelliott - See emberjs/data#3690 for an upstream fix, and emberjs/ember.js#10310 (comment) for a work around you can use in your apps for now. App.initializer({
name: 'clear-service-store',
before: ['ember-data'],
initialize(registry) {
registry.unregister('service:store');
}
}); |
@rwjblue That is a cleaner way to handle the title error of this issue, for sure. 👍 I am still seeing |
@paulelliott - Are you saying that you are getting this error without the patch that @spinlock99 mentioned (clobbering |
I tried @spinlock99's suggestion before you posted the initializer. It worked but left me with the error about When you posted the initializer I took that hack out and used that, which yielded the same result. The initializer approach is a much better workaround and that is what I am going with. The |
@rwjblue thanks for posting that initializer. Much nicer solution until ember-data is patched. I am still getting the @paulelliott What does your setup look like? Here's the debug from my app (with ember-cli-mocha @ 0.7.0)
|
I'm using ember-cli-mocha 0.9.2 with ember-mocha 0.8.0 and:
|
Can someone make a repro to demo this? I just made http://emberjs.jsbin.com/genolo/edit?html,js that you can use as a base. |
This is very odd. I can't recreate the error using @rwjblue 's jsbin. So, I tried creating a fresh app with ember-cli to see if I could recreate the error there: nope. Then, I compared my This is where is gets interesting: I did not get the |
@NullVoxPopuli can you post an example using the jsbin or a fresh github repo? I suspect we haven't closed this issue yet because no one has been able to show an example yet. Thanks! |
Here is a repo: https://github.com/NullVoxPopuli/aeonvera-ui/tree/mocha-test This is the first error that shows up |
here is a travis log, if that helps https://travis-ci.org/NullVoxPopuli/aeonvera-ui/jobs/131395768 |
Ok, I added the registry hack:
but, now I'm also getting the
problem. :-( Does this mean that the test helpers aren't being loaded properly? I think there is something funky with acceptance testing and mocha right now. :-\ Any ideas? |
emberjs/data#3690 seems to have fixed the original issue. if there are still issues in this area please open a new issue. |
First: sorry if this is the wrong place for this question. Just point me to the right resources if this isn't an issue with ember-cli-mocha
I'm getting the error:
Error: Cannot re-register:
service:store, as it has already been resolved.
when I try to run this acceptance test:The error is happening in the "after all" hook so I assume that is when the
@App
is being destroyed. I'm at a loss here. I assume the error is EmberData trying to reregister itself but I don't know why I'm getting that when I try to destroy the app.Any help would be greatly appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: