NativePHP / laravel

Laravel wrapper for the NativePHP framework
https://nativephp.com
MIT License
2.94k stars 153 forks source link

`php artisan native:serve` hangs (Windows 11) #301

Open Stridesdata opened 1 month ago

Stridesdata commented 1 month ago

What were you trying to do?

I have an existing web app Laravel 10 Livewire 2.5 php 8.1 windows 11

I installed, and when I run the server command I get stuck indefinitely in

Starting NativePHP app

Running the dev script with npm...

Fetching latest dependencies…

What happened?

The native server was meant to run

How to reproduce the bug

It might be only specific to me

Package Versions

0.6.3

PHP Version

8.1.8

Laravel Version

10.48.0

Node Version

20.11.1

Which operating systems have you seen this occur on?

Windows

OS version

win 11 (22H2)

Notes

Can we get it to work?

NawrasBukhari commented 1 month ago

This bug is puzzling. It was fine yesterday in the same setup you have. But as soon as I ran "php artisan native:build", it stopped working. Strangely, the build works perfectly, but in development, it doesn't open at all!

it's stuck on this part

Starting NativePHP dev server…

Fetching latest dependencies…

Installing NPM dependencies (This may take a while)...

Installing NPM dependencies using the npm package manager...

Fetching latest dependencies…

Starting NativePHP app

Running the dev script with npm...

Fetching latest dependencies…

and the error log has the following only which exists also yesterday [previous exception] [object] (PDOException(code: HY000): SQLSTATE[HY000]: General error: 1 no such table: jobs at E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Database\Connection.php:423) [stacktrace]

0 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Database\Connection.php(423): PDO->prepare('select * from \"...')

1 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Database\Connection.php(816): Illuminate\Database\Connection->Illuminate\Database\{closure}('select * from \"...', Array)

2 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Database\Connection.php(783): Illuminate\Database\Connection->runQueryCallback('select * from \"...', Array, Object(Closure))

3 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Database\Connection.php(431): Illuminate\Database\Connection->run('select * from \"...', Array, Object(Closure))

4 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Database\Query\Builder.php(2872): Illuminate\Database\Connection->select('select * from \"...', Array, false)

5 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Database\Query\Builder.php(2860): Illuminate\Database\Query\Builder->runSelect()

6 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Database\Query\Builder.php(3414): Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()

7 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Database\Query\Builder.php(2861): Illuminate\Database\Query\Builder->onceWithColumns(Array, Object(Closure))

8 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Database\Concerns\BuildsQueries.php(333): Illuminate\Database\Query\Builder->get(Array)

9 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Queue\DatabaseQueue.php(246): Illuminate\Database\Query\Builder->first()

10 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Queue\DatabaseQueue.php(224): Illuminate\Queue\DatabaseQueue->getNextAvailableJob('default')

11 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Database\Concerns\ManagesTransactions.php(30): Illuminate\Queue\DatabaseQueue->Illuminate\Queue\{closure}(Object(Illuminate\Database\SQLiteConnection))

12 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Queue\DatabaseQueue.php(227): Illuminate\Database\Connection->transaction(Object(Closure))

13 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Queue\Worker.php(349): Illuminate\Queue\DatabaseQueue->pop('default')

14 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Queue\Worker.php(363): Illuminate\Queue\Worker->Illuminate\Queue\{closure}('default')

15 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Queue\Worker.php(163): Illuminate\Queue\Worker->getNextJob(Object(Illuminate\Queue\DatabaseQueue), 'default')

16 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Queue\Console\WorkCommand.php(138): Illuminate\Queue\Worker->daemon('database', 'default', Object(Illuminate\Queue\WorkerOptions))

17 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Queue\Console\WorkCommand.php(121): Illuminate\Queue\Console\WorkCommand->runWorker('database', 'default')

18 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(36): Illuminate\Queue\Console\WorkCommand->handle()

19 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Container\Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()

20 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))

21 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))

22 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Container\Container.php(662): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)

23 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Console\Command.php(211): Illuminate\Container\Container->call(Array)

24 E:\secondNativePHP\vendor\symfony\console\Command\Command.php(326): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))

25 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Console\Command.php(181): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))

26 E:\secondNativePHP\vendor\symfony\console\Application.php(1096): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

27 E:\secondNativePHP\vendor\symfony\console\Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

28 E:\secondNativePHP\vendor\symfony\console\Application.php(175): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

29 E:\secondNativePHP\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(201): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

30 E:\secondNativePHP\artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

31 {main}

"}

avazquez-bit commented 1 month ago

It seems to be related with #300, the message is the same, but mine appears in dev console

simonhamp commented 1 month ago

@Stridesdata are you running the command from Command Prompt or PowerShell?

Are you running directly on Windows and not via some virtualised environment like a Docker container or WSL2?

Please try running commands with the -vvv flag to increase the output verbosity level.

simonhamp commented 1 month ago

@NawrasBukhari I believe your issue is related to #300 as @avazquez-bit says. Please can you pick up your conversation there?

faridmcdato12345 commented 1 month ago

I solve this by checking the laravel.log and fixing those error that occurs their.