why is it necessary for soffice.bin to connect to the internet when I run a macro?

I’ve written a few macros in Calc that work fine except for a delay of ~10 seconds as soffice.bin repeatedly attempts an internet connection and finally gives up. Is there a way to disable this behavior?

TIA for any help.
-----------------------------

Thank you for your comments/suggestions. Crash reports and Collect usage data had already been disabled, as had automatic updates.

The attempted connection is via https (port 443) to: “server-13-227-220-xx.ams54.r.cloudfront.net” where “xx” is a number that varies (e.g., could be “70” or “43” etc.).

My suspicion is that the cause may be a line of code that includes:
createUnoService(“com.sun.star.sheet.FunctionAccess”)
with its reference to star.sun.com (even though it’s backwards). Do you think this could be the case? And if so, might there be an alternative to relying on a “UnoService?”

A delay of an extra few seconds isn’t a matter of life and death, of course, but the majority of this type of work that I do is without an internet connection so the closer I can get to being completely stand-alone, the better.

Thanks again for your quick reply.
-----------------------------

To all who replied: your input is much appreciated!

As for the connection to a Dutch Amazon.com server, wouldn’t you know? They have their fingers in everything these days, don’t they? :wink:

In stepping through my code (F8), I found that the connection attempt is triggered at the command, “Activesheet.Paste”, as it pastes clipboard content that had been copied from a table on a Web page. It may be that I can first paste that content into a Wordpad document (force it to shed its HTML properties?), then copy and paste into the Calc sheet.

In any case, I think we can consider this closed. If the approach above doesn’t work, I can use the time to take a slug or two of my coffee before it gets cold.

Thanks again.

May be this is a DNS lookup for crashreport.libreoffice.org and you could disable through Tools -> Options -> LibreOffice -> General -> Section: Help Improve LibreOffice (You may also wan to disable collecting usage data)


Another reason may be our setting for `Tools -> Options -> LibreOffice -> Online Update -> Option: [x] Check for updates automatically`
I never did check whether this is really the case, hence a comment and not an answer. Just give it a try (and check the port being used - if it is `53` then it is a DNS request)

http://server-13-227-220-xx.ams54.r.cloudfront.net/ looks like an address related to an IP 13.227.220.xx related to Netherlands Amsterdam Amazon.com Inc.

com.sun.star service name prefix has nothing to do with that, and has its roots in Java naming scheme affecting the naming of UNO when it was created by SUN.

It would be likely something on your configuration (mapped drives, recent documents on remote shares, network printers, etc.) that cause that. More details (OS, LO version, environment, macro code) is required to answer this.

By the way, crash reporting would not cause that, since under no circumstances crash reports are sent without an explicit approval (there’s no option like “do not ask next time” for this feature). “Collect usage data” is not implemented currently, so it also could not be the cause.

@mikekaganski

By the way, crash reporting would not cause that,

IIRC some day there was a comment, that soffice performs/initiates a DNS lookup on startup because it might be too late to evaluate crashreport site’s ip-address in case of crash (but you know the code)

@anon73440385 - interesting, I might need to check. Thanks!

Checked the code (and initiated the sequence) in CrashReporter::crashReportInfoExists (that is responsible for this all), and I can confirm, that at least on Windows, the very first network communication was after agreeing to sent in the dialog (the network communication was monitored using Sysinternals’ procmon).