Repository: Shopify/shopify-cli

Issue #1828: Error while running "shopify app serve" for php app.
Created: 2021-12-07T11:40:07Z
Whenever i try to serve my app it always return this error and the tunnel is stoped.

Here's the Stack trace:
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/vendor/deps/cli-kit/lib/cli/kit/system.rb:225:in which': undefined method split' for [""]:Array (NoMethodError)
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/vendor/deps/cli-kit/lib/cli/kit/system.rb:219:in resolve_path' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/vendor/deps/cli-kit/lib/cli/kit/system.rb:126:in system'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/lib/shopify_cli/context.rb:437:in system' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/lib/shopify_cli/services/app/serve/php_service.rb:39:in block in call'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/vendor/deps/cli-ui/lib/cli/ui/frame.rb:103:in open' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/lib/shopify_cli/services/app/serve/php_service.rb:32:in call'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/lib/shopify_cli/services/base_service.rb:5:in call' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/lib/shopify_cli/commands/app/serve.rb:31:in call'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/lib/shopify_cli/command/sub_command.rb:14:in call' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/lib/shopify_cli/command.rb:24:in call'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/lib/shopify_cli/core/executor.rb:17:in block (2 levels) in call' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/vendor/deps/cli-kit/lib/cli/kit/executor.rb:37:in block (2 levels) in with_logging'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/vendor/deps/cli-ui/lib/cli/ui/stdout_router.rb:169:in with_id' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/vendor/deps/cli-kit/lib/cli/kit/executor.rb:36:in block in with_logging'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/vendor/deps/cli-ui/lib/cli/ui.rb:176:in log_output_to' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/vendor/deps/cli-kit/lib/cli/kit/executor.rb:35:in with_logging'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/lib/shopify_cli/core/executor.rb:16:in block in call' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/vendor/deps/cli-kit/lib/cli/kit/executor.rb:45:in block (2 levels) in with_traps'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/vendor/deps/cli-kit/lib/cli/kit/executor.rb:51:in twrap' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/vendor/deps/cli-kit/lib/cli/kit/executor.rb:44:in block in with_traps'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/vendor/deps/cli-kit/lib/cli/kit/executor.rb:51:in twrap' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/vendor/deps/cli-kit/lib/cli/kit/executor.rb:43:in with_traps'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/lib/shopify_cli/core/executor.rb:15:in call' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/lib/shopify_cli/core/entry_point.rb:24:in block in call'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/lib/shopify_cli/core/monorail.rb:30:in log' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/lib/shopify_cli/core/entry_point.rb:23:in call'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/bin/shopify:37:in block (2 levels) in <top (required)>' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb:75:in handle_abort'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb:21:in call' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/bin/shopify:36:in block in <top (required)>'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/shopify-cli-2.7.2/bin/shopify:47:in <top (required)>' from C:/Ruby30-x64/bin/shopify:23:in load'
from C:/Ruby30-x64/bin/shopify:23:in `'

Duplicate issue #1783: NoMethodError: undefined method `split' for [""]:Array
Created: 2021-11-22T03:20:26Z
Issue summary
Getting 'An unexpected error occured' when running shopify app serve after ngrok tunnel has been created.
Expected behavior
Server should run without errors.
Actual behavior
Getting 'An unexpected error occured' when running shopify app serve after ngrok tunnel has been created.
Steps to reproduce the problem

Run shopify app serve
Choose whether to update application url or not
Getting error after 'Running server...` shows up in terminal

Stacktrace
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/shopify-cli-2.7.1/vendor/deps/cli-kit/lib/cli/kit/system.rb:225:in which' C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/shopify-cli-2.7.1/vendor/deps/cli-kit/lib/cli/kit/system.rb:219:in resolve_path'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/shopify-cli-2.7.1/vendor/deps/cli-kit/lib/cli/kit/system.rb:126:in system' C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/shopify-cli-2.7.1/lib/shopify_cli/context.rb:428:in system'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/shopify-cli-2.7.1/lib/shopify_cli/services/app/serve/php_service.rb:39:in `block in call'
Specifications

App type: Public
Operating System: Windows 10
Shell: git bash / powershell
Ruby version (ruby -v): 2.7.4p191

Closing comment (2022-01-25T09:19:42Z): Related to #1828