Forum Discussion

Leo0731's avatar
Leo0731
New Contributor
2 years ago

ReadyAPI cannot get token: No enum constant com.eviware.soapui.impl.rest.actions.oauth.OAuth2Paramet

Hi there,

I need help,  my ReadyAPI was able to refresh token with no issue, but recently I cannot get any token. I got below error from the log:

"No enum constant com.eviware.soapui.impl.rest.actions.oauth.OAuth2Parameters.PKCEChallengeMethod.Not defined"

Me and our team are using Client Credential Grant and it has been working properly until recently. I don`t recall any change on the OAuth2 config



So any idea how to fix this??  We need to fix this urgently.
Thanks

 

  • richie's avatar
    richie
    Community Hero

    Hey Leo0731 

     

    Apologies for my delay in replying.  We've reached and breached the limits of my knowledge in this regard.  I mean, we could walk through the ReadyAPI help together - trying to find the issue - but as it worked before - there's just nothing tangible to try and focus on to work out what the problem was.  All your config is perfect, otherwise it wouldn't have worked in the first place.

     

    I have 1 suggestion.  As it was working fine before and it appears that no changes have actually been made, have you tried re-creating the request from scratch?

     

    I had a similar issue several years ago - when there was no corruption (that was clearly visible) in the underlying .xml for the project, everything looked fine - but my OAuth v2.0 requests just stopped working (can't remember the actual reason for failure). 

    Similar situation to you - no changes in Dev, no ReadyAPI version change - so I tried re-creating the whole OAuthv2 request from scratch - and that did fix my issue.

     

    Apologies that I can't come up with anything more solid to try and help you fix this.

     

    Cheers,

     

    Rich

  • richie's avatar
    richie
    Community Hero

    Hey Leo0731 

     

    When you say it worked until recently - do you know how recently......did you upgrade the version of ReadyAPI you're using?

     

    Have you confirmed with Dev that no changes have been made to the OAuth2 code?

     

    ta

     

    Rich

    • Leo0731's avatar
      Leo0731
      New Contributor

      Hi Rich,

      Thank you for your reply, it was about 2 weeks ago, and Dev confirmed there is no code changes to OAuth2, and my configure on readyAPI is the same as theirs and they can get tokens but not mine. 

      And I didn`t update the readyAPI when this happened, however, I did update the readyAPI from 3.41ish to 3.49.0 to try to solve it but still didn`t work. 
      Below is the rest of my setup:

       

      API name

       
       


      Auth:

       

      Endpoint basic:

       Custom properties:

       

      Any idea how can I get tokens as it impacting our deliveries. 

      Thank you in advance