Skip to content

Symlink error on production build initial boot #427

Closed
@miagg

Description

@miagg

What were you trying to do?

Run application after building for Mac.

What happened?

Error 500 on front-end.
Similar to #250

This is the actual error from the storage/logs found on Application Support folder.

[2024-11-20 17:30:40] production.ERROR: symlink(): Argument #1 ($target) must be of type string, array given {"exception":"[object] (TypeError(code: 0): symlink(): Argument #1 ($target) must be of type string, array given at /Users/wolfkain/Projects/360/Apps/360presenter/360presenter/dist/mac-arm64/360Presenter.app/Contents/Resources/app.asar.unpacked/resources/app/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:355)
[stacktrace]
#0 /Users/wolfkain/Projects/360/Apps/360presenter/360presenter/dist/mac-arm64/360Presenter.app/Contents/Resources/app.asar.unpacked/resources/app/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(355): symlink(Array, '/Users/wolfkain...')
#1 /Users/wolfkain/Projects/360/Apps/360presenter/360presenter/dist/mac-arm64/360Presenter.app/Contents/Resources/app.asar.unpacked/resources/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/StorageLinkCommand.php(49): Illuminate\\Filesystem\\Filesystem->link(Array, '/Users/wolfkain...')
#2 /Users/wolfkain/Projects/360/Apps/360presenter/360presenter/dist/mac-arm64/360Presenter.app/Contents/Resources/app.asar.unpacked/resources/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Foundation\\Console\\StorageLinkCommand->handle()
#3 /Users/wolfkain/Projects/360/Apps/360presenter/360presenter/dist/mac-arm64/360Presenter.app/Contents/Resources/app.asar.unpacked/resources/app/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#4 /Users/wolfkain/Projects/360/Apps/360presenter/360presenter/dist/mac-arm64/360Presenter.app/Contents/Resources/app.asar.unpacked/resources/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\\Container\\Util::unwrapIfClosure(Object(Closure))
#5 /Users/wolfkain/Projects/360/Apps/360presenter/360presenter/dist/mac-arm64/360Presenter.app/Contents/Resources/app.asar.unpacked/resources/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#6 /Users/wolfkain/Projects/360/Apps/360presenter/360presenter/dist/mac-arm64/360Presenter.app/Contents/Resources/app.asar.unpacked/resources/app/vendor/laravel/framework/src/Illuminate/Container/Container.php(690): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#7 /Users/wolfkain/Projects/360/Apps/360presenter/360presenter/dist/mac-arm64/360Presenter.app/Contents/Resources/app.asar.unpacked/resources/app/vendor/laravel/framework/src/Illuminate/Console/Command.php(213): Illuminate\\Container\\Container->call(Array)
#8 /Users/wolfkain/Projects/360/Apps/360presenter/360presenter/dist/mac-arm64/360Presenter.app/Contents/Resources/app.asar.unpacked/resources/app/vendor/symfony/console/Command/Command.php(279): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#9 /Users/wolfkain/Projects/360/Apps/360presenter/360presenter/dist/mac-arm64/360Presenter.app/Contents/Resources/app.asar.unpacked/resources/app/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#10 /Users/wolfkain/Projects/360/Apps/360presenter/360presenter/dist/mac-arm64/360Presenter.app/Contents/Resources/app.asar.unpacked/resources/app/vendor/symfony/console/Application.php(1047): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#11 /Users/wolfkain/Projects/360/Apps/360presenter/360presenter/dist/mac-arm64/360Presenter.app/Contents/Resources/app.asar.unpacked/resources/app/vendor/symfony/console/Application.php(316): Symfony\\Component\\Console\\Application->doRunCommand(Object(Illuminate\\Foundation\\Console\\StorageLinkCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#12 /Users/wolfkain/Projects/360/Apps/360presenter/360presenter/dist/mac-arm64/360Presenter.app/Contents/Resources/app.asar.unpacked/resources/app/vendor/symfony/console/Application.php(167): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#13 /Users/wolfkain/Projects/360/Apps/360presenter/360presenter/dist/mac-arm64/360Presenter.app/Contents/Resources/app.asar.unpacked/resources/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(197): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#14 /Users/wolfkain/Projects/360/Apps/360presenter/360presenter/dist/mac-arm64/360Presenter.app/Contents/Resources/app.asar.unpacked/resources/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1205): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#15 /Users/wolfkain/Projects/360/Apps/360presenter/360presenter/dist/mac-arm64/360Presenter.app/Contents/Resources/app.asar.unpacked/resources/app/artisan(13): Illuminate\\Foundation\\Application->handleCommand(Object(Symfony\\Component\\Console\\Input\\ArgvInput))
#16 {main}
"} 
[2024-11-20 17:30:40] production.INFO: Broadcasting [Native\Laravel\Events\Windows\WindowMaximized] on channels [nativephp] with payload:
{
    "id": "main",
    "socket": null
}  

How to reproduce the bug

This error is thrown after laravel handles an exception. To reprodruce, throw any exception.

Package Versions

electron: 0.8.7, laravel: 0.6.4, php-bin: 0.5.5

PHP Version

8.3.13

Laravel Version

11.33

Node Version

18.20.5

Which operating systems have you seen this occur on?

macOS

OS version

MacOS Sequoia 15.1.1

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions