Gmail integration broken in Katalon v9

The gmail read/write plugin seems to be broken in Katalon V9. I can no longer use that- we got lots of tests that uses that plugin.
@albert.vu


=============== ROOT CAUSE =====================

Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: javax.mail.MessagingException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate);

For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html

================================================

11-07-2023 01:43:30 PM getGmail = com.testwithhari.katalon.plugins.Gmail.readLatestEMailBodyContent(GmailUser, GmailPass, inboxFolder)

Elapsed time: 0.300s

Test Cases/Regression Tests/Team Manager/04.1- Verify pw reset email sent to advisor FAILED.

Reason:

com.kms.katalon.core.exception.StepErrorException: org.codehaus.groovy.runtime.InvokerInvocationException: javax.mail.MessagingException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate);

nested exception is:

javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.throwError(CustomKeywordDelegatingMetaClass.java:101)

at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:73)

at 04.1- Verify pw reset email sent to advisor.run(04.1- Verify pw reset email sent to advisor:28)

at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)

at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)

at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:448)

at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)

at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)

at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)

at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)

at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:144)

at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:135)

at TempTestCase1699382608915.run(TempTestCase1699382608915.groovy:25)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: javax.mail.MessagingException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate);

nested exception is:

javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

at com.testwithhari.katalon.plugins.Gmail.invokeMethod(Gmail.groovy)

at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:55)

at Script1699377660242.run(Script1699377660242.groovy:28)

... 13 more

Caused by: javax.mail.MessagingException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate);

nested exception is:

javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:670)

at com.testwithhari.katalon.plugins.Gmail.readLatestEMailBodyContent(Gmail.groovy:59)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

... 16 more

Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:549)

at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:354)

at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:237)

at com.sun.mail.iap.Protocol.<init>(Protocol.java:116)

at com.sun.mail.imap.protocol.IMAPProtocol.<init>(IMAPProtocol.java:115)

at com.sun.mail.imap.IMAPStore.newIMAPProtocol(IMAPStore.java:685)

at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:636)

at com.testwithhari.katalon.plugins.Gmail.readLatestEMailBodyContent(Gmail.groovy:59)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at com.testwithhari.katalon.plugins.Gmail.invokeMethod(Gmail.groovy)

at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:55)

at 04.1- Verify pw reset email sent to advisor.run(04.1- Verify pw reset email sent to advisor:28)

... 13 more
2 Likes

Ooops, BONUS ASK - Is it possible to view the source code of the above customkeyword/plugin?

1 Like

Have a look at the Katalon Store page:

The author writes

For live support, connect at https://gitter.im/testwithhari/ [ I will try to answer your questions in less than 60 seconds :slight_smile: ]

2 Likes

this could be related to java update or something of that nature updated in Katalon v9 as far as what I found on stackoverflow.
That guys contact site is offline.

This is going to force me to use Katalon v8. smh

1 Like

So I think I was right about java being updated and breaking this. Does anyone know how to specifically downgrade javax.mail?

1 Like

The javax.mail package was bundled in JDK1.8 but not in JDK17.
Possibly you need to add the jar of javax.mail into the classpath.
See

@duyluong

Katalon Studio v9.x should bundle the javax.mail jar for backward compatibility.

I added the javax.mail jar to /lib and it did not work (this is where the file sat on KS v8.x). Also added it to the java folder- did not work either. it was version 1.4 which is likely the most recent/latest.

Have a look at the Katalon doc

1 Like

perfect! one of those method worked

is there a way to open/view the code the author wrote from the custom keyword plugin?

Sorry, I know nothing about the Read and Write Gmail Messages Keyword plugin.

I could not find any link to the source code project from the Katalon Store page.

1 Like

the mentioned plugin seems to be developed by a third party contributor.
so, if you are not able to contact the author to improve it, you can rise a ticket to Katalon staff to remove it from the store as unsuported / obsolete

1 Like

So do I get it right. with Katalon v9 the “Read and Write Gmail Messages Keywords” Plugin is dead and I need to use javax.mail to read the gmail body content?

That means

  1. I need to Download the jar file from https://mvnrepository.com/artifact/com.sun.mail/javax.mail/1.6.2 and put it in the Katalon Drivers folder
  2. go into Katalon Project Settings > Libary Management und add this jar file to the External Libraries and apply

What next how do i used it in testcase (script modus) to get the lates Email content and how to delete the mail after?

To get it right:
The mentioned plugin was developped by a third-party and no longer maintained. So it’s dead.

The only thing Katalon can do is to remove it from the store as deprecated/unmaintained.
So yeah, you have to look for an alternate solution, whatever that will be.

No it’s not. The update just decoupled the javax.mail jar file which needs to be added after the updated. Look at the solution.

to get it to do what you want, yes, you do need to write the script and use the custom plugin. it’s custom key word so just call on that to do what you want.

after adding the javax.mail.jar into Drivers and restarting Katalon the plugin works again^^