Skip to content

Commit 1dffd12

Browse files
author
Adam Rutland
authored
Merge pull request #396 from jfgarcia268/master
Instrumentation to Debug LWC Login Issue.
2 parents c98bb99 + d27b99e commit 1dffd12

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

lib/datapacktypes/omniscript.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ OmniScript.prototype.compileOSLWC = async function(jobInfo, omniScriptId,omniScr
188188

189189
let puppeteerOptions = await utilityservice.prototype.getPuppeteerOptions(jobInfo);
190190

191+
VlocityUtils.verbose('Deployed OmniScript ID', omniScriptKey + ' (' + omniScriptId + ')');
192+
191193
if (!puppeteerOptions.executablePath && !jobInfo.puppeteerInstalled) {
192194
VlocityUtils.error('Chromium not installed. LWC activation disabled. Run "npm install puppeteer -g" or set puppeteerExecutablePath in your Job File');
193195
jobInfo.ignoreLWCActivationOS = true;
@@ -198,6 +200,7 @@ OmniScript.prototype.compileOSLWC = async function(jobInfo, omniScriptId,omniScr
198200
var siteUrl = this.vlocity.jsForceConnection.instanceUrl;
199201
var sessionToken = this.vlocity.jsForceConnection.accessToken;
200202
var loginURl = siteUrl + '/secur/frontdoor.jsp?sid=' + sessionToken;
203+
VlocityUtils.verbose('LWC Activation Login URL', loginURl);
201204
var browser;
202205
try {
203206
browser = await puppeteer.launch(puppeteerOptions);
@@ -208,7 +211,7 @@ OmniScript.prototype.compileOSLWC = async function(jobInfo, omniScriptId,omniScr
208211
}
209212

210213
const page = await browser.newPage();
211-
const loginTimeout = 300000;
214+
const loginTimeout = jobInfo.loginTimeoutForLoginLWC;
212215

213216
await Promise.all([
214217
page.waitForNavigation({ timeout: loginTimeout, waitUntil: 'load' }),

lib/defaultjobsettings.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ defaultMinToWaitForLWCOmniScript: 10
1414
defaultMinToWaitForLWCClassicCards: 10
1515
defaultMinToWaitForLWCFlexCards: 5
1616
defaultLWCPullTimeInSeconds: 5
17+
loginTimeoutForLoginLWC: 300000
1718
puppeteerHeadless: true
1819
lookForParentLayoutsForlWCCards: true
1920
exportPacksMaxSize: 5

lib/vlocitycli.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ var VLOCITY_COMMANDLINE_OPTIONS = {
101101
"defaultMinToWaitForLWCClassicCards": Number,
102102
"defaultMinToWaitForLWCFlexCards": Number,
103103
"defaultLWCPullTimeInSeconds": Number,
104+
"loginTimeoutForLoginLWC": Number,
104105
"puppeteerHeadless": Boolean,
105106
"ignoreLWCActivationOS": Boolean,
106107
"ignoreLWCActivationCards": Boolean

0 commit comments

Comments
 (0)