Unexpected exception on redis disconnect Redis - NoMethodError(undefined method `destroy' for nil:NilClass)
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 35/100
Direção de pesquisa
Comece em ruby/hyper-operation/transport/connection_adapter/redis.rb, linha 66, e depois leia a cadeia de chamadas de disconnect passando por connection.rb e action_cable.rb. Rastreie por que o caminho de desconexão do Redis chega a destroy em nil; considera-se concluído quando desconectar um channel não gerar mais o NoMethodError relatado.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
I switched recently to the new Redis message functionality and I get the following exception in production.log
I, [2021-02-25T14:13:45.826641 #1289] INFO -- : Finished "/cable/" [WebSocket] for 127.0.0.1 at 2021-02-25 14:13:45 +0200
I, [2021-02-25T14:13:45.830986 #1289] INFO -- : Hyperstack::ActionCableChannel stopped streaming from hyperstack-AnnouncementCategory
I, [2021-02-25T14:13:45.926758 #1266] INFO -- : Finished "/cable/" [WebSocket] for 127.0.0.1 at 2021-02-25 14:13:45 +0200
I, [2021-02-25T14:13:45.933053 #1266] INFO -- : Hyperstack::ActionCableChannel stopped streaming from hyperstack-AnnouncementCategory
I, [2021-02-25T14:13:46.010028 #1266] INFO -- : Hyperstack::ActionCableChannel stopped streaming from hyperstack-Epos::Applicant-423783
I, [2021-02-25T14:13:46.028519 #1266] INFO -- : Hyperstack::ActionCableChannel stopped streaming from hyperstack-Hyperstack::Session-e570d5777171d6ae432a94fef3735d11
E, [2021-02-25T14:13:46.159163 #1289] ERROR -- : There was an exception - NoMethodError(undefined method `destroy' for nil:NilClass)
E, [2021-02-25T14:13:46.162694 #1289] ERROR -- : /home/app/shared/bundle/ruby/2.7.0/bundler/gems/hyperstack-f07d016b626a/ruby/hyper-operation/lib/hyper-operation/transport/connection_adapter/redis.rb:66:in `disconnect'
/home/app/shared/bundle/ruby/2.7.0/bundler/gems/hyperstack-f07d016b626a/ruby/hyper-operation/lib/hyper-operation/transport/connection.rb:68:in `disconnect'
/home/app/shared/bundle/ruby/2.7.0/bundler/gems/hyperstack-f07d016b626a/ruby/hyper-operation/lib/hyper-operation/transport/action_cable.rb:36:in `unsubscribed'
I had the same problem when using the db message store and back then i had to patch hyperstack.rb initializer with the following patch from @catmando :
module Hyperstack
class Connection < ActiveRecord::Base
def self.disconnect(channel)
puts "\ndisconnecting from #{channel}\n" if Rails.env.development?
c = find_by(channel: channel, session: nil)
if c
c.destroy
else
puts "\n********************** WARNING #{channel} has not been opened. Why are we disconnecting ?????????? \n"
end
end
end
end
Why is this happeing?
- Linguagem predominante
- JavaScript
- Estrelas
- 538
- Forks
- 41
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de hyperstack-org/hyperstack
-
expose_as_operations method Abertaenhancement needs doc
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
hyperstack-org/hyperstack#359 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
hyperstack-org/hyperstack#267 ·
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
hyperstack-org/hyperstack#457 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
hyperstack-org/hyperstack#456 ·
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 15/100
hyperstack-org/hyperstack#455 · 2 comentários ·
Todas as issues de hyperstack-org/hyperstack
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
-
Theme loads third-party resources on every page (jsdelivr web font, cdnjs Font Awesome) – GDPR Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
docToolchain/docToolchain#1705 ·
-
Timezone select lists one option per character; duplicate "Failed" reason; shared tracker popover id Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
nightscout/nocturne#1414 ·
-
bug v2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
modelcontextprotocol/inspector#2458 · 1 comentário ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
carbon-design-system/ibm-products#9907 ·