juliaup icon indicating copy to clipboard operation
juliaup copied to clipboard

Julia Installer had a problem and crashed!

Open adk-anw opened this issue 1 year ago • 8 comments

Describe the bug Juliainstaller Crash Report

To Reproduce I've tried multiple times, with the sudo command as well, but it fails to install Julia and Juliaup on my system (Mac)! I even deleted the somewhat created .julia and .juliaup folders and tried reinstalling, but that did not work either!

Expected behavior The installer simply crashes! I will also attach a log file generated by the installer with as per my understanding is asking for permissions, but doing sudo did not work and I already have read and write permissions!

Screenshots Screenshot 2024-01-16 at 1 57 07 AM

Desktop (please complete the following information):

  • macOS Sonoma!

Additional context Lastly, installing it with brew works as well as the executable installer, but I'm not sure why I am getting this error and the installer is crashing!

report-0f16cb5d-7d73-473f-a3f0-4973bfeed70c.toml "name" = "Juliainstaller" "operating_system" = "Mac OS 14.0.0 [64-bit]" "crate_version" = "1.12.5" "explanation" = """ Panic occurred in file 'src/operations.rs' at line 794 """ "cause" = """ called Result::unwrap() on an Err value: Failed to open file /Users/mr.anw/.bash_profile.

Caused by: Permission denied (os error 13)""" "method" = "Panic" "backtrace" = """

0: 0x10525ddc0 - core::result::unwrap_failed::h16d42dbc22454d03 1: 0x1050e1cf8 - juliaup::command_config_modifypath::run_command_config_modifypath::h3a52147342705b23 2: 0x104fdfc68 - juliainstaller::main::hcefe810cede6f201 3: 0x104fc984c - std::sys_common::backtrace::__rust_begin_short_backtrace::hf33c18d3a0004e24 4: 0x104fe5294 - _main"""

I will be more than happy to help with more information!

adk-anw avatar Jan 15 '24 20:01 adk-anw

I don't know if it is useful to report it as well, but I believe that I just had the same issue:

"name" = "Juliainstaller"
"operating_system" = "Mac OS 14.2.1 [64-bit]"
"crate_version" = "1.12.5"
"explanation" = """
Panic occurred in file 'src/operations.rs' at line 794
 """
"cause" = """
called `Result::unwrap()` on an `Err` value: Failed to open file /Users/jotas6/.zshrc.

Caused by:
     Permission denied (os error 13)"""
 "method" = "Panic"
 "backtrace" = """
 
    0: 0x100b35dc0 - core::result::unwrap_failed::h16d42dbc22454d03
    1: 0x1009b9cf8 - juliaup::command_config_modifypath::run_command_config_modifypath::h3a52147342705b23
    2: 0x1008b7c68 - juliainstaller::main::hcefe810cede6f201
    3: 0x1008a184c - std::sys_common::backtrace::__rust_begin_short_backtrace::hf33c18d3a0004e24
    4: 0x1008bd294 - _main"""

Looking at the error message, I tried running the installer with sudo (I don't know if that was a good idea), but I got the same error.

jotas6 avatar Jan 24 '24 17:01 jotas6

So in both cases it looks like we don't have the permissions required to edit the shell scripts where add Juliaup to the PATH. We can (and should) obviously catch this and output something more helpful, but at the same time I'm not sure how we can recover from this error, putting things onto the PATH is really crucial for things to work, but if we can't do that, then that is kind of a problem...

If anyone has an idea, that would be great :)

davidanthoff avatar Jan 25 '24 06:01 davidanthoff

Well, first off, by exiting with a proper error and explaining the situation, we already go a great step towards making this better.

And one can go further by also printing some information on how to possibly recover.

Besides informing to "fix the access permissions for those files by doing X" (and explaining how to do that?) one could also provide information about what has to be added to the PATH. And if the ideas in #799 are also implemented, one can also inform what else to do (all of this could of course could be hidden behind an URL with "further information").

fingolfin avatar Jan 26 '24 08:01 fingolfin

A user sent a similar issue to [email protected].

"name" = "Juliainstaller"
"operating_system" = "Mac OS 12.7.3 [64-bit]"
"crate_version" = "1.13.0"
"explanation" = """
Panic occurred in file 'src/operations.rs' at line 794
"""
"cause" = """
called `Result::unwrap()` on an `Err` value: Failed to open file /Users/tobiasmoller/.zshrc.

Caused by:
    Permission denied (os error 13)"""
"method" = "Panic"
"backtrace" = """

   0: 0x103566e75 - core::result::unwrap_failed::h84bbbea2e5d8da9f
   1: 0x10338c3aa - juliaup::command_config_modifypath::run_command_config_modifypath::h2c719f5b86bc68bc
   2: 0x103242eda - juliainstaller::main::h295d4c87b717dded
   3: 0x103227b06 - std::sys_common::backtrace::__rust_begin_short_backtrace::h231d86dd87c6f239
   4: 0x1032283fa - std::rt::lang_start::hdac5ede59eca7310"""

mkitti avatar Jan 29 '24 23:01 mkitti

putting things onto the PATH is really crucial for things to work, but if we can't do that, then that is kind of a problem...

one could also provide information about what has to be added to the PATH

+1 on giving users an option to deal with their PATH manually.

My PATH is managed by Nix and all of my config files are symlinks to files generated by Nix (#875). Even if juliaup was allowed to write into my shell config, manual changes would be deleted next time I update or configure anything in my system.

I don't expect julia(up) developers to support odd setups like mine, but a way to "manually" get instructions on what needs to be done would be great. This is what I hoped the Do you want to add the Julia binaries to your PATH by manipulating various shell startup scripts? · no option would do.

adrhill avatar Mar 25 '24 15:03 adrhill

Hello, I just had the same issue

"name" = "Juliainstaller"
"operating_system" = "Mac OS 14.3.0 [64-bit]"
"crate_version" = "1.14.8"
"explanation" = """
Panic occurred in file 'src/operations.rs' at line 1021
"""
"cause" = """
called `Result::unwrap()` on an `Err` value: Failed to open file /Users/aramisdufour/.bash_profile.

Caused by:
    Permission denied (os error 13)"""
"method" = "Panic"
"backtrace" = """

   0: 0x100b75ab4 - core::result::unwrap_failed::h71a35eff74d84b68
   1: 0x100a27ddc - juliaup::command_config_modifypath::run_command_config_modifypath::hfba9ff76b3bf9106
   2: 0x100935458 - juliainstaller::main::h58826e7c28086c63
   3: 0x100921df0 - std::sys_common::backtrace::__rust_begin_short_backtrace::hc479014f54c9f9ef
   4: 0x100939940 - _main"""

I was attempting to install Julia on a new laptop. Is there anyway to work around the issue ? Thanks !

AramisDuf avatar May 10 '24 01:05 AramisDuf

Hello, I just had the same issue

"name" = "Juliainstaller"
"operating_system" = "Mac OS 14.3.0 [64-bit]"
"crate_version" = "1.14.8"
"explanation" = """
Panic occurred in file 'src/operations.rs' at line 1021
"""
"cause" = """
called `Result::unwrap()` on an `Err` value: Failed to open file /Users/aramisdufour/.bash_profile.

Caused by:
    Permission denied (os error 13)"""
"method" = "Panic"
"backtrace" = """

   0: 0x100b75ab4 - core::result::unwrap_failed::h71a35eff74d84b68
   1: 0x100a27ddc - juliaup::command_config_modifypath::run_command_config_modifypath::hfba9ff76b3bf9106
   2: 0x100935458 - juliainstaller::main::h58826e7c28086c63
   3: 0x100921df0 - std::sys_common::backtrace::__rust_begin_short_backtrace::hc479014f54c9f9ef
   4: 0x100939940 - _main"""

I was attempting to install Julia on a new laptop. Is there anyway to work around the issue ? Thanks !

I got the exact same crash report.

Problem caused due to ~/.bash_profile not being owned by the user attempting to edit the file.

Change ownership of .bash_profile: sudo chown {username} ~/.bash_profile

Then got same error but this time mentioning .zshrc. Again, same solution: sudo chown {username} ~/.zshrc

After this installation was successful.

ardagabi avatar May 19 '24 09:05 ardagabi