Doderich
Doderich2mo ago

Export Endpoint /admin/v1/export throws Internal Server Error

Hello Guys, Im trying to export all data from cloud Zitadel instance. I followed the steps in the documentation https://zitadel.com/docs/guides/migrate/sources/zitadel#source-system I tried it a few days ago and it worked fine, but now with the same parameters the endpoints return this error.
{
"code": 13,
"message": "An internal error occurred (QUERY-AG4gs)",
"details": [
{
"@type": "type.googleapis.com/zitadel.v1.ErrorDetail",
"id": "QUERY-AG4gs",
"message": "An internal error occurred"
}
]
}
{
"code": 13,
"message": "An internal error occurred (QUERY-AG4gs)",
"details": [
{
"@type": "type.googleapis.com/zitadel.v1.ErrorDetail",
"id": "QUERY-AG4gs",
"message": "An internal error occurred"
}
]
}
Can you please help me?
ZITADEL Docs
This guide explains how to migrate from ZITADEL, this includes
23 Replies
Ask Inkeep
Ask Inkeep2mo ago
Hi @Doderich, I'm an AI assistant for ZITADEL. While a team member reviews this question, I'll see if I can find relevant sources for your question. Answer I wasn't able to find a direct answer, here are some relevant sources: 1. Export Data :
Details the usage of the /admin/v1/export endpoint for exporting instance data from ZITADEL, which matches your use case. 2. Actions V2 - Getting "An internal error occurred" when searching executions :
Describes a scenario where internal errors occur in ZITADEL and discusses potential causes related to backend or database issues. Feel free to tag @Ask Inkeep with additional questions.
Larzous
Larzous2mo ago
I have been looking at this since this and can't figure out if I was doing something wrong, or if its broken suddenly.
Doderich
DoderichOP2mo ago
Ok, could you take a guess when it will be working again?
Larzous
Larzous2mo ago
No idea, Im not sure which version of v4 broke it, and I’ll have to look at the GitHub ticket the AI linked. Maybe @Rajat could help. I hate pinging devs for help, but when you’re stuck you’re stuck.
Rajat
Rajat2mo ago
hey @Larzous @Doderich this could be true BUT I need to check it first. May I know what version of zitadel are you on @Doderich ?. Can you pls share the exact curl request you sent in /admin/v1/export
Larzous
Larzous2mo ago
It was confirmed as broken and fixed. We are waiting on a release at this point — https://discord.com/channels/927474939156643850/927866013545025566/1421659222504112128
Rajat
Rajat2mo ago
ah wow, let me get it in
Larzous
Larzous2mo ago
Yeah, crunch was awesome to voice chat with me while he confirmed it was broken and then found it was already fixed.
Rajat
Rajat2mo ago
oh wow I have raised it internally tho, so it should be deployed soon
Doderich
DoderichOP2mo ago
Ok that sounds good 👍 Im looking forward to it Hey guys, do you have a idea when the deployment is through? Or do i need to update my cloud instance or something. Im asking because i run in to the same error, when i try to export everything
const response = await fetch(`${domain}/admin/v1/export`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
org_ids: [],
excluded_org_ids: [],
with_passwords: true,
with_otp: true,
timeout: "10m",
response_output: true
})
});
const response = await fetch(`${domain}/admin/v1/export`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
org_ids: [],
excluded_org_ids: [],
with_passwords: true,
with_otp: true,
timeout: "10m",
response_output: true
})
});
Error:
error: HTTP error! status: 500 Internal Server Error {"code":13, "message":"An internal error occurred (QUERY-AG4gs)", "details":[{"@type":"type.googleapis.com/zitadel.v1.ErrorDetail", "id":"QUERY-AG4gs", "message":"An internal error occurred"}]}
error: HTTP error! status: 500 Internal Server Error {"code":13, "message":"An internal error occurred (QUERY-AG4gs)", "details":[{"@type":"type.googleapis.com/zitadel.v1.ErrorDetail", "id":"QUERY-AG4gs", "message":"An internal error occurred"}]}
or im I missing something?
Rajat
Rajat2mo ago
hey @Doderich what does the logs say? How are you running this?
Doderich
DoderichOP2mo ago
This is my whole script. already comfirmed that the token and domain are vaild These are the logs error: script "export:test" exited with code 1 ➜ savvi-export git:(main) ✗ bun export:test $ ENVIRONMENT=test bun run export.ts Exporting data for test environment using .env.test... Request URL: OUR_ZITADEL_DOMAIN/admin/v1/export Export failed: 36 | response_output: true 37 | }) 38 | }); 39 | 40 | if (!response.ok) { 41 | throw new Error(HTTP error! status: ${response.status} ${response.statusText} ${await response.text()}); ^ error: HTTP error! status: 500 Internal Server Error {"code":13, "message":"An internal error occurred (QUERY-AG4gs)", "details":[{"@type":"type.googleapis.com/zitadel.v1.ErrorDetail", "id":"QUERY-AG4gs", "message":"An internal error occurred"}]} at exportData (/Users/maltebudig/Repositories/savvi-export/export.ts:41:13) error: script "export:test" exited with code 1
Larzous
Larzous2mo ago
@Dohvaken -- v4.3.0 says it fixes the issue. Is your issue after updating? I thought you were on cloud?
Doderich
DoderichOP2mo ago
ok that explains why its not working yet the cloud instanzes are still at v4.2.2 is there a way to update them through the dsahboard?
Dohvaken
Dohvaken2mo ago
im on prem
Larzous
Larzous2mo ago
omg I pinged the wrong person -- my bad.
Dohvaken
Dohvaken2mo ago
allgood
Larzous
Larzous2mo ago
@Doderich ^^
Doderich
DoderichOP2mo ago
is there a way to manually update the version on my cloudinstances?
Larzous
Larzous2mo ago
@Rajat ^^
Rajat
Rajat2mo ago
hey @Doderich you can do it when self hosted via changing the version on the dockerfile but no ways to do the sameon clpud
Doderich
DoderichOP2mo ago
Ok but when will be the cloud instance be upgraded? Is it automatic or how does it work?
Rajat
Rajat2mo ago
its automatic, that is the latest version is on v4.4.x I belive

Did you find this page helpful?