Description
What were you trying to do?
Access deep link from browser (Windows) and log test message.
What happened?
Expected behaviour
Test log message is written into laravel.log
What actually happens
The following error is thrown in logs:
[2025-05-24 10:42:04] production.ERROR: Unknown named parameter $workingDirectory {"exception":"[object] (Error(code: 0): Unknown named parameter $workingDirectory at C:\\Users\\Lukas\\Herd\\synergi-hub\\vendor\\nativephp\\electron\\resources\\js\\resources\\app\\vendor\\nativephp\\laravel\\src\\Http\\Controllers\\DispatchEventFromAppController.php:15)
[stacktrace]
#0 C:\\Users\\Lukas\\Herd\\synergi-hub\\vendor\\nativephp\\electron\\resources\\js\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\ControllerDispatcher.php(46): Native\\Laravel\\Http\\Controllers\\DispatchEventFromAppController->__invoke(Object(Illuminate\\Http\\Request))
#1 C:\\Users\\Lukas\\Herd\\synergi-hub\\vendor\\nativephp\\electron\\resources\\js\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php(265): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(Native\\Laravel\\Http\\Controllers\\DispatchEventFromAppController), '__invoke')
#2 C:\\Users\\Lukas\\Herd\\synergi-hub\\vendor\\nativephp\\electron\\resources\\js\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php(211): Illuminate\\Routing\\Route->runController()
#3 C:\\Users\\Lukas\\Herd\\synergi-hub\\vendor\\nativephp\\electron\\resources\\js\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(808): Illuminate\\Routing\\Route->run()
#4 C:\\Users\\Lukas\\Herd\\synergi-hub\\vendor\\nativephp\\electron\\resources\\js\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(169): Illuminate\\Routing\\Router->{closure:Illuminate\\Routing\\Router::runRouteWithinStack():807}(Object(Illuminate\\Http\\Request))
#5 C:\\Users\\Lukas\\Herd\\synergi-hub\\vendor\\nativephp\\electron\\resources\\js\\resources\\app\\vendor\\nativephp\\laravel\\src\\Http\\Middleware\\PreventRegularBrowserAccess.php(25): Illuminate\\Pipeline\\Pipeline->{closure:Illuminate\\Pipeline\\Pipeline::prepareDestination():167}(Object(Illuminate\\Http\\Request))
#6 C:\\Users\\Lukas\\Herd\\synergi-hub\\vendor\\nativephp\\electron\\resources\\js\\resources\\app\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(208): Native\\Laravel\\Http\\Middleware\\PreventRegularBrowserAccess->handle(Object(Illuminate\\Http\\Request), Object(Closure))
...
How to reproduce the bug
- Set up fresh Laravel project (I've used Laravel Vue starter kit but it shouldn't matter)
- Add the following to
.env
:NATIVEPHP_DEEPLINK_SCHEME=myapp
- Add the following route to
web.php
:Route::get('/deep', function () { Log::info('Deep link');})
- Build your app (I did full build and dev build - same issue on both)
- In your native browser call
myapp://deep
- You should have error in your laravel.log
Debug Output
"{ Environment : { PHP : { Version : 8.4.7 , Path : C:\Users\Lukas\.config\herd\bin\php84\php.exe }, Laravel : { Version : 12.14.1 , ConfigCached : false, DebugEnabled : true }, Node : { Version : v24.0.1 , Path : C:\Program Files\nodejs\node.exe }, NPM : { Version : 11.3.0 , Path : C:\Program Files\nodejs\npm\r\nC:\Program Files\nodejs\npm.cmd }, OperatingSystem : WINNT }, NativePHP : { Versions : { nativephp/electron : 1.0.0.0 , nativephp/laravel : 1.0.0.0 , nativephp/php-bin : 1.0.1.0 }, Configuration : { Provider : App\Providers\NativeAppServiceProvider , BuildHooks : { Pre : [ npm run build ], Post : [] }, NotarizationEnabled : false, CustomPHPBinary : false } } }"
Which operating systems have you seen this occur on?
Windows
Notes
Note that I'm doing this on Windows, meanwhile docs for deep links are on Mobile section. Do deep links work on Windows?
Hitting myapp://deep
actually boots up the app as I can see it appear in menu bar (I'm using MenuBar::create()
rather than Window::open()
) and app itself functions as expected.
P.S. NATIVEPHP_DEEPLINK_HOST
from docs is not present in config/nativephp.php
- is this actually used?