vyouzhis commented on issue #30181:
URL: https://github.com/apache/superset/issues/30181#issuecomment-2335120542

   > Hey there, @vyouzhis! I'm here to assist with any bugs, questions, or 
contributions you might have regarding Superset. Let's tackle this together!
   > 
   > I found a similar open issue and some closed issues that might help you 
resolve the "Invalid decryption key" error during the `superset init` process.
   > 
   > ### Similar Issues and Solutions
   > 1. **Open Issue**:
   >    
   >    * **[ValueError: Invalid decryption key - multiple superset instance 
and single database](https://github.com/apache/superset/issues/29829)**:
   >      
   >      * **Solution**: Ensure that all Superset instances use the same 
`SECRET_KEY` in their `superset_config.py` file:
   >        ```python
   >        SECRET_KEY = 'YOUR_OWN_RANDOM_GENERATED_SECRET_KEY'
   >        ```
   >      * This key is used for securely signing session cookies and 
encrypting sensitive information stored in Superset's application metadata 
database [[1]](https://github.com/apache/superset/issues/29829).
   > 2. **Closed Issues**:
   >    
   >    * **[After PC restart Superset won't fetch databases: Invalid 
decryption key](https://github.com/apache/superset/issues/25261)**:
   >      
   >      * **Solution**: Use `superset re-encrypt-secrets` after changing 
every `utf-8` string found in the file 
`/home/YOUR_USER/superset-env/lib/pythonX.X.X/site-packages/sqlalchemy_utils/types/encrypted/encrypted_type.py`
 to `latin-1` [[2]](https://github.com/apache/superset/issues/25261).
   >    * **[sqllab - Invalid decryption 
key](https://github.com/apache/superset/issues/24620)**:
   >      
   >      * **Solution**: Upgrade Superset using `pip install apache-superset 
--upgrade` instead of `pip install apache-superset` 
[[3]](https://github.com/apache/superset/issues/24620).
   > 
   > ### Additional Steps
   > Ensure that your `SECRET_KEY` is correctly set in your 
`superset_config.py` file. This key is crucial for encryption and decryption 
processes:
   > 
   > ```python
   > SECRET_KEY = 'your_secret_key_here'
   > ```
   > 
   > Replace `'your_secret_key_here'` with your actual secret key. This should 
help resolve the "Invalid decryption key" error during the `superset init` 
process 
[[4]](https://github.com/apache/superset/blob/master/superset/utils/encrypt.py).
   > 
   > By following these steps and ensuring the `SECRET_KEY` is consistent 
across all instances, you should be able to resolve the issue.
   > 
   > _To continue talking to [Dosu](https://dosu.dev), mention @dosu._
   
   ~/superset-4.0.2$ find . -type f -name "superset_config*"
   ./docker/pythonpath_dev/__pycache__/superset_config.cpython-310.pyc
   ./docker/pythonpath_dev/superset_config.py
   ./docker/pythonpath_dev/superset_config_local.example
   
   
   
   here file : superset_config.py ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to