Starts in:
2 DAYS
4 HRS
32 MIN
27 SEC
Starts in:
2 D
4 H
32 M
27 S
Open Closed

Email Parameter pasword set to NULL #4596


User avatar
1
berly created

We have this =>

  • ABP Framework version: v7.0.0
  • UI type: Angular / Blazor
  • DB provider: EF Core /
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Steps to reproduce the issue:"

The password is not the same on the two back, one time is set and one time is null

Where is save the setting set from ?


15 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Sorry, could you explain in it detail? thanks.

  • User Avatar
    0
    pierremih created

    Hi, I'm @berly's coworker.

    Our application's architecture was explained in a previous ticket https://support.abp.io/QA/Questions/4494/Two-Application-layers-the-antiforgery-token-could-not-be-decrypted

    We are having issues configuring the Mailing service of ABP.

    We found multiple appsettings.json files in which we can configure the Abp.Mailing.Smtp.Password.

    However, after setting it this way, it seems the password is getting wiped after a given amount of time.

    Note that we at some point (I do not know the details), have used the /api/setting-management/emailing API shown above.

    Thank you,

  • User Avatar
    0
    pierremih created

    Is our issue being investigated ? Thanks

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Sorry, I'm late, could you provide the full steps to reproduce the problem? I will check it.

  • User Avatar
    0
    pierremih created

    Sorry for the delay, here are the full steps :

    • Have our project running. For that, we would give you access to our github repo which also has the required docker environment required to run it.
    • using the "Admin" swagger, call "setting-management/emailing" with POST to define email settings.
    • using the "Admin" swagger, call the API "emailing/send-test-email" to try to send an email. It should be working properly.
    • using the other swagger, call "setting-management/emailing" with GET to check if the modifications applied there too. It shouldn't.
    • using the other swagger, then call "setting-management/emailing" with POST to define email settings there too.
    • using the other swagger, call the API "emailing/send-test-email" to try to send an email. It should be working properly.
    • using the "Admin" swagger, call the API "emailing/send-test-email" to try to send an email to make sure it's still working. It should be
    • Wait between 30 minutes to 1 hour
    • using the both swaggers, call both "setting-management/emailing" with GET. One of the passwords got wiped.

    If you do not want to reproduce the issue locally, we have a test version running and published. We can grant you access to that. Emails are only sent when using a production environment and a properly set SMTP server, which isn't included in that project.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    we would give you access to our github repo which also has the required docker environment required to run it.

    Hi,

    I didn't see any email for this.

  • User Avatar
    0
    pierremih created

    We haven't granted you access yet. Can you confirm this is the github account we will give access to ? https://github.com/realLiangshiwei

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Yes, it is

  • User Avatar
    0
    pierremih created

    I granted you access to the repo

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    They have actually two distributed projects and used the same database, it should be ok.

    But they use different Redis cache keys, which will cause the two projects to be cached inconsistently. (settings also use cache)

  • User Avatar
    0
    pierremih created

    I understand that this causes issues indeed. We will fix that point. It should resolve many issues we are having.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    The password is empty because you are using the different DefaultPassPhrase for two projects.

    They are should be the same, Otherwise, the password cannot be decrypted

  • User Avatar
    0
    pierremih created

    Thank you, it seems to have solved the issue.

  • User Avatar
    0
    pierremih created

    We have a related issue. The emailing password is not set on startup or database seeding. We are not using ABP's Settings system but Microsoft's Configuration System and the appsettings.json files, as suggested in ABP's documentation.

    • https://docs.abp.io/en/abp/latest/Emailing#email-settings
    • https://docs.abp.io/en/abp/latest/Settings
    • https://docs.abp.io/en/abp/latest/Configuration

    Is there any way to solve this ?

    EDIT : The password does not reset on restart. We would like to set it initially using the Configuration system.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    The emailing password is not set on startup or database seeding.

    See:https://docs.abp.io/en/abp/latest/Settings#setting-value-providers

    appsettings.json is just used for ConfigurationSettingValueProvider, it will not store in the database.

    You can use the data seeding system to create a DataSeedContributor to save the settings to database:

    https://docs.abp.io/en/abp/latest/Data-Seeding#idataseedcontributor

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06