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

MiniProfiler storage failure: can't modify frozen #611

Open
wage-coolie opened this issue Mar 6, 2024 · 3 comments
Open

MiniProfiler storage failure: can't modify frozen #611

wage-coolie opened this issue Mar 6, 2024 · 3 comments

Comments

@wage-coolie
Copy link

MiniProfiler storage failure: can't modify frozen String: "\n\n \n <title>Rack::MiniProfiler Requests</title>\n \n \n \n\n"

Rails 7

Rack::MiniProfiler.config.auto_inject = true
Rack::MiniProfiler.config.show_total_sql_count = true
Rack::MiniProfiler.config.enable_advanced_debugging_tools = true
Rack::MiniProfiler.config.enable_hotwire_turbo_drive_support = true
Rack::MiniProfiler.config.profile_parameter = true
These are my settings,
Upon hitting the /requests urrl i am getting this error in console.Also turbo streams seems to be not loading new data in speed badge, as a matter of fact my speed badge is dissappearing after every turbo stream request. If anyone have solution to these issues. Pls respond

@krzkrzkrz
Copy link

This is what I am seeing as well. @wage-coolie did you manage to figure this out?

@wage-coolie
Copy link
Author

This is what I am seeing as well. @wage-coolie did you manage to figure this out?

Nope, I am not able to work it out at all with rails rails7, it sesms turbo requests reload doesn not load a new mini-profiler log, i am now forced to use rails panel extensions.

@teoulas
Copy link
Contributor

teoulas commented Jul 31, 2024

It seems this is caused by the magic comment here: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/lib/mini_profiler/views.rb#L1

The blank_page_html method returns this frozen string, which I'm guessing miniprofiler tries to modify, to inject the script which shows the timings widget.

I've tried removing the frozen string literal magic comment from the gem code locally and it works.

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

3 participants