Bug 123450 - simple macro invoking google-chrome does not result in google-chrome execution
Summary: simple macro invoking google-chrome does not result in google-chrome execution
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.4.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro-StarBasic
  Show dependency treegraph
 
Reported: 2019-02-13 20:24 UTC by Roy Kimbrell
Modified: 2020-07-25 04:00 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of Google error (110.17 KB, image/png)
2019-02-15 19:21 UTC, Roy Kimbrell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roy Kimbrell 2019-02-13 20:24:18 UTC
Description:
The following macro does not work in Libreoffice Writer:

Sub Test_Chrome
    Dim strURL As String
    strURL = "https://ask.libreoffice.org"
    Shell( "/opt/google/chrome/google-chrome " + strURL )
End Sub

The result is either a crash in google-chrome or nothing at all.

Substituting "google-chrome"for "/opt/google/chrome/google-chrome" does not change the behavior. For example, the following does not work either:

Sub Test_Chrome
    Dim strURL As String
    strURL = "https://ask.libreoffice.org"
    Shell( "google-chrome " + strURL )
End Sub

However the following works fine:

Sub Test_Firefox
    Dim strURL As String
    strURL = "https://ask.libreoffice.org"
    Shell( "firefox " + strURL )
End Sub

Steps to Reproduce:
1.Enter the macro shown in the description
2.Compile/run the macro

Actual Results:
Either a chrome crash or nothing at all

Expected Results:
Chrome should appear with the https://ask.libreoffice.org page.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Could not execute the test macros in safe mode.
Comment 1 Roy Kimbrell 2019-02-13 20:36:12 UTC
Both "/opt/google/chrome/google-chrome https://ask.libreoffice.org" and
"google-chrome https://ask.libreoffice.org" worked as expected when typed into a terminal.

"firefox https://ask.libreoffice.org" worked in the same way.
Comment 2 Oliver Brinzing 2019-02-14 17:56:52 UTC
following example works with:
Version: 6.1.5.2 (x64)
Build ID: 90f8dcf33c87b3705e78202e3df5142b201bd805
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: de-DE (de_DE); Calc: 

REM  *****  BASIC  *****
Sub Main
 Dim strURL As String
 strURL = "https://ask.libreoffice.org"
 shell("C:\Program Files\Mozilla Firefox\firefox.exe", 2, strURL, false)
 shell("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", 2, strURL, false)
End Sub

please have a look how the shell() function works:
https://help.libreoffice.org/6.1/en-US/text/sbasic/shared/03130500.html

I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the issue is still present
Comment 3 Roy Kimbrell 2019-02-14 18:46:19 UTC
I looked at the reference. The macro examples I've given are as shown in the reference - at least insofar as I can tell. The numeric arguments are optional but I added a "1" to both example macros with no change in their behaviors.
Comment 4 Oliver Brinzing 2019-02-15 18:09:06 UTC
if you want to pass params, e.g. your url, 
you should use the 3 third param for it:

> Param
> Any string expression that specifies the 
> command line that want to pass.
Comment 5 Roy Kimbrell 2019-02-15 19:21:40 UTC
Created attachment 149320 [details]
Screenshot of Google error
Comment 6 Roy Kimbrell 2019-02-15 19:23:43 UTC
I modified the test macro as follows:

Sub Test_Chrome
    Dim strURL As String
    strURL = "https://ask.libreoffice.org"
    Shell( "/opt/google/chrome/google-chrome ",1,"https://ask.libreoffice.org" )
End Sub

The URL is the third argument. I've attached the error notification.  This is the same behavior as before.
Comment 7 BogdanB 2019-08-13 17:50:19 UTC
This is working as expected in
Version: 6.3.0.4
Build ID: 057fc023c990d676a43019934386b85b21a9ee99
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ro-RO (ro_RO.UTF-8); UI-Language: en-US
Calc: threaded



Sub Test_Chrome
    Dim strURL As String
    strURL = "https://ask.libreoffice.org"
    Shell( "/opt/google/chrome/google-chrome " + strURL )
End Sub

------------------------------------------------------
Also this is working well

Sub Test_Chrome
    Dim strURL As String
    strURL = "https://ask.libreoffice.org"
    Shell( "/opt/google/chrome/google-chrome ",1,"https://ask.libreoffice.org" )
End Sub
Comment 8 Xisco Faulí 2019-12-26 15:30:40 UTC
hello Roy Kimbrell,
Have you tried Bogdan's solution from comment 7 ?
Comment 9 QA Administrators 2020-06-24 03:41:40 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2020-07-25 04:00:47 UTC
Dear Roy Kimbrell,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp