marmelab / ng-admin

Add an AngularJS admin GUI to any RESTful API
http://ng-admin-book.marmelab.com/
MIT License
3.95k stars 725 forks source link

Undefined is not an object (evaluating 'this.$stateParams.search=r') #1330

Open FelixMalfait opened 7 years ago

FelixMalfait commented 7 years ago

Description

I tracked that on some rare occasions my users were getting the following error: undefined is not an object (evaluating 'this.$stateParams.search=r') https://github.com/marmelab/ng-admin/blob/master/src/javascripts/ng-admin/Crud/list/ListLayoutController.js#L122

this.$stateParams seems to be undefined for no apparent reason.

The error was detected on Chrome andSafari.

Steps to Reproduce

Unfortunately, I haven't been able to reproduce this issue. I've been looking for sometimes but this error happens quite rarely (1/2.000 page views). I'd love to do the fix myself but I'm looking for new ideas because I'm running out of it. I have a feeling that this could be related to custom pages (altough the error is in the ListLayoutController; maybe when switching from a custom page to a list?).

Thanks for your help!

Kmaschta commented 7 years ago

Tough one.

Are you able to write a unit/E2E test or a script with a lot of fixtures to try to reproduce this error?