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.

logs

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


activerecord-7.0.4.3/lib/active_record/relation/batches.rb:292:in `act_on_ignored_order'  
activerecord-7.0.4.3/lib/active_record/relation/batches.rb:215:in `in_batches'  
activerecord-7.0.4.3/lib/active_record/relation/batches.rb:137:in `find_in_batches'  
activerecord-7.0.4.3/lib/active_record/relation/batches.rb:70:in `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-7.0.4.3/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction' 
activesupport-7.0.4.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt' 
activesupport-7.0.4.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize' 
activesupport-7.0.4.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt' 
activesupport-7.0.4.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize' 
activerecord-7.0.4.3/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction' 
activerecord-7.0.4.3/lib/active_record/connection_adapters/abstract/database_statements.rb:316:in `transaction' 
activerecord-7.0.4.3/lib/active_record/transactions.rb:209:in `transaction'  
/var/www/discourse/plugins/discourse-encrypt/app/jobs/scheduled/encrypted_post_timer_evaluator.rb:9:in `block in execute' 
activerecord-7.0.4.3/lib/active_record/relation/batches.rb:71:in `each'  
activerecord-7.0.4.3/lib/active_record/relation/batches.rb:71:in `block in find_each'  
activerecord-7.0.4.3/lib/active_record/relation/batches.rb:138:in `block in find_in_batches'  
activerecord-7.0.4.3/lib/active_record/relation/batches.rb:245:in `block in in_batches'  
activerecord-7.0.4.3/lib/active_record/relation/batches.rb:229:in `loop'  
activerecord-7.0.4.3/lib/active_record/relation/batches.rb:229:in `in_batches'  
activerecord-7.0.4.3/lib/active_record/relation/batches.rb:137:in `find_in_batches'  
activerecord-7.0.4.3/lib/active_record/relation/batches.rb:70:in `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:

2 Likes

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:

4 Likes

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

4 Likes

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.

4 Likes

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