Running Katalon in docker container ubuntu 16.04: blank page using WebUI.nagivateToUrl()


#1

After setting up Katalon to run from inside a docker container which is being invoked by Jenkins.
I cannot get my scripts to run. (which do run on Windows)

For some reason I keep getting a blank page when I’m logged in my app and use WebUI.naviageToUrl()
Here is the function I use to Navigate.

	public void navigateToURL() {

	println "beforeNavigate Screenshot ->"+ WebUI.takeScreenshot()
	String currentURL = WebUI.getUrl()
	println "Before Navigate to: ->[$currentURL]"
	if(currentURL.toLowerCase()!=this.getURL().toLowerCase()) {
		WebUI.navigateToUrl(GlobalVariable.url+this.getURL())
	}
	println "Navigate to: 		 ->[${GlobalVariable.url+this.getURL()}]"
	println  "webUI.getURL->"+WebUI.getUrl()
	println "afterNavigate Screenshot ->"+ WebUI.takeScreenshot()
	
}

and here is what’s in the logs:
beforeNavigate Screenshot ->/tmp/katalon_execute/project/Reports/20191104_194914/Permissions/20191104_194914/1572897054774.png

Before Navigate to: ->[http://internal.viewpoint.pefservices.com:8080/clients/551]

Navigate to: ->[http://internal.viewpoint.pefservices.com:8080/admin/chartmanagement/showhidecharts] webUI.getURL->http://internal.viewpoint.pefservices.com:8080/

afterNavigate Screenshot ->/tmp/katalon_execute/project/Reports/20191104_194914/Permissions/20191104_194914/1572897055749.png

Attached are the two screenshots

here’s my Jenkinsfile

pipeline {
    agent {
        docker {
            image 'katalonstudio/katalon'
            args "-u root"
        }
    }
    stages {
        stage('Test') {
            steps {
                sh 'katalon-execute.sh  -browserType="Chrome (headless)" -retry=0 -statusDelay=15 -testSuitePath="Test Suites/Permissions" -executionProfile="QA2" -apiKey=xxxxxxxxxxxxxxxxxxxxxxx'
                
            }
        }
    }
    post {
        always {
            archiveArtifacts artifacts: 'report/**', fingerprint: true
            junit 'report/**/*.xml'
        }
    }
}

#2

Actually found the fix, I had to increased the shared memory size in the docker container
adding --shm-size 1G to docker run will fix it

pipeline {
    agent {
        docker {
            image 'katalonstudio/katalon'
            args "-u root --shm-size 1G
        }
    }
    stages {
        stage('Test') {
            steps {
                sh 'katalon-execute.sh  -browserType="Chrome (headless)" -retry=0 -statusDelay=15 -testSuitePath="Test Suites/Permissions" -executionProfile="QA2" -apiKey=2bdd74b8-e5ab-4652-89f5-b97f7d0346d2 --shm-size 1G' 
                
            }
        }
    }
    post {
        always {
            archiveArtifacts artifacts: 'report/**', fingerprint: true
            junit 'report/**/*.xml'
        }
    }
}