Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run tagUI on MacOS & Windows - csv bug after macOS Catalina upgrade - fixed #597

Closed
jerrymannel opened this issue Oct 24, 2019 · 9 comments
Labels

Comments

@jerrymannel
Copy link

OS: macOS Catalina
Nodejs: v10.13.0
Python: 2.7.16
Java: 1.8.0_172

I tried running the samples by, unzip and run and npm install, both cases i get the following error.

Warning: count(): Parameter must be an array or an object that implements Countable in /Users/jerry/workspace/rpa/tagui/src/tagui_parse.php on line 31
Warning: count(): Parameter must be an array or an object that implements Countable in /Users/jerry/workspace/rpa/tagui/src/tagui_parse.php on line 32
Warning: count(): Parameter must be an array or an object that implements Countable in /Users/jerry/workspace/rpa/tagui/src/tagui_parse.php on line 34
ERROR - automation aborted due to above
@jerrymannel jerrymannel changed the title Unable to run tagUI in MacOS Unable to run tagUI on MacOS Oct 24, 2019
@KoolenDasheppi
Copy link

I'm having the same issue on Catalina. Hopefully there's a fix.

@JackyChuang74
Copy link

same here. encountering error with the file tagui_parse.php (line 31, 32, 34).
PHP Warning: count(): Parameter must be an array or an object that implements Countable in /Users/jacky/tagui/src/tagui_parse.php on line 31
PHP Warning: count(): Parameter must be an array or an object that implements Countable in /Users/jacky/tagui/src/tagui_parse.php on line 32

Warning: count(): Parameter must be an array or an object that implements Countable in /Users/jacky/tagui/src/tagui_parse.php on line 31

Warning: count(): Parameter must be an array or an object that implements Countable in /Users/jacky/tagui/src/tagui_parse.php on line 32
PHP Warning: count(): Parameter must be an array or an object that implements Countable in /Users/jacky/tagui/src/tagui_parse.php on line 34

Warning: count(): Parameter must be an array or an object that implements Countable in /Users/jacky/tagui/src/tagui_parse.php on line 34
ERROR - automation aborted due to above

I was just trying out with my own test script of just one line to go to "http://www.google.com".

Running on:
OS Catalina
Server version: Apache/2.4.41 (Unix) with PHP 7.3

@JackyChuang74
Copy link

ok guys, after doing some research, I realised that the above error is due to PHP7.3 (or rather from v7.2 onwards).

So my work around is to install another older version (7.1 in my case) and it is now working fine.


$ ./tagui samples/1_yahoo

START - automation started - Fri Oct 25 2019 10:40:38 GMT+0800 (+08)
https://ca.yahoo.com - Yahoo

NOTE - this sample may not work for EU users due to website changes for GDPR
EU users may have to modify script to first click on announcement OK button

type search-box as github
show search-box
github
click search-button
wait 6.6
snap page
snap logo
snap page to results.png
snap logo to logo.png
https://duckduckgo.com - DuckDuckGo — Privacy, simplified.
type search_form_input_homepage as The search engine that doesn't track you.
snap page to duckduckgo.png
wait 4.4 seconds

https://duckduckgo.com/ - DuckDuckGo — Privacy, simplified.
FINISH - automation finished - 22.7s

you can refer to this link on how to do multiple php version in Catalina.
https://getgrav.org/blog/macos-catalina-apache-multiple-php-versions

@kensoh
Copy link
Member

kensoh commented Oct 25, 2019

Thanks for raising this! I can replicate, and confirm that this issue happens after macOS applies the update to a new release to Catalina.

Thanks @JackyChuang74! Let me see if I can change something to fix this, so users do not need to do their own PHP installation to use TagUI.

Tebel:samples kensoh$ tagui 1_yahoo chrome

Warning: count(): Parameter must be an array or an object that implements Countable in /Users/kensoh/Cloud Drive/Marketing/Website/api/tagui/src/tagui_parse.php on line 37

Warning: count(): Parameter must be an array or an object that implements Countable in /Users/kensoh/Cloud Drive/Marketing/Website/api/tagui/src/tagui_parse.php on line 38

Warning: count(): Parameter must be an array or an object that implements Countable in /Users/kensoh/Cloud Drive/Marketing/Website/api/tagui/src/tagui_parse.php on line 40
ERROR - automation aborted due to above

@kensoh kensoh added the bug label Oct 25, 2019
@kensoh kensoh changed the title Unable to run tagUI on MacOS Unable to run tagUI on MacOS - bug introduced with macOS Catalina Oct 25, 2019
@kensoh
Copy link
Member

kensoh commented Oct 25, 2019

In the interim, remove tagui_local.csv from the samples folder when you are running the samples and the error should disappear.

The issue is with a backward-incompatible change in the PHP count() function, which comes with the upgraded PHP v7.3 in macOS Catalina.

UPDATE - fix implemented is suppressing the warning messages from using count() function. As the usage context is straightforward, there isn't a need to capture potential error messages from calling count() function, which happens during the parsing phase of the automation (converting from human language syntax to JavaScript code).

@kensoh kensoh changed the title Unable to run tagUI on MacOS - bug introduced with macOS Catalina Unable to run tagUI on MacOS - bug with .csv after macOS Catalina upgrade Oct 25, 2019
@jerrymannel
Copy link
Author

+1
I tested by removing tagui_local.csv and it is working.

kensoh added a commit to tebelorg/TagUI that referenced this issue Oct 25, 2019
kensoh added a commit to tebelorg/TagUI that referenced this issue Oct 25, 2019
update TagUI cutting edge version for PHP warning fix

for details, see aisingapore#597
kensoh added a commit that referenced this issue Oct 25, 2019
@kensoh
Copy link
Member

kensoh commented Oct 25, 2019

Fix implemented in TagUI cutting edge release (v5.9). To use it, follow the steps in setup section for overwriting existing packaged installation with the cutting edge release codebase -

https://github.com/kelaberetiv/TagUI#set-up

@kensoh kensoh changed the title Unable to run tagUI on MacOS - bug with .csv after macOS Catalina upgrade Unable to run tagUI on MacOS - bug with .csv after macOS Catalina upgrade - fixed Dec 1, 2019
@kensoh kensoh changed the title Unable to run tagUI on MacOS - bug with .csv after macOS Catalina upgrade - fixed Unable to run tagUI on MacOS - csv bug after macOS Catalina upgrade - fixed Dec 1, 2019
@kensoh kensoh closed this as completed Dec 2, 2019
@kensoh kensoh changed the title Unable to run tagUI on MacOS - csv bug after macOS Catalina upgrade - fixed Unable to run tagUI on MacOS & Windows - csv bug after macOS Catalina upgrade - fixed Dec 18, 2019
@kensoh
Copy link
Member

kensoh commented Dec 18, 2019

This issue impacts Windows users as well, updated issue title so that it's easier to search by users. The solution is using the fix implemented in TagUI cutting edge version. To use it, follow the steps in setup section for overwriting existing packaged installation with the cutting edge release codebase -

https://github.com/kelaberetiv/TagUI#set-up

This fix will be an upcoming packaged release later this month. And in a future planned v7, PHP issues would be removed permanently as the execution engine switches purely to NodeJS. Copying @siowyisheng fyi too!

@kensoh
Copy link
Member

kensoh commented Dec 19, 2019

Implemented today in packaged release with @siowyisheng - fresh downloads of the packaged installations should not have this problem anymore! https://github.com/kelaberetiv/TagUI#set-up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants