Hello,
When trying the new version I got this error when reading a token.
I was working correctly before
Could not load type 'Microsoft.IdentityModel.Tokens.TokenHandler' from assembly 'Microsoft.IdentityModel.Tokens, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
at OutSystems.NssJWT_Core.CssJWT_Core.MssReadToken(String ssEncodedToken, Boolean ssVerifySignature, String ssSignatureKey, String ssSignatureKeyId, Boolean ssVerifyLifetime, Boolean ssVerifyIssuer, String ssIssuer, Boolean ssVerifyAudience, String ssAudience, Boolean ssShowDebugInformation, String& ssPlainToken, RCTokenHeaderRecord& ssTokenHeader, RCTokenPayloadRecord& ssTokenPayload, Boolean& ssHasValidToken, String& ssResultMessage) at ssJWT.RssExtensionJWT_Core.MssReadToken(HeContext heContext, String inParamEncodedToken, Boolean inParamVerifySignature, String inParamSignatureKey, String inParamSignatureKeyId, Boolean inParamVerifyLifetime, Boolean inParamVerifyIssuer, String inParamIssuer, Boolean inParamVerifyAudience, String inParamAudience, Boolean inParamShowDebugInformation, String& outParamPlainToken, IRecord& outParamTokenHeader, IRecord& outParamTokenPayload, Boolean& outParamHasValidToken, String& outParamResultMessage)
We are on Version 11.18.1 (Build 37828).
Did I miss something ?
Kind regards
Luc
Looks like some kind of dependency issue. I'll check if the extension was not packed properly. Are on Cloud or In Premises?
on cloud
Is that the full stack trace? Have you updated all dependencies? is the Demo working for you?
hell Joao,
it seems that when installing from forge only the module jwt is loaded and not the module jwt_core is not replaced.
Do i need to upload myself the application ?
The capture show the latest installation from forge. it keeps the old jwt_code unchanged
Weird... No, you shouldn't need to load anything separately. Is the JWT_Core component running the lates version? It might have uploaded the latest but still be using a previous one.
If nothing else works, can you try to deploy manually the JWT_Core extension bundled?
could be a dll location issue. Are you using server (not service) actions from JWT in multiple projects? If so you should try to republish all dependant applications once more from service center.
When using server actions the depending module and its assemblies become part of the target solution and if OutSystems is looking then for an assembly it could be that it just looks in the wrong path.
Stefan
Thanks Stefan and Joao
yes we are using service actions in multiples modules
I ll try this morning
Cool. If possible, let us know the result.
I do not understand.. the JWT_Core does not seem to be the good one in studio but in center i see the latest upload version ..
Those screenshots don't really help, this seems to be a dependencies issue so are there any outdated dependencies?
I just tested a scenario where I upgraded a personal area with a much older version of the component, upgraded it normally in Service Studio, and tested trying to create and read tokens, both with symmetric and asymmetric keys in the Demo App. All worked ok.
of course I republished after refreshing the dependencies the consumer app :-)
Just to clarify my own post above. If you are only consuming via Service Actions then a republish von consuming applications shouldn't be necessary. At least not when it comes to the dll location retrieval problem i mentioned. In this case the assemblies only exist once.
Iam sorry that i cannot dig deeper into the problem to assist you. Iam using a previous, but customized solution of JWT in my own environments.
Any clue, or solution yet?
I'm having the same issue.
Not really. Is the demo working for you?
Sorry. Demo?
The Demo app, that can be installed along side the component. It's also available in Service Studio when searching the Forge.
I made another try. I went into service center to delete the service/lib modules and then reinstalled the latest versions. I have try the lastest demo. It is not working. Same issue.
Could it be another component that's bundling Microsoft.IdentityModel 5.2.2? What version of JWT did you have before upgrading?
Sorry, but that print screen doesn't tell anything on which versions where installed...
is not the last column of the screenshot ?
Nope, the last columns are the Service Studio and Integration Studio versions.Where you running the last version of JWT prior to this? If so it was the 4.0.6 version of the component.
We are expierencing the same issue. After updating the Forge component (from version 4.0.6 to 4.0.7) and refreshing/republishing all consumers, we get the following error messages in the Error Log when validating an incoming Bearer token:
Ok, this definitely is some kind of "dependency hell" issue that I'm not being able to replicate, specially because version 4.0.6 depends on Microsoft.IdentityModel.Tokens 5.2.4.0 not 5.2.2.0.
For now, I'm going to mark this version as "In Development" because of this, specially until we're able to replicate or identify why it's happening.
Meanwhile, if you can share which Plaform version currently running, that could give a hint on what could be the cause.
Hi João,
Thanks for your quick reply. I was just thinking to mention the platform server version as well :)
We are currently using platform version 11.18.1
I read in the platform release notes that version 11.19 has a new way to choose which version of a DLL is used in case multiple extensions contain different versions of the same DLL.
A few weeks from now, we will upgrade to a newer platform version. I'm curious to see if that resolves the issue. If you are already on a newer platform version, that might be the reason why you can't replicate the issue.
(I wonder what platform version Luc Lafontaine is using?)
Version 11.18.1 (build 37628)
The plateforme has been updated to Version 11.25.0 (Build 41743)
I re-installed the latest version 4.0.6 and the demo.
it is working fine so far.
We upgraded our platform version to the latest 11.25.0 and now version 4.0.7 seems to work just fine.
I'd say it's safe to no longer mark 4.0.7 as "In Development"
I'm not sure if you can mark it as "requires platform version 11.19.0 or higher"?
Uploading a new version with the updated libraries
Facing the same issue with latest version .Any solutions ?
As a temporary workaround, how about using this other component? Is the behavior the same?https://www.outsystems.com/forge/component-overview/18736/jwt-secure-o11
It's the same component as this one, forked to have updated libraries. We're already in the process of merging that and other JWT related components. The features and interface are the same, so there should be no breaking changes, but the updated libraries might not have the same behavior.
I have the same issue. The forked component mentioned above (https://www.outsystems.com/forge/component-overview/18736/jwt-secure-o11) does not seem to exist on the Forge.
Any update on this?
I also tried the demo and that does not work either.
Here is some description from the error log:
Message: Could not load type 'Microsoft.IdentityModel.Tokens.TokenHandler' from assembly 'Microsoft.IdentityModel.Tokens, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Environment Information:
eSpaceVer: Id=69324, PubId=0, CompiledWith=11.18.1.37828RequestUrl: https://appdev.skillibrium.com/Munjal_Sandbox/screenservices/Munjal_Sandbox/ClientSideCache/JWTCache/ActionValidateJWTCache (Method: POST)AppDomain: /LM/W3SVC/1/ROOT/Munjal_Sandbox-159-133665412635002175FilePath: D:\OutSystems\Platform Server\running\Munjal_Sandbox.01131064660\ClientIp: 10.11.186.177 X-Forwarded-For: 82.154.163.121Locale: en-USDateFormat: yyyy-MM-ddPID: 6244 ('w3wp', Started='7/26/2024 11:39:13 AM', Priv=2479Mb, Virt=2123437Mb)TID: 40Thread Name:.NET: 4.0.30319.42000
Stack:
Could not load type 'Microsoft.IdentityModel.Tokens.TokenHandler' from assembly 'Microsoft.IdentityModel.Tokens, Version=5.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. at ssMunjal_Sandbox.RsseSpaceJWT.JWTServiceAPIClients.ReadTokenService(HeContext heContext, String inParamEncodedToken, Nullable`1 inParamVerifySignature, String inParamSignatureKey, String inParamExpectedSignatureKeyId, Nullable`1 inParamVerifyLifetime, Nullable`1 inParamVerifyIssuer, String inParamExpectedIssuer, Nullable`1 inParamVerifyAudience, String inParamExpectedAudience, String& outParamPlainToken, STJWT_PayloadStructure& outParamTokenPayloadRec, STJWT_HeaderStructure& outParamTokenHeaderRec, Boolean& outParamValidToken, String& outParamResultMessage) at ssMunjal_Sandbox.RsseSpaceJWT.ReadTokenService(HeContext heContext, String inParamEncodedToken, Nullable`1 inParamVerifySignature, String inParamSignatureKey, String inParamExpectedSignatureKeyId, Nullable`1 inParamVerifyLifetime, Nullable`1 inParamVerifyIssuer, String inParamExpectedIssuer, Nullable`1 inParamVerifyAudience, String inParamExpectedAudience, String& outParamPlainToken, IRecord& outParamTokenPayloadRec, IRecord& outParamTokenHeaderRec, Boolean& outParamValidToken, String& outParamResultMessage) at ssMunjal_Sandbox.ServiceAPIs.ServiceAPIReadTokenService(HeContext heContext, String inParamEncodedToken, Nullable`1 inParamVerifySignature, String inParamSignatureKey, String inParamExpectedSignatureKeyId, Nullable`1 inParamVerifyLifetime, Nullable`1 inParamVerifyIssuer, String inParamExpectedIssuer, Nullable`1 inParamVerifyAudience, String inParamExpectedAudience, String& outParamPlainToken, STJWT_PayloadStructure& outParamTokenPayloadRec, STJWT_HeaderStructure& outParamTokenHeaderRec, Boolean& outParamValidToken, String& outParamResultMessage) at ssMunjal_Sandbox.Actions.ActionValidateJWTCache(HeContext heContext, String inParamJWTCacheToken, Boolean& outParamIsValid) at ssMunjal_Sandbox.ScreenServices.Munjal_Sandbox_ClientSideCache_JWTCache_Controller.<ActionValidateJWTCache>b__1(HeContext heContext, String screenName, JObject screenModel, JObject inputParameters, JObject clientVariables) at OutSystems.RESTService.Controllers.ScreenServicesApiController.endpoint(String input, String endpointName, String apiVersion, EndpointImplementationDelegate implementation)
Hi Munjal,
I removed the "JWT Secure" component after the upgrades have been ported to the main JWT component.
Can you try downloading the new version of JWT (+ demo component if you need) and see if the error persists? (this library should be version 8.0.0 in this one)
Thank you
I've tried downloading and re-downloading multiple times. Same error. Even in the demo (see screenshot above)
Hi Munjal,I understand that this screenshot was made using the latest version of JWT component? This is not expected because this dependency should be with version 8.0.0.0 there, not 5.2.2.0.Can you please try to remove/uninstall "JWT Secure", "JWT Demo" & "JWT" modules, then install the latest version of JWT+Demo from the Forge and take the same screenshot if you still have an error?Thank you
Hi, I deleted both JWT and JWT (Demo) apps and then reinstalled these from the Forge. I am still getting the same error.
Also, you guys keep talking about versions but (unless I am very blind), I can't see the versions anywhere so we can't really know what versions we are running - I am not sure how helpful the version numbers are. If I am wrong and there is an easy way to see the versions, I would love to know that. Thanks.
I have the same issue and the solution was install the version 4.0.6 of JWT and start working.
Best Regards
Miguel
The error message that you have is referencing Microsoft.IdentityModel.Tokens version 5.2.2.0, which is one of the libraries used in JWT_Core extension (part of JWT Forge component). Except that in the most recent version of JWT component (version 4.1.2 that you did screenshot), the reference should be to Microsoft.IdentityModel.Tokens version 8.0.0 instead, this is why we have difficulties to understand how you can get this error message.
I also tried to replicate by uninstalling these modules and then reinstalling from the Forge and I cannot manage to generate this error on your screenshot.
Few questions:
I should soon update this library to version 8.0.1 (which is the latest stable release from Microsoft), but I might be missing something when I build this solution or get packages since we still can't understand what is causing your error. This is why your help is very appreciated, we might uncover something very important and fix a very impacting issue thanks to your help.
Lastly, it is true that it is not easy to track which version is installed on your environment. But if you click "Install from Forge" from ServiceStudio then search for the component "JWT", you will see a summary like this:
In this screenshot you can see that I have actually a "custom version" installed, not the exact version from the Forge, and I can click "Install version 4.1.2" then "Install anyway" to fix this. Can you share what you see when you try to follow this too?
Maxime
Happy to hop on a call if that would make this easier: munjal@skillibrium.com
I'm having this same error... any news about this?...
For me, the problem was resolved by opening the extension in Integration Studio and rebuilding it again