{"action":"created","issue":{"url":"https://api.github.com/repos/chrome-php/headless-chromium-php/issues/28","repository_url":"https://api.github.com/repos/chrome-php/headless-chromium-php","labels_url":"https://api.github.com/repos/chrome-php/headless-chromium-php/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/chrome-php/headless-chromium-php/issues/28/comments","events_url":"https://api.github.com/repos/chrome-php/headless-chromium-php/issues/28/events","html_url":"https://github.com/chrome-php/headless-chromium-php/issues/28","id":345578466,"node_id":"MDU6SXNzdWUzNDU1Nzg0NjY=","number":28,"title":"Error in symphony","user":{"login":"luxint66","id":14036700,"node_id":"MDQ6VXNlcjE0MDM2NzAw","avatar_url":"https://avatars1.githubusercontent.com/u/14036700?v=4","gravatar_id":"","url":"https://api.github.com/users/luxint66","html_url":"https://github.com/luxint66","followers_url":"https://api.github.com/users/luxint66/followers","following_url":"https://api.github.com/users/luxint66/following{/other_user}","gists_url":"https://api.github.com/users/luxint66/gists{/gist_id}","starred_url":"https://api.github.com/users/luxint66/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luxint66/subscriptions","organizations_url":"https://api.github.com/users/luxint66/orgs","repos_url":"https://api.github.com/users/luxint66/repos","events_url":"https://api.github.com/users/luxint66/events{/privacy}","received_events_url":"https://api.github.com/users/luxint66/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-30T00:52:00Z","updated_at":"2018-07-30T14:06:36Z","closed_at":null,"author_association":"NONE","body":"I'm trying to test your package and am getting the following error when trying to run your example...\r\n\r\n`Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /var/www/html/scripts/browser/vendor/symfony/process/Process.php on line 140`\r\n\r\nThe error seems to be triggered by this line...\r\n\r\n`$browserFactory = new BrowserFactory();`\r\n\r\nI've tracked the error down to...\r\n\r\n`$process = new Process($processString);`\r\n\r\nbut on checking $processString just before the call it has content, so now I'm lost...\r\n\r\n`chrome --remote-debugging-port=0 --disable-background-networking --disable-background-timer-throttling --disable-client-side-phishing-detection --disable-default-apps --disable-extensions --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-translate --metrics-recording-only --no-first-run --safebrowsing-disable-auto-update --enable-automation --password-store=basic --use-mock-keychain --headless --disable-gpu --hide-scrollbars --mute-audio --user-data-dir=/tmp/chromium-php-ndLwqS`\r\n\r\nI've installed google-chrome-stable but I wonder if it's not finding it for some reason?\r\n\r\nI've tried for hours to fix it with no luck. Does anybody have any ideas? I'm a newb when it comes to composer so I'm more than happy to believe I've done something wrong :)\r\n\r\nUPDATE: I noticed I had two versions of PHP installed 7.0 and 7.2, and apache was using 7. I removed 7.2 and updated the one apache uses to 7.2 so hopefully, I only have one version now.\r\n\r\nI managed to move past the last error but now there's a new one...\r\n\r\n`Fatal error: Uncaught RuntimeException: Chrome process stopped before startup completed. Additional info: sh: chrome: command not found in /var/www/html/scripts/browser/vendor/chrome-php/chrome/src/Browser/BrowserProcess.php:353 Stack trace: #0 /var/www/html/scripts/browser/vendor/chrome-php/chrome/src/Utils.php(51): HeadlessChromium\\Browser\\BrowserProcess->HeadlessChromium\\Browser\\{closure}(Object(Symfony\\Component\\Process\\Process)) #1 /var/www/html/scripts/browser/vendor/chrome-php/chrome/src/Browser/BrowserProcess.php(388): HeadlessChromium\\Utils::tryWithTimeout(30000000, Object(Generator)) #2 /var/www/html/scripts/browser/vendor/chrome-php/chrome/src/Browser/BrowserProcess.php(127): HeadlessChromium\\Browser\\BrowserProcess->waitForStartup(Object(Symfony\\Component\\Process\\Process), 30000000) #3 /var/www/html/scripts/browser/vendor/chrome-php/chrome/src/BrowserFactory.php(79): HeadlessChromium\\Browser\\BrowserProcess->start('chrome', Array) #4 /var/www/html/scripts/browser/index.php(14): HeadlessChromium\\BrowserFactory->c in /var/www/html/scripts/browser/vendor/chrome-php/chrome/src/Browser/BrowserProcess.php on line 353`\r\n\r\nI'm sure it's the path not being set up correctly. I'll investigate further.\r\n\r\n----\r\n\r\nWell, I've finally fixed it... sort of, and as expected, it was my fault :( \r\n\r\nThe path to google-chrome isn't found so I added it manually just to test and it worked. Then I got an error that 'foo' couldn't be created, which I guess is a permissions error. I removed that and just had the script echo the page title and it worked as expected.\r\n\r\nNot sure if it's worth leaving this here just in case somebody else has the same issues but I'll leave it up to the thread owner.\r\n\r\nThanks for a great piece of kit. It's going to make my job a LOT easier :)\r\n\r\nLux"},"comment":{"url":"https://api.github.com/repos/chrome-php/headless-chromium-php/issues/comments/408875631","html_url":"https://github.com/chrome-php/headless-chromium-php/issues/28#issuecomment-408875631","issue_url":"https://api.github.com/repos/chrome-php/headless-chromium-php/issues/28","id":408875631,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODg3NTYzMQ==","user":{"login":"gsouf","id":3215399,"node_id":"MDQ6VXNlcjMyMTUzOTk=","avatar_url":"https://avatars0.githubusercontent.com/u/3215399?v=4","gravatar_id":"","url":"https://api.github.com/users/gsouf","html_url":"https://github.com/gsouf","followers_url":"https://api.github.com/users/gsouf/followers","following_url":"https://api.github.com/users/gsouf/following{/other_user}","gists_url":"https://api.github.com/users/gsouf/gists{/gist_id}","starred_url":"https://api.github.com/users/gsouf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsouf/subscriptions","organizations_url":"https://api.github.com/users/gsouf/orgs","repos_url":"https://api.github.com/users/gsouf/repos","events_url":"https://api.github.com/users/gsouf/events{/privacy}","received_events_url":"https://api.github.com/users/gsouf/received_events","type":"User","site_admin":false},"created_at":"2018-07-30T14:06:35Z","updated_at":"2018-07-30T14:06:35Z","author_association":"MEMBER","body":"Hi @luxint66 \r\n\r\nThanks for your time. The first error with symfony is indeed probably related to the PHP version, I'm not sure why though.\r\n\r\nFor the path issue. What occurs when you just type ``chrome`` in your terminal? If you can get it to work then it should work all good in php as well (given you use the same bash environment)."}}
{"actor":{"display_login":"gsouf"}}