Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symlink error on production build initial boot #427

Open
miagg opened this issue Nov 21, 2024 · 5 comments
Open

Symlink error on production build initial boot #427

miagg opened this issue Nov 21, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@miagg
Copy link
Contributor

miagg commented Nov 21, 2024

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

@miagg miagg added the bug Something isn't working label Nov 21, 2024
@miagg miagg changed the title Symlink error on production build boot Symlink error on production build initial boot Nov 21, 2024
@faustbrian
Copy link

Seems to occur both in macOS and Ubuntu builds for me. Same version of macOS as the reporter.

@simonhamp
Copy link
Member

simonhamp commented Dec 3, 2024

What's the value of config('filesystems.links') in your apps?

@miagg
Copy link
Contributor Author

miagg commented Dec 3, 2024

What's the value of config('filesystems.links') in your apps?

It's an associative array with a single item

[
    "/Users/wolfkain/Projects/360/Apps/360presenter/360presenter/public/storage" => "/Users/wolfkain/Projects/360/Apps/360presenter/360presenter/storage/app/public",
]

@jsandfordhughescoop
Copy link

Having the same issue here, has anyone had any luck getting around it?

@simonhamp
Copy link
Member

It shouldn't prevent your app from running. If your app relies on having access to the symlinked files and the symlink really isn't being set up, then I'd love to work with someone to investigate this.

As an aside, this may be something that we have to remove in the future, so it may be best not to rely on symlinked directories at all. Simply place the necessary files directly in the relevant folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants