Depurar errores de registro
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Tink a veces produce mensajes de error como los siguientes:
No wrapper registered for type
No manager for type T has been registered
Unable to get primitive interface P for key of type T
En esta página, encontrarás ayuda para depurar esos problemas.
Caso 1: El error aparece con una estrella con el mensaje "No wrapper encontrado" o uno similar.
Estás llamando a GetPrimitive()
para obtener un tipo primitivo que no se registró, que generalmente se soluciona llamando a TinkConfig.register()
en un lugar anterior del objeto binario. Registrarse una vez que sea suficiente y se puede realizar durante el inicio
Algunas primitivas necesitan un registro más especializado.
KeysetDeriver
requiere KeyDerivationConfig.register()
JwtMac
requiere JwtMacConfig.register()
JwtPublicKeySign
y JwtPublicKeyVerify
requieren JwtSignatureConfig.register()
Caso 2: El error enumera un tipo de clave y una primitiva.
Por ejemplo, el error podría ser Unable to get primitive interface P for key
of type T
para algún valor específico de P y T.
En este caso, Tink no puede crear la primitiva específica que le solicitaste para el conjunto de claves que tienes. Por lo general, esto sucede porque tienes un conjunto de claves para el tipo incorrecto. Por ejemplo, quizás pidas una Mac, pero el conjunto de claves es para Aead.
Un caso común es cuando se intenta obtener una primitiva de clave pública de un conjunto de claves que contiene claves privadas. Para ver si este es el problema, considera llamar a GetPrimitive()
en el resultado de GetPublicKeysetHandle()
en su lugar.
Si esto no ayuda, puedes encontrar una lista actualizada de los tipos de claves aquí, en nuestras pruebas entre lenguajes. Debes comprobar si la primitiva P aparece junto con el tipo de clave T.
Si la primitiva aparece con el tipo de clave correspondiente, es posible que la implementación de Tink de tu lenguaje no admita el tipo de clave T. Consulta la lista de tipos de claves para ver si Tink admite tu tipo de clave en tu lenguaje.
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2025-07-25 (UTC)
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-07-25 (UTC)"],[[["\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."]]