23
Views
4
Comments
[Vonage APIs Core Component] Vonage create session failing with a JWT error
Question
Forge component by Parma Bhagwandin
1
Published on 05 Oct 2020

Hi,

When trying to create a new session, the following exception is thrown:
Method not found: 'Void JWT.JwtEncoder..ctor(JWT.IJwtAlgorithm, JWT.IJsonSerializer, JWT.IBase64UrlEncoder)'. 

Environment Detail:
Vonage APIs Core Component v2.0.1
Platform Version 11.8.2 (Build 15086)
ServiceStudio 11.8.7 (Build 29640)

I have installed the latest version via a web download of the OAP and then published it via ServiceCenter, and the issue persists.

I have confirmed that the ProjectAPIKey and the ProjectSecret are being passed to the CreateNewSession action of VonageServices.

Here is the full stack trace:

Method not found: 'Void JWT.JwtEncoder..ctor(JWT.IJwtAlgorithm, JWT.IJsonSerializer, JWT.IBase64UrlEncoder)'. at OpenTokSDK.Util.HttpClient.GenerateJwt(Int32 key, String secret, Int32 expiryPeriod) at OpenTokSDK.Util.HttpClient.GetCommonHeaders() at OpenTokSDK.Util.HttpClient.GetRequestHeaders(Dictionary`2 headers) at OpenTokSDK.Util.HttpClient.DoRequest(String url, Dictionary`2 specificHeaders, Dictionary`2 bodyData) at OpenTokSDK.OpenTok.CreateSession(String location, MediaMode mediaMode, ArchiveMode archiveMode) at OutSystems.NssTokBoxServer.CssTokBoxServer.MssCreateSession(Int32 ssProjectAPIKey, String ssProjectSecret, String ssMediaMode, String ssArchiveMode, String& ssSessionId) at ssVonageServices.RssExtensionTokBoxServer.MssCreateSession(HeContext heContext, Int32 inParamProjectAPIKey, String inParamProjectSecret, String inParamMediaMode, String inParamArchiveMode, String& outParamSessionId)

Any assistance would be appreciated.

Thanks
Ouen

Rank: #461

Hi Ouen,

I am facing the same issue. The workaround I have done for now is:

  • Create the JWT token using GenerateJsonWebToken method.



  • Use the JWT token to call the Vonage Rest API to create the session


Hope this helps you.

mvp_badge
MVP
Rank: #26

There are several DLL issues since the latest update of OutSystems to version 11.9.1.

I've checked the problem you were facing and I believe that with the new version of the core component I've uploaded (2.0.2), you should be able to use the Vonage modules without any issues.

Please let me know if the problem is solved with this update or not.

Kind regards,

Remco Dekkinga

Hi,

We are facing same issue with the CreateSession call. We were consuming the Service in one of our application (say Application1).  Below are some observations:

1. When we installed the latest version (Version 2.0.2) by publishing the downloaded oap file from Service Center,  and refreshed the dependent applications via Service Center, the issue got resolved. However after this, if we made a change in our Application1  and publish via Service Studio, we start getting the error "Method not found: 'Void JWT.JwtEncoder..ctor(JWT.IJwtAlgorithm, JWT.IJsonSerializer, JWT.IBase64UrlEncoder)'."  again when the CreateSession call is made.


2. We switched back to an earlier version (version 2.0.0), and publish dependent applications via ServiceCenter. The CreateSession call starts working again, but the moment we publish our Application1 from Service Studio the same error gets thrown whenever CreateSession call is made.

Platform Server Version: 11.7.2

Hope the above observation is helpful in providing any inputs to identify the root cause.


Thanks & Regards,

Saurabh

mvp_badge
MVP
Rank: #26

Hi Saurabh,

This is a good extension to the information that was already known to me. Could you elaborate a bit more on the extensions you have running on this environment?

The problem itself is caused by a DLL conflict (you install from the Forge, which is the correct DLL, later you install from SS and probably reference another module that is using a different version of the same DLL, which causes the problem.

For several applications, we have now solved this problem by installing the Factory Configuration

Open the Factory Configuration > Go to the tab Platform Configurations and disable the checkbox 'Force apps to use existing versions of third party libraries' 

After this, in Service Center, create a solution of all applications and republish to activate the Publish setting.

Please let me know if this solves the issue on your side too.

Kind regards,

Remco Dekkinga