Skip to content

Invalid CSRF Token error in Better Errors console #476

@MrJoy

Description

@MrJoy

I'm running Rails 6.0.3.3. I'm using TurboLinks 5.2.0, StimulusJS 1.1.1, and rails-ujs 6.0.3 via Webpacker 5.2.1, and not directly using Sprockets (except for ActiveAdmin). Browser is Safari 13.1.2 on macOS 10.15.6.

My layout includes output of csrf_meta_tags in the <head> section, and my form includes the authenticity_token hidden field.

When I attempt to trigger BetterErrors in a controller action (update), it comes up enough that I see a stack frame, but I don't see the source view / REPL / request info / locals / instance vars on the right. I only see an error about "Invalid CSRF Token". The /__better_errors endpoint is available and it works fine, however.

The problem does not occur with BetterErrors 2.7.1.

I'm not sure If I've got something subtly wrong, or if there's a bug (possibly related to TurboLinks, or the use of Webpacker).

What information can I provide to help diagnose this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions