Repository: ghostfolio/ghostfolio

Issue #3349: [BUG] Unable to delete "Bitcoin" Asset Profile from Market Data - "Oops! Something went wrong. Please try again later."
Created: 2024-05-01T05:58:32Z
Bug Description
As part of trying to figure out why my Bitcoin asset profile stopped retrieving historical data I have deleted all activities associated with the Bitcoin asset profile and then tried to delete the asset profile. Doing so results in an error "Oops! Something went wrong. Please try again later."
Checking the XHR in the browser console shows the following response
{ "statusCode": 500, "message": "Internal server error" }
The asset profile is not deleted
To Reproduce
I am unable to prove reproduction steps given I am unable to delete the asset profile and re-add it in order to test whether this is a persistent issue.
It should be noted that I can delete other asset profiles (provided they have no activities related to them) it is just the "Bitcoin" asset profile I cannot delete.
Expected behavior

It is possible to delete the Bitcoin asset profile.
Screenshots


Logs

Environment


Ghostfolio Version 2.77.1
Self-hosted
Experimental Features enabled (Note I have tried with this both enabled and disabled and the issue is present in both)
Safari
MacOS

Additional context

Duplicate issue #3440: [BUG] Unable to delete symbol in Market Data
Created: 2024-05-30T12:08:28Z
Important Notice
The issue tracker is ONLY used for reporting bugs. New features should be discussed in our Slack community or in Discussions.
Incomplete or non-reproducible issues may be closed, but we are here to help! If you encounter difficulties reproducing the bug or need assistance, please reach out to our community channels mentioned above.
Thank you for your understanding and cooperation!
Bug Description
When trying to delete a symbol, I get a HTTP 500
To Reproduce

Go to market data
Delete a symbol

Expected behavior
Symbol is deleted
Logs
Invalid prisma.symbolProfile.delete() invocation:
Foreign key constraint failed on the field: SymbolProfileOverrides_symbolProfileId_fkey (index)
PrismaClientKnownRequestError:
Invalid prisma.symbolProfile.delete() invocation:
Foreign key constraint failed on the field: SymbolProfileOverrides_symbolProfileId_fkey (index)
at In.handleRequestError (/ghostfolio/apps/api/node_modules/@prisma/client/runtime/library.js:122:6854)
at In.handleAndLogRequestError (/ghostfolio/apps/api/node_modules/@prisma/client/runtime/library.js:122:6188)
at In.request (/ghostfolio/apps/api/node_modules/@prisma/client/runtime/library.js:122:5896)
at async l (/ghostfolio/apps/api/node_modules/@prisma/client/runtime/library.js:127:11167)
at async AdminService.deleteProfileData (/ghostfolio/apps/api/main.js:1:498924)
at async /ghostfolio/apps/api/node_modules/@nestjs/core/router/router-execution-context.js:46:28
at async /ghostfolio/apps/api/node_modules/@nestjs/core/router/router-proxy.js:9:17
at async /ghostfolio/apps/api/node_modules/@nestjs/core/router/router-explorer.js:176:17
Environment

Ghostfolio Version 2.82.0
Self-hosted
Experimental Features disabled
Edge latest
Windows

Closing comment (2024-05-30T12:12:14Z): This seems to be a duplicate of #3349 and #3435.