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

FrozenError: can't modify frozen Array when adding devServer middleware #1700

Closed
mikker opened this issue Sep 14, 2018 · 7 comments
Closed

Comments

@mikker
Copy link
Contributor

mikker commented Sep 14, 2018

I have no idea why but somehow, in one of my projects, app.middleware.middlewares is frozen when Webpacker tries to insert its devServer middleware.

I've "fixed" it by duping the array (see master...mikker:frozen-middlewares).

I've tried disable some gems and the like but haven't been able to find the culprit yet.


Ruby: 2.5.1
Rails: 5.2.1
Webpacker: 3.5.5 and/or master

@gauravtiwari
Copy link
Member

Hey @mikker

Are you eager loading code in development?

  # Do not eager load code on boot.
  config.eager_load = false

@mikker
Copy link
Contributor Author

mikker commented Sep 14, 2018

Nope, config.eager_load = false

@rossta
Copy link
Member

rossta commented Sep 14, 2018

@mikker Any chance you're using ActiveAdmin ~> 1.4.1? I've seen similar issues reported elsewhere with that being another common link. That release does some introspection in the app middleware that could be a root cause, though I wasn't able to reproduce the issue myself.

@vincentwoo
Copy link

I'm also seeing this with RailsAdmin 1.4.1 but not 1.4.0. It seems likely this commit (railsadminteam/rails_admin@59478af) is responsible, but I can't for the life of me figure out why.

@mshibuya
Copy link

Sorry to bother you, RailsAdmin 1.4.2 is out with the fix for this:
railsadminteam/rails_admin@94928d1

@vincentwoo
Copy link

Thanks, appreciate the update!

@marcelino056
Copy link

Still having the same issue:

Completed 500 Internal Server Error in 3765ms (ActiveRecord: 278.3ms)
  
FrozenError (can't modify frozen fatal):

rails_admin (1.4.2)
ruby 2.5.5
rails 5.2.2

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

No branches or pull requests

6 participants