Pemecahan masalah error deployment kebijakan DecodeJWT
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Anda sedang melihat dokumentasi Apigee dan Apigee hybrid.
Lihat dokumentasi
Apigee Edge.
InvalidEmptyElement
Pesan error
Deployment proxy API melalui UI atau API Apigee gagal
dengan pesan error ini:
Error Saving Revision
Invalid empty element : policy(policy_name) element(Source)
Contoh pesan error
Error Saving Revision
Invalid empty element : policy(Decode_JWT) element(Source).
Contoh screenshot
Di UI Apigee, Anda akan melihat kotak dialog dengan error:
Penyebab
Error ini terjadi jika variabel alur yang berisi JWT yang akan didekode
tidak ditentukan dalam elemen <Source> kebijakan DecodeJWT.
Misalnya, error akan terjadi jika elemen <Source> tidak berisi
nilai, seperti yang ditunjukkan di bawah ini:
<Source></Source>
Diagnosis
Identifikasi nama kebijakan DecodeJWT dan nama elemen yang kosong dari pesan error. Misalnya, dalam pesan error berikut, nama kebijakan DecodeJWT adalah Decode_JWT dan nama elemennya adalah Source.
Invalid empty element : policy(Decode_JWT) element(Source).
Periksa kebijakan DecodeJWT dan verifikasi apakah elemen yang diidentifikasi pada Langkah 1 kosong. Jika elemen kosong, berarti itulah penyebab error.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[[["\u003cp\u003eThis documentation addresses an error encountered during API proxy deployment in Apigee or Apigee hybrid.\u003c/p\u003e\n"],["\u003cp\u003eThe error "Invalid empty element" occurs when the \u003ccode\u003e<Source>\u003c/code\u003e element in a DecodeJWT policy is empty.\u003c/p\u003e\n"],["\u003cp\u003eThe error message will specify the policy name and the empty element, such as \u003ccode\u003epolicy(Decode_JWT) element(Source)\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe issue is resolved by populating the \u003ccode\u003e<Source>\u003c/code\u003e element with a flow variable containing a valid JWT.\u003c/p\u003e\n"],["\u003cp\u003eTo diagnose, identify the policy and empty element from the error and then verify that element is empty in the policy definition.\u003c/p\u003e\n"]]],[],null,["# DecodeJWT policy deployment error troubleshooting\n\n*You're viewing **Apigee** and **Apigee hybrid** documentation.\nView [Apigee Edge](https://docs.apigee.com/api-platform/troubleshoot/policies/deployment/decode-JWT-deployment-errors) documentation.*\n| Was this troubleshooting playbook helpful? Please let us know by clicking [Send Feedback]().\n\nInvalidEmptyElement\n-------------------\n\n### Error message\n\nDeployment of the API proxy through either the Apigee UI or API fails\nwith this error message: \n\n```scdoc\nError Saving Revision\nInvalid empty element : policy(policy_name) element(Source)\n```\n\n### Example error message\n\n Error Saving Revision\n Invalid empty element : policy(Decode_JWT) element(Source).\n\n### Example screenshot\n\nIn the Apigee UI, you will see a dialog box with an error:\n\n### Cause\n\nThis error occurs if the flow variable containing JWT that is to be decoded\nis not specified in the `\u003cSource\u003e` element of the DecodeJWT policy.\n\nFor example, the error will occur if the `\u003cSource\u003e` element does not contain a\nvalue, as shown below: \n\n \u003cSource\u003e\u003c/Source\u003e\n\n### Diagnosis\n\n1. Identify the name of the DecodeJWT policy and name of the element that is empty from the error message. For example, in the following error message, the name of DecodeJWT policy is `Decode_JWT` and the element name is `Source`.\n\n ```scdoc\n Invalid empty element : policy(Decode_JWT) element(Source).\n ```\n2. Examine the DecodeJWT policy and verify if the element identified in Step 1 is empty. If the element is empty, then that's the cause of the error.\n\n Here's a sample DecodeJWT policy: \n\n \u003cDecodeJWT name=\"Decode_JWT\"\u003e\n \u003cDisplayName\u003eJWT Decode HS256\u003c/DisplayName\u003e\n \u003cSource\u003e\u003c/Source\u003e\n \u003cIgnoreUnresolvedVariables\u003efalse\u003c/IgnoreUnresolvedVariables\u003e\n \u003c/DecodeJWT\u003e\n\n Because the `\u003cSource\u003e` element is empty, you get the error: \n\n Invalid empty element : policy(Decode_JWT) element(Source).\n\n### Resolution\n\nEnsure that the `\u003cSource\u003e` element specifies a valid JWT in a flow variable.\n\nTo fix the issue with the sample DecodeJWT policy, you can specify the flow variable containing a valid JWT in the `\u003cSource\u003e` element. \n\n \u003cDecodeJWT name=\"Decode_JWT\"\u003e\n \u003cDisplayName\u003eJWT Decode HS256\u003c/DisplayName\u003e\n \u003cSource\u003evar.jwt\u003c/Source\u003e\n \u003cIgnoreUnresolvedVariables\u003efalse\u003c/IgnoreUnresolvedVariables\u003e\n \u003c/DecodeJWT\u003e"]]