Loading Project and Katalon Studio is stuck at "Generating Global Variables"

Thank you fam, this helped a lot

1 Like

Any update here? :slight_smile:

@Mat_Cauthon,

Have you sent your project information to info@katalon.com yet?

Please check all of your Global Variable profiles, some of your variables are invalid so KS could not generate GlobalVariable.class when opening project.

Thanks.

Thanks for the reply.
I’ve sent the code via private message to @devalex88. I shall also send it via mail.

Actually, I only have one profile (the default profile). However, all global variables are rewritten at the start of each test case. This is done using java code (just by writing an xml file to the Profiles location (filename: default.glbl))
The file looks something like:

<?xml version=“1.0” encoding=“UTF-8” standalone=“yes”?>
<GlobalVariableEntities>
<name>default</name>
<description></description>
<tag></tag>
<defaultProfile>true</defaultProfile>
<GlobalVariableEntity>
<initValue>8</initValue>
<name>G_TimeOut</name>
</GlobalVariableEntity>

</GlobalVariableEntities>

It does work when Katalon is started, but it is stuck for a long time at “Generating Global Variables”. Might the regeneration of this file have anything to do with this? It is done BEFORE the testSuite is started via a command.

I am also having this same issue on two different versions, tried 6.2.2 and 6.3.0. Both cannot open a project due to issues with generating global variables. I also had issues when the projects were previously opened about an internal error with groovy. When I try to open the project I get this error message after about 3 minutes of loading:

java.lang.InterruptedException: System could not generate internal.GlobalVariable file normally. Please check your writable permission in folder: /home/username/katalon-projs.
at com.kms.katalon.controller.GlobalVariableController.waitForGlobalVariableClassFileAvailable(GlobalVariableController.java:82)
at com.kms.katalon.controller.GlobalVariableController.generateGlobalVariableLibFile(GlobalVariableController.java:67)
at com.kms.katalon.controller.ProjectController.openProjectForUI(ProjectController.java:96)
at com.kms.katalon.composer.project.handlers.OpenProjectHandler$1.run(OpenProjectHandler.java:144)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)

I have tried moving the project around to see if it is a permissions issue, but I do in fact have all permissions for the folder so that shouldnt cause problems. Any ideas on how to fix this? This is an API project. I tried the above to no avail. Thanks!

So the only way I could solve this by following the steps above was to remove all calls to global variables anywhere. So remove the bin and Lib folders, as well as removing all calls to global variables inside the Object Repository folder, and also deleted all profiles. Which basically means the project was a ‘fresh’ start. Hoping a fix can get going on this soon so I don’t have to do this again.

EDIT: It broke (again)…

1 Like

Okay, so I found my issue. One of our global variables had dashes in it like this: -. So I removed those dashes and then the project loaded fine. It seems that certain characters make the system freak out and complain about the naming of variables. If this is able to be fixed I think variables should be able to have special characters in them (atleast dashes). Underscores worked fine as well, but for me that was what the issue was. Check your GlobalVariables.groovy and make sure the names are all formatted like proper class names.

3 Likes

Yeah. Worked for me too. Thanks @evy0311

1 Like

My issue was resolved in version 6.3.3. Thank you very much!

I am still facing this issue, even after updating to Versions 6.3.3
Tried deleting bin,libs folders as well. Permissions are also proper, still it throws following error
java.lang.InterruptedException: System could not generate internal.GlobalVariable file normally. Please check your writable permission in folder:

Do your global variables contain special characters e.g. spaces? If possible please try the 7.0 beta and let us know if it fixes your issue.

Try:

WebUI.comment(GlobalVariable["Spaces are cool"])
WebUI.comment(GlobalVariable["And-so-are-hyphens"])

Same issue Katalon 7.0.10 on Windows 10
I juste can’t use the software, brand new installation, brand new project… not working…
Is there some logging anywhere ?

1 Like

Error logs just found :

katalon.versionNumber=7.0.10
katalon.buildNumber=1
!SESSION 2019-11-21 10:21:34.707 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_181
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=fr_FR
Command-line arguments: -os win32 -ws win32 -arch x86_64 -data @noDefault -data C:\Users\jmarandet.katalon.metadata
!ENTRY org.eclipse.core.resources 2 10035 2019-11-21 10:21:37.236
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
Could not find element with Id ‘com.kms.katalon.composer.webservice.handledmenuitem.webServiceRequest’
Not a valid list position.
Could not find element with Id ‘katalon.composer.objectrepository.handledmenuitem.spyweb’
Could not find element with Id ‘com.kms.katalon.composer.mobile.dynamicmenucontribution.ios’
Could not find element with Id ‘com.kms.katalon.composer.mobile.dynamicmenucontribution.ios’
Warning: NLS unused message: Key in: com.kms.katalon.composer.project.constants.composerProjectMessages
Warning: NLS unused message: Key in: com.kms.katalon.composer.testcase.constants.composerTestcaseMessages
Warning: NLS missing message: BTN_ADDTESTSUITE in: com.kms.katalon.composer.testcase.constants.composerTestcaseMessages
Warning: NLS unused message: PA_LBL_CREATED_DATE in: com.kms.katalon.composer.testsuite.constants.composerTestsuiteMessages
Warning: NLS unused message: PA_LBL_LAST_UPDATED in: com.kms.katalon.composer.testsuite.constants.composerTestsuiteMessages
Warning: NLS unused message: Key in: com.kms.katalon.composer.objectrepository.constant.composerObjectRepositoryMessages
Warning: NLS missing message: VIEW_ERROR_MSG_PROJ_USER_CAN_NOT_ACCESS_PROJECT in: com.kms.katalon.composer.execution.constants.composerExecutionMessages
Warning: NLS missing message: OFFLINE_ACTIVATION in: com.kms.katalon.constants.messages
Warning: NLS missing message: ENTERPRISE_TRIAL_LICENSE in: com.kms.katalon.constants.messages
Warning: NLS missing message: ActivationDialogV2_LBL_ENTERPRISE_LICENSE in: com.kms.katalon.constants.messages

!ENTRY org.eclipse.egit.ui 2 0 2019-11-21 10:21:42.405
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: ‘H:’. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
Expired License.
log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
Start check license task

!ENTRY org.eclipse.e4.ui.workbench 4 0 2019-11-21 10:54:07.633
!MESSAGE
!STACK 0
java.lang.InterruptedException: System could not generate internal.GlobalVariable file normally. Please check your writable permission in folder: C:\Users\jmarandet\Katalon Studio\test_taux_recours.
at com.kms.katalon.controller.GlobalVariableController.waitForGlobalVariableClassFileAvailable(GlobalVariableController.java:82)
at com.kms.katalon.controller.GlobalVariableController.generateGlobalVariableLibFile(GlobalVariableController.java:67)
at com.kms.katalon.controller.ProjectController.openProjectForUI(ProjectController.java:103)
at com.kms.katalon.composer.project.handlers.OpenProjectHandler$1.run(OpenProjectHandler.java:165)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
All launchers terminated

Can you check if you have write permission in this directory ?

Hi ThanhTo,
Thanks for your message.

Yes, I have full control over it
This message doesn’t make any sense :

  • My user is “jmarandet”
  • The folder is within my home directory, and I have full control over it
  • I am running Katalon with my “jmarandet” account


I don’t understand how it could be possible, seems like Katalon was spawning some kind of ghost-user that could be blocked by our company security-system

But I also have an op-colleague that told me that he faced the same error even when he was lauching that app as an administrator. If you think this is necessary I can ask him his logs.

I don’t know how to help this issue ; Is there any other logging any-where ?
Or debug mode ?

Hello @ThanhTo / @Russ_Thomas / @duyluong / @devalex88

Having same problem for a while now, i have full permission on this folder and every files in it. and checked the Global variable files seems fine to me. What am i missing here?

Also im running Katalon_Studio_Linux_64-6.3.0 in jenkins

Hoping for your response soonest.
Patricia

Might be a question for our Linux guy: @Ibus

@patriciasimone.padua is that ‘data’ folder a sharepoint? (nfs mount or something) ?
can you ssh into that machine and run mount and show us the output?

note that, you may have acces to it. but since you are running katalon via jenkis, the jenkins user needs also propper permisions to it.

i will suggest to avoid such set-up … the simplest way to run the tests in jenkins is to use the git task to pull the project in the current workspace and execute it from there.
external mounts can create serious headache.

1 Like

Thanks Everyone,

I managed to get passed this error