I have started getting a strange issue in a Rails app, that is proving very difficult to debug.
EOFError
end of file reached
is being raised on some Devise routes. So far I'm getting this on session#destroy
and registration#update
(I have not been able to try others).
The issue is not occurring in tests, only in development environment.
After stepping through the controllers, the error appears to be raised on the following lines.
registration#update
resource_updated = update_resource(resource, account_update_params)
session#destroy
signed_out = (Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name))
I realise that identifing the cause will likely need much more code. But after several hours trying to debug this I'm at a loss to next steps. I'd be grateful if anyone can:
- Suggest how to obtain more useful information when
EOFError
is raised. Currently all I'm getting isCompleted 500 Internal Server Error in 2627ms (ActiveRecord: 10.1ms) EOFError - end of file reached:
without much to identify where this is being raised. - Suggest a logical approach to debug this. From my attempts, the error appears to be coming from the Devise internals, which I don't think is correct.