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

Spyder fails to launch on MacOS with case-sensitive root volume #23415

Open
10 tasks done
iamaiy opened this issue Jan 5, 2025 · 14 comments
Open
10 tasks done

Spyder fails to launch on MacOS with case-sensitive root volume #23415

iamaiy opened this issue Jan 5, 2025 · 14 comments

Comments

@iamaiy
Copy link

iamaiy commented Jan 5, 2025

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

Spyder crashes on launch with a Mac that has a case-sensitive root volume (APFS)
QT Webengine linkage incorrect

What steps reproduce the problem?

  1. Fresh install of spyder on a case-sensitive root volume in MacOS
  2. run spyder from terminal with --debug-info=verbose

What is the expected output? What do you see instead?

The QT webengine resources are installed at
/Library/spyder-6/envs/spyder-runtime/resources
but the linkage points to
/Library/spyder-6/envs/spyder-runtime/Resources

Paste Traceback/Error Below (if applicable)

Qt WebEngine resources not found at /Library/spyder-6/envs/spyder-runtime/Resources. Trying parent directory...
Qt WebEngine resources not found at /Library/spyder-6/envs/spyder-runtime. Trying application directory...
Qt WebEngine resources not found at /Library/spyder-6/envs/spyder-runtime/bin. Trying fallback directory... The application MAY NOT work.

Versions

  • Spyder version: 6.0.3
  • Operating System name/version: MACOS Sequoia 15.1

Dependencies

PASTE DEPENDENCIES HERE
@ccordoba12
Copy link
Member

Hey @iamaiy, thanks for reporting. We were not aware of this problem, so thanks for bringing it up to our attention. We'll try to fix it in one of our next versions.

@mrclary, could you take a look at this one? Thanks!

@mrclary
Copy link
Contributor

mrclary commented Jan 6, 2025

@iamaiy, I'm looking into your issue right now.

  • Can you please provide the exact command you use to launch Spyder from the command line?
  • It appears that you have used our installer to install Spyder for all users. Can you confirm that a shortcut (Spyder 6.app) was created in your /Applications folder?

@mrclary
Copy link
Contributor

mrclary commented Jan 6, 2025

Also, all Apple partitions are case-sensitive, so this would not cause your issue.
I've just installed Spyder 6.0.3 into the /Library directory using our installer and did not have any issues.

Screenshot 2025-01-06 at 12 07 03 PM

A shortcut appears at /Applications/Spyder 6.app and successfully launches.
To launch from the terminal in debug mode, I recommend for macOS:

SPYDER_DEBUG=2 open -a /Applications/Spyder\ 6.app

@iamaiy
Copy link
Author

iamaiy commented Jan 6, 2025

I confirm that I install it for all users (I have tried it as "only for me", no difference).

If I run the suggested command line it still crashes. If I launch with the shortcut it crashes at "Loading Find"

I run it like this in a terminal from my home directory:
% /Applications/Spyder\ 6.app/Contents/MacOS/spyder-6 --debug-info=verbose
Attached terminal output.
spyder_output.txt

@iamaiy
Copy link
Author

iamaiy commented Jan 6, 2025

It really is the path to QTWebengine.

If I rename
/Library/spyder-6/envs/spyder-runtime/resources
to
/Library/spyder-6/envs/spyder-runtime/Resources

Spyder starts as it should.

Best regards,

@mrclary
Copy link
Contributor

mrclary commented Jan 6, 2025

@iamaiy, perhaps I've misunderstood, but did you format your drive partition to be case-_in_sensitive? All macOS partitions are case-sensitive by default. Your resources directory should be /Library/spyder-6/envs/spyder-runtime/resources; this is what I have and I cannot reproduce the error. Are you running arm64 hardware or x86_64?

I really don't know what could be causing this issue for Qt WebEngine.

Qt WebEngine resources not found at /Library/spyder-6/envs/spyder-runtime/Resources. Trying parent directory...
Qt WebEngine resources not found at /Library/spyder-6/envs/spyder-runtime. Trying application directory...
Qt WebEngine resources not found at /Library/spyder-6/envs/spyder-runtime/bin. Trying fallback directory... The application MAY NOT work.
Path override failed for key base::DIR_QT_LIBRARY_DATA and path '/Users/REDACTED/.Spyder'
[0106/222127.004496:ERROR:icu_util.cc(251)] Couldn't mmap icu data file
/Applications/Spyder 6.app/Contents/MacOS/spyder-6-script: line 3: 58954 Trace/BPT trap: 5       ./python /Library/spyder-6/envs/spyder-runtime/bin/spyder "$@"

@mrclary
Copy link
Contributor

mrclary commented Jan 6, 2025

I tested on my M1 iMac as well and was unable to reproduce the problem.

@mrclary
Copy link
Contributor

mrclary commented Jan 6, 2025

@iamaiy, do you have a DIR_QT_LIBRARY_DATA environment variable set?

@iamaiy
Copy link
Author

iamaiy commented Jan 7, 2025

@mrclary, I don't think I have a environment variable set, unless that gets done by the installer?
I'm running on x86_64

In my OSX disk utility, the APFS volume is stated to be case-sensitive, encrypted (encryption should not matter), like this screenshot:
https://community.adobe.com/t5/image/serverpage/image-id/38995iD772388D6971F64A/image-size/original/is-moderation-mode/true?v=v2&px=-1

The screenshot is from this forum thread:
https://community.adobe.com/t5/download-install-discussions/my-macos-apfs-encrypted-case-sensitive-won-t-work-with-adobe-products-any-alternatives/m-p/10819614

so it seems even the big boys (Adobe in this case) aren't immune to this issue

Best regards,

@mrclary
Copy link
Contributor

mrclary commented Jan 7, 2025

@iamaiy, okay, I see. I must not understand "case-sensitive" then. My computer only shows "Encrypted", not "Case-sensitive, Encrypted". Unfortunately, I don't have a convenient way to test this use case. This appears to be an issue that only https://github.com/qt or https://github.com/qt/qtwebengine can resolve. Fortunately, for now, it seems that you have a work-around by changing the resources to Resources.

@ccordoba12
Copy link
Member

@mrclary, what if we add to the installer (in the post install script) a symlink from

spyder-6/envs/spyder-runtime/resources

to

spyder-6/envs/spyder-runtime/Resources

?

I think that should solve the problem.

@mrclary
Copy link
Contributor

mrclary commented Jan 9, 2025

@mrclary, what if we add to the installer (in the post install script) a symlink

@ccordoba12, this may work.

@iamaiy, could you test this?
First restore the original directory name to /Library/spyder-6/envs/spyder-runtime/resources.
Then create a symbolic link

ln -s /Library/spyder-6/envs/spyder-runtime/resources /Library/spyder-6/envs/spyder-runtime/Resources

Alternatively, we could just rename the directory to Resources in our post-install script. This appears to work on my (case-insensitive) machine.

@iamaiy
Copy link
Author

iamaiy commented Jan 9, 2025

@mrclary @ccordoba12

Yeah, I tried symlinking, it works.. buuuut..
It seems a hacky way to patch it, personally i'd find the original reference with the capitalized "Resources" and make that lowercase, job done..
On the post-install script way of doing it, what would happen on a "regular" case-insensitve system when you try symlinking to the "same" directory?

@mrclary
Copy link
Contributor

mrclary commented Jan 9, 2025

Yeah, I tried symlinking, it works.. buuuut.. It seems a hacky way to patch it

This is why I suggested the alternative to rename the directory to Resources, rather than create a symlink.

what would happen on a "regular" case-insensitve system when you try symlinking to the "same" directory?

Symlinking does not cause any issues, either (I did test this). But still recommend just changing the name of the directory. I tested this on my system and there appears to be no side effects. I think this makes sense since the case-insensitive file system is, well, case-insensitive 😄.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants