Cannot Delete or Rotate Encryption Keys

Users cannot disable encryption or rotate keys. The button to disable encryption remains disabled after username is entered. And rotating keys fails with a “Sorry, an error has occurred.”

1 Like

How can I safely remove (and delete all on database) the plugin to start again?

I can’t read any encrypted message and I tried a few users, devices, all correctly enabled. I used PMs encrypted before but now they are not working at all.

If I try to disable the PMs I just can’t ‘delete all my encrypted messages’ and I see CSS button form not allowed to continue :no_entry_sign:

The issue seems to be related to trying to removing all devices and enable them from scratch but I’m not sure about it.

Please, sorry if it’s related to my actual configuration, I can follow your directions and test if that’s the case. I hope to help someone in similar situation.


Scoped order is ignored, it's forced to be batch order.

activerecord- `act_on_ignored_order'  
activerecord- `in_batches'  
activerecord- `find_in_batches'  
activerecord- `find_each'  
/var/www/discourse/lib/post_destroyer.rb:170:in `perform_delete'  
/var/www/discourse/lib/post_destroyer.rb:77:in `destroy'  
/var/www/discourse/plugins/discourse-encrypt/app/jobs/scheduled/encrypted_post_timer_evaluator.rb:25:in `block (3 levels) in execute' 
/var/www/discourse/plugins/discourse-encrypt/app/jobs/scheduled/encrypted_post_timer_evaluator.rb:23:in `each' 
/var/www/discourse/plugins/discourse-encrypt/app/jobs/scheduled/encrypted_post_timer_evaluator.rb:23:in `block (2 levels) in execute' 
activerecord- `block in within_new_transaction' 
activesupport- `handle_interrupt' 
activesupport- `block in synchronize' 
activesupport- `handle_interrupt' 
activesupport- `synchronize' 
activerecord- `within_new_transaction' 
activerecord- `transaction' 
activerecord- `transaction'  
/var/www/discourse/plugins/discourse-encrypt/app/jobs/scheduled/encrypted_post_timer_evaluator.rb:9:in `block in execute' 
activerecord- `each'  
activerecord- `block in find_each'  
activerecord- `block in find_in_batches'  
activerecord- `block in in_batches'  
activerecord- `loop'  
activerecord- `in_batches'  
activerecord- `find_in_batches'  
activerecord- `find_each'  
/var/www/discourse/plugins/discourse-encrypt/app/jobs/scheduled/encrypted_post_timer_evaluator.rb:8:in `execute' 
/var/www/discourse/app/jobs/base.rb:292:in `block (2 levels) in perform'  
rails_multisite-5.0.0/lib/rails_multisite/connection_management.rb:82:in `with_connection'
/var/www/discourse/app/jobs/base.rb:279:in `block in perform'  
/var/www/discourse/app/jobs/base.rb:275:in `each'  
/var/www/discourse/app/jobs/base.rb:275:in `perform'  
/var/www/discourse/app/jobs/base.rb:346:in `perform'  
mini_scheduler-0.16.0/lib/mini_scheduler/manager.rb:122:in `process_queue'  
mini_scheduler-0.16.0/lib/mini_scheduler/manager.rb:70:in `worker_loop'  
mini_scheduler-0.16.0/lib/mini_scheduler/manager.rb:59:in `block (2 levels) in ensure_worker_threads'

job	Jobs::EncryptedPostTimerEvaluator
1 Like

I have got my test site into a similar state and I’m also looking for answers on this. :slight_smile:


I can replicate this.

Using a test user and activating the Encryption for the first time goes smoothly, but then there’s no way to disable it.

  • Enable Encrypted Messages for a test user from their Preferences/Security
  • Click on the wrench icon and ‘Disable Encrypted Messages’
  • Button to Disable is greyed out and unpressable

If you have encrypted messages and need to ‘type to confirm’ then this also presents an unpressable button:

When enabling, this error appears in the browser console:

[PLUGIN discourse-encrypt] reopenWidget: Could not find widget quick-access-panel in registry widget.js:82
    reopenWidget widget.js:82
    reopenWidget plugin-api.js:654
    initialize decrypt-topics.js:104
    withPluginApi plugin-api.js:2159
    initialize decrypt-topics.js:101
    initialize app.js:173
    runInstanceInitializers Ember
    each dag-map.js:192
    walk dag-map.js:121
    each dag-map.js:66
    topsort dag-map.js:72
    Ember 4
    invoke queue.ts:201
    flush queue.ts:98
    flush deferred-action-queues.ts:75
    _end index.ts:616
    _boundAutorunEnd index.ts:257
    (Async: promise callback)
    n platform.ts:28
    flush Ember
    _scheduleAutorun index.ts:803
    _ensureInstance index.ts:791
    schedule index.ts:384
    Ember 6
    <anonymous> start-app.js:4
    <anonymous> discourse-boot.js:20
    <anonymous> discourse-boot.js:21

I also spotted a missing string for key rotation:


These console warnings will be resolved by this PR - they’re not related to the problem in this topic.


I’m still can’t remove encrypt on my account (and I have last version of Encrypt plus Discourse):

The button keeps disabled and I need to start again because I lost my keys (I’m trying, there is no issue at deleting encrypted messages) and I want to start from zero :slight_smile:

@cvx has been working on some improvements to these modal popups in discourse-encrypt, so things should be working much better now. Please let us know if you’re still running into any issues after updating.


This topic was automatically closed after 18 hours. New replies are no longer allowed.