• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

InDesign Server restarts when running scripts via SOAP Calls

Community Beginner ,
Feb 17, 2022 Feb 17, 2022

Copy link to clipboard

Copied

Hello. I have been working with InDesign Server. I was using Load Balance Queue for commucation between our apps and IDS. Now, we are shifting to SOAP calls to interact with IDS. 

I am able to establish the connection, send my params and start running my initial script.

Now, the issue comes when running my scripts. For some reason,  the scripts make the server to restart, and I can't find a way to do a full execution.

If the script is simple (just some alerts, or placing a document) it works OK, but when I try do some kind of manipulation, the instance reboots. This is problematic because I can't find a way to fully execute all the processes that were working fine with LBQ approach.

Adding an example. Whenever I run the ApplyStyles.jsx script the instance reboots, making my workflow to not complete. (This happens with many scripts, different templates and word documents)

 

//Recovering params

var word = app.scriptArgs.get("wordFile");
var template = app.scriptArgs.get("template");
var bookId = app.scriptArgs.get("bookId");
var country = app.scriptArgs.get("country");

alert("wf: " + app.scriptArgs.get('wordFile'));
alert("bookId: " + app.scriptArgs.get('bookId'));
alert("templateFile : " + app.scriptArgs.get('templateFile'));
alert("country: " + app.scriptArgs.get('country'));


args = [word, template, bookId, country];


app.doScript("ApplyStyles.jsx",ScriptLanguage.javascript, args);


//ApplyStyles.jsx 

try {
AplicarEstilo(); //THis is for example a script that "fails" and restarts the service
} catch (e){
	alert("error");
}
function AplicarEstilo() {    
	var doc = app.documents[0];
	
    for (var i = 0; i < doc.paragraphStyles.length; i++) {
        try {
			
            var pStyle = doc.paragraphStyles[i];
            findChange("","", pStyle, pStyle, "", "");
        } catch (e) {}
    }
}


function findChange(findWhat, changeTo, findStyle, changeStyle, findChrStyle, changeChrStyle) {
    var doc = app.documents[0];    
    try {
        app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
        if (findWhat) app.findTextPreferences.findWhat = findWhat;
        if (changeTo) app.changeTextPreferences.changeTo = changeTo;
        if (findStyle) app.findTextPreferences.appliedParagraphStyle = findStyle;
        if (changeStyle) app.changeTextPreferences.appliedParagraphStyle = changeStyle;
        if (findChrStyle) app.findTextPreferences.appliedCharacterStyle = findChrStyle;
        if (changeChrStyle) app.changeTextPreferences.appliedCharacterStyle = changeChrStyle;
        doc.changeText();
    } catch (e) {}
    app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
}

 

The event viewer log:

THe message when the instance restart:

 

[server] Initializing [5740] [8090]
[server] Loading the application [5740] [8090]
[server] Scanning for plug-ins [5740] [8090]
[server] Registering 114 plug-ins [5740] [8090]
[server] Completing Object Model [5740] [8090]
[server] Saving Object Model [5740] [8090]
[server] Initializing plug-ins [5740] [8090]
[server] Calling Early Initializers [5740] [8090]
[server] Starting up Service Registry [5740] [8090]
[server] Executing startup services [5740] [8090]
[server] Using configuration configuration_8090 [5740] [8090]
[server] Initializing Application [5740] [8090]
[server] Completing Initialization [5740] [8090]
[server] Calling Late Initializers [5740] [8090]
[server] Image previews are off [5740] [8090]
[server] Server Running [5740] [8090]
[javascript] Executing File: C:\Program Files\Adobe\Adobe InDesign CC Server 2019\Scripts\startup scripts\ConnectInstancesToESTK.js [5740] [8090]
[javascript] Executing File: C:\Program Files\Adobe\Adobe InDesign CC Server 2019\Scripts\converturltohyperlink\startup scripts\ConvertURLToHyperlinkMenuItemLoader.jsx [5740] [8090]

 

[soap] Servicing SOAP requests on port 8090 [5740] [8090]

 

How can I overcome this? I'm quite lost because almost anything I do with scripst just fails. And these scripts worked both on InDesign Desktop (with their respective modifications), and worked in the same InDesign Server Instance, but just with a different way of calling them (LQB = OK, SOAP Call = Wrong). The params are the same, the server is the same, the same machine, no changes except removing LBQ.

TOPICS
Scripting

Views

646

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 18, 2022 Feb 18, 2022

Copy link to clipboard

Copied

Hi @DiegoNicolas22255510o71u,

 

As I understand you are finding paragraph with para style and appling same style.

So, at which line soap reboot IDS instance?

 

-Sumit

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 22, 2022 Feb 22, 2022

Copy link to clipboard

Copied

HI,

 

Is there no output when you call the SOAP call?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 23, 2022 Feb 23, 2022

Copy link to clipboard

Copied

Hi, sorry for my late response-

This is the response I recieve from the soap call:

<IDSP:RunScriptResponse><errorNumber>0</errorNumber><scriptResult/></IDSP:RunScriptResponse>

 

Hope this helps. Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 23, 2022 Feb 23, 2022

Copy link to clipboard

Copied

Hello @SumitKumar , Yes. The script just does that. I also have others that also fails.

 

The server reboots after:

if (findStyle) app.findTextPreferences.appliedParagraphStyle = findStyle;

 

The strage part is that this script wasn't failing when I run it via LBQ (and I can run it with InDesign Desktop with no problems). 

It this helps, we first place a Word document on a template with the script  (this works ok).

 

Any help is appreciated, thanks!

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 29, 2022 Mar 29, 2022

Copy link to clipboard

Copied

Hello, 

any updates about this? 

 

I have the similar problem:

after placing Word document and further changing app.findGrepPreferences, for example:

 

app.findGrepPreferences.appliedParagraphStyle = 'someStyle';

 

runned InDesign Server Instance crashes. That jsx code works if I run it from ESTE on the same IDS instance, but not working via SOAP request.

 

Windows Application LOG:

Log Name: Application
Source: Application Error
Date: 29/03/2022 18:15:50
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: INDESIGN
Description:
Faulting application name: InDesignServer.exe, version: 15.0.2.323, time stamp: 0x5e4c34cb
Faulting module name: TEXT.RPLN, version: 15.0.2.323, time stamp: 0x5e4c3b42
Exception code: 0xc0000005
Fault offset: 0x00000000001447cc
Faulting process ID: 0x2600
Faulting application start time: 0x01d8438700f26c44
Faulting application path: C:\Program Files\Adobe\Adobe InDesign Server 2020\InDesignServer.exe
Faulting module path: C:\Program Files\Adobe\Adobe InDesign Server 2020\Required\TEXT.RPLN
Report ID: 0d0246d1-29e9-431e-a470-184abfb4039c
Faulting package full name:
Faulting package-relative application ID:
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2022-03-29T16:15:50.794909800Z" />
<EventRecordID>9438</EventRecordID>
<Channel>Application</Channel>
<Computer>INDESIGN</Computer>
<Security />
</System>
<EventData>
<Data>InDesignServer.exe</Data>
<Data>15.0.2.323</Data>
<Data>5e4c34cb</Data>
<Data>TEXT.RPLN</Data>
<Data>15.0.2.323</Data>
<Data>5e4c3b42</Data>
<Data>c0000005</Data>
<Data>00000000001447cc</Data>
<Data>2600</Data>
<Data>01d8438700f26c44</Data>
<Data>C:\Program Files\Adobe\Adobe InDesign Server 2020\InDesignServer.exe</Data>
<Data>C:\Program Files\Adobe\Adobe InDesign Server 2020\Required\TEXT.RPLN</Data>
<Data>0d0246d1-29e9-431e-a470-184abfb4039c</Data>
<Data>
</Data>
<Data>
</Data>
</EventData>
</Event>

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 10, 2022 Apr 10, 2022

Copy link to clipboard

Copied

Hi @user2690963 ,

 

Kindly save the document between word doc placement and findText.

 

Regards,

Sumit

-Sumit

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

Hello @SumitKumar ,

Sorry for my late response, I am reviewing this issue again.

I have checked saving the document prior to the search, but still the same problem.

 

function findChange(findWhat, changeTo, findStyle, changeStyle, findChrStyle, changeChrStyle) {
    var doc = app.documents[0];    
    doc = doc.save(File("preFindChange.indd"));
    try {
        app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
        if (findWhat) app.findTextPreferences.findWhat = findWhat;
        if (changeTo) app.changeTextPreferences.changeTo = changeTo;
        if (findStyle) app.findTextPreferences.appliedParagraphStyle = findStyle;
        if (changeStyle) app.changeTextPreferences.appliedParagraphStyle = changeStyle;
        if (findChrStyle) app.findTextPreferences.appliedCharacterStyle = findChrStyle;
        if (changeChrStyle) app.changeTextPreferences.appliedCharacterStyle = changeChrStyle;
        doc.changeText();
    } catch (e) {}
    app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
}

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 11, 2022 Jul 11, 2022

Copy link to clipboard

Copied

LATEST

Same for me, saving document didn't help for me either. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines