تصحيح أخطاء التسجيل
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يُنتج Tink أحيانًا رسائل خطأ مثل
No wrapper registered for type
No manager for type T has been registered
Unable to get primitive interface P for key of type T
وتساعد هذه الصفحة في تصحيح مثل هذه المشاكل.
الحالة 1: تظهر نجوم رسالة الخطأ مع الرسالة "لم يتم العثور على برنامج تضمين" أو ما شابه.
أنت تستدعي GetPrimitive()
للحصول على نوع أولي لم يتم تسجيله، والذي يتم إصلاحه بشكل عام من خلال استدعاء TinkConfig.register()
في وقت سابق من البرنامج الثنائي. التسجيل مرة واحدة يكفي ويمكن إجراؤه عند بدء التشغيل.
تحتاج بعض الأساسيات إلى تسجيل أكثر تخصصًا.
- السمة "
KeysetDeriver
" تتطلّب "KeyDerivationConfig.register()
"
- السمة "
JwtMac
" تتطلّب "JwtMacConfig.register()
"
- يتطلّب كل من
JwtPublicKeySign
وJwtPublicKeyVerify
إدخال
JwtSignatureConfig.register()
.
الحالة 2: يدرج الخطأ نوع مفتاح ونوع أوّلي.
على سبيل المثال، قد يشير الخطأ إلى Unable to get primitive interface P for key
of type T
لقيمة محددة لـ P وT.
في هذه الحالة، لا يستطيع Tink إنشاء الوحدة الأساسية المحددة التي طلبتها
لمجموعة المفاتيح التي لديك. عادةً ما يحدث هذا لأن لديك مجموعة
مفاتيح للنوع الخطأ. على سبيل المثال، قد تطلب جهاز Mac، لكن مجموعة المفاتيح مخصصة لـ Aead.
إحدى الحالات الشائعة هي محاولة الشخص الحصول على إصدار أولي للمفتاح العام من مجموعة مفاتيح تحتوي على مفاتيح خاصة. لمعرفة ما إذا كانت هذه هي المشكلة، يمكنك الاتصال بـ
GetPrimitive()
على نتيجة GetPublicKeysetHandle()
بدلاً من ذلك.
إذا لم ينجح هذا الإجراء، يمكنك العثور على قائمة حديثة بأنواع الملفات الرئيسية هنا ضِمن اختباراتنا المتعدّدة اللغات. يجب عليك التحقق مما إذا كان الحرف P الأساسي مدرج
مع النوع الرئيسي T.
إذا تم إدراج المجموعة الأساسية مع النوع الرئيسي المقابل، فقد يكون
أن تنفيذ Tink بلغتك لا يدعم النوع الرئيسي T. يمكنك الاطّلاع على قائمة الأنواع الرئيسية لمعرفة ما إذا كان تطبيق Tink متوافقًا مع نوع المفتاح بلغتك.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eTink error messages like "No wrapper registered" often indicate missing primitive registration, fixable with \u003ccode\u003eTinkConfig.register()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eErrors mentioning key type and primitive usually mean an incompatible keyset is used, like requesting a Mac with an Aead keyset.\u003c/p\u003e\n"],["\u003cp\u003ePublic key primitives require keysets obtained via \u003ccode\u003eGetPublicKeysetHandle()\u003c/code\u003e to avoid key type mismatches.\u003c/p\u003e\n"],["\u003cp\u003eVerify key type and primitive compatibility by checking the cross-language test resources and supported key types documentation for your language.\u003c/p\u003e\n"]]],["Tink error messages like \"No wrapper registered\" or \"Unable to get primitive\" indicate issues with key and primitive type registration or compatibility. For \"No wrapper\" errors, register the type using `TinkConfig.register()` or specialized methods like `KeyDerivationConfig.register()`. For primitive-key type mismatches, verify that the keyset's type matches the requested primitive, and use `GetPublicKeysetHandle()` for public keys. Check supported key type lists if registration or type-checking does not fix the issue.\n"],null,["# Debug Registration Errors\n\nTink sometimes produces error messages such as\n\n- `No wrapper registered for type`\n- `No manager for type T has been registered`\n- `Unable to get primitive interface P for key of type T`\n\nThis page helps to debug such issues.\n\nCase 1: The error stars with \"No wrapper found\" or similar.\n-----------------------------------------------------------\n\nYou are calling `GetPrimitive()` to get a primitive type that has not been\nregistered, which is generally fixed by calling `TinkConfig.register()`\nsomewhere earlier in the binary. Registering once suffices and can be done at\nstartup.\n\nSome primitives need more specialized registration.\n\n- `KeysetDeriver` requires `KeyDerivationConfig.register()`\n- `JwtMac` requires `JwtMacConfig.register()`\n- `JwtPublicKeySign` and `JwtPublicKeyVerify` require `JwtSignatureConfig.register()`\n\nCase 2: The error lists a key type and a primitive.\n---------------------------------------------------\n\nFor example, the error might say `Unable to get primitive interface P for key\nof type T` for some specific value of P and T.\n\nIn this case, Tink is unable to create the specific primitive you asked it\nfor the keyset you have. Typically, this happens because you have a keyset\nfor the wrong type. For example, you might be asking for a Mac, but the keyset\nis for Aead.\n\nOne common case is that one tries to get a public key primitive from a keyset\ncontaining private keys. To see if this is the problem, consider calling\n`GetPrimitive()` on the result of `GetPublicKeysetHandle()` instead.\n\nIf this does not help, an up to date list of the key types can be found\n[here](https://github.com/tink-crypto/tink-cross-lang-tests/blob/main/cross_language/cross_language/tink_config/_key_types.py),\nin our [cross language tests](https://github.com/tink-crypto/tink-cross-lang-tests/blob/main/cross_language/cross_language). You should check if the primitive P is listed\ntogether with the key type T.\n\nIf the primitive is listed with the corresponding key type, it may be that\nthe Tink implementation of your language does not support key type T. Check the\n[list of key types](/tink/supported-key-types) to see if Tink supports your key\ntype in your language."]]