uno.RuntimeException: Binary URP bridge disposed during call

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
martinrame
Posts: 15
Joined: Tue Dec 13, 2016 10:07 pm

uno.RuntimeException: Binary URP bridge disposed during call

Post by martinrame »

I'm trying to run a Python UNO script from FreeBSD 12.2 and LibreOffice 7.1.4.2 10(Build:2) and keep getting "uno.RuntimeException: Binary URP bridge disposed during call".

First of all I run soffice.bin headless using this call:

Code: Select all

/usr/local/bin/soffice --invisible --accept="socket,host=localhost,port=2002,tcpNoDelay=1;urp;" --headless --nodefault --nofirststartwizard --nolockcheck --nologo --norestore &
I can confirm it runs by ps ax|grep soffice or telnet localhost 2002, then my script is this:

Code: Select all

...
import uno
import unohelper
...
localContext = uno.getComponentContext()
resolver = localContext.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver", localContext )
ctx = resolver.resolve( "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" )
smgr = ctx.ServiceManager
desktop = smgr.createInstanceWithContext( "com.sun.star.frame.Desktop",ctx)
When I try to run it I get:

Code: Select all

Traceback (most recent call last):
  File "./generar_pdf.py", line 207, in <module>
    desktop = smgr.createInstanceWithContext( "com.sun.star.frame.Desktop",ctx)
uno.RuntimeException: Binary URP bridge disposed during call
LibreOffice 7.1 on FreeBSD 12.2
martinrame
Posts: 15
Joined: Tue Dec 13, 2016 10:07 pm

Re: uno.RuntimeException: Binary URP bridge disposed during call

Post by martinrame »

For those facing this issue, on FreeBSD 13.2 and LibreOffice 7.6 it works without issues!. Even in jails.
LibreOffice 7.1 on FreeBSD 12.2
Post Reply