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

ValueError: NSInvalidArgumentException - -[OC_PythonURL length]: unrecognized selector sent to instance 0x60000078d0e0 #2185

Closed
robigan opened this issue Mar 26, 2024 · 13 comments
Assignees
Milestone

Comments

@robigan
Copy link

robigan commented Mar 26, 2024

Please complete the following information:

  • Version: b9f22f0
  • Game Version: Odyssey
  • OS: MacOS 14.4.1
  • OS Locale: English
  • If applicable: Firefox
  • Please attach BOTH log files, by dragging and dropping them into this input:
    EDMarketConnector-debug.log

Describe the bug
App exits on first boot

To Reproduce
Clone from source (use stable branch), cd into proj, use pipenv to create a venv. Install from requirements.txt. Use pipenv run to run the python file.

Expected behavior
For it to work

Additional context
The output from running the cmd

$ pipenv run python3 EDMarketConnector.py
2024-03-26 21:13:57.283 UTC - WARNING - 9993:8332999360:83681 journal_lock.JournalLock.open_journal_dir_lockfile:73: Couldn't open "/Users/robigan/Library/Application Support/Frontier Developments/Elite Dangerous/edmc-journal-lock.txt" for "w+" Aborting duplicate process checks: FileNotFoundError(2, 'No such file or directory')
/Users/robigan/Documents/EDMC/hotkey/darwin.py:55: UninitializedDeallocWarning: leaking an uninitialized object of type NSSound
  self.snd_good = NSSound.alloc().initWithContentsOfFile_byReference_(
Traceback (most recent call last):
  File "/Users/robigan/Documents/EDMC/EDMarketConnector.py", line 427, in <module>
    import prefs
  File "/Users/robigan/Documents/EDMC/prefs.py", line 24, in <module>
    from hotkey import hotkeymgr
  File "/Users/robigan/Documents/EDMC/hotkey/__init__.py", line 95, in <module>
    hotkeymgr = get_hotkeymgr()
                ^^^^^^^^^^^^^^^
  File "/Users/robigan/Documents/EDMC/hotkey/__init__.py", line 81, in get_hotkeymgr
    return MacHotkeyMgr()
           ^^^^^^^^^^^^^^
  File "/Users/robigan/Documents/EDMC/hotkey/darwin.py", line 55, in __init__
    self.snd_good = NSSound.alloc().initWithContentsOfFile_byReference_(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: NSInvalidArgumentException - -[OC_PythonURL length]: unrecognized selector sent to instance 0x60000078d0e0
@robigan robigan added bug unconfirmed An unconfirmed bug labels Mar 26, 2024
@robigan
Copy link
Author

robigan commented Mar 26, 2024

Btw I am using 3.12.2. I am aware that I'm using an unsupported version, but lmk if this has been come across, otherwise I'll test w/ 3.11 tmrw

@Rixxan
Copy link
Contributor

Rixxan commented Mar 26, 2024

Hey there! Thanks for reporting.

As of yet, we do not support Python 3.12. Particularly, some of the way we load plugins breaks in 3.12 (#1462) but that doesn't appear to be the core issue here.

Additionally, I'm not sure how our code will interact with MacOS. I can't promise much help in the way of debugging on my own, as we don't test our code against MacOS (See Supported Platforms) and I don't have a mac environment to test against.

Given that MacOS dropped support for Elite on Mac I think over half a decade ago, I'd be curious to learn what system setup you have/why you've chosen to run EDMC on a Mac? (No judgment, just sort of curious)

Let me know what you end up finding when you test against 3.11 - if issues still persist I'd be happy to see if we can figure out what's going on.

@robigan
Copy link
Author

robigan commented Mar 26, 2024

Hey there! Thanks for reporting.

As of yet, we do not support Python 3.12. Particularly, some of the way we load plugins breaks in 3.12 (#1462) but that doesn't appear to be the core issue here.

Additionally, I'm not sure how our code will interact with MacOS. I can't promise much help in the way of debugging on my own, as we don't test our code against MacOS (See Supported Platforms) and I don't have a mac environment to test against.

I see, that's fine.

Given that MacOS dropped support for Elite on Mac I think over half a decade ago, I'd be curious to learn what system setup you have/why you've chosen to run EDMC on a Mac? (No judgment, just sort of curious)

Let me know what you end up finding when you test against 3.11 - if issues still persist I'd be happy to see if we can figure out what's going on.

Running on a MBP 2021 M1 Pro. I chose macOS cus I've been familiar with the Apple ecosystem and I couldn't be bothered with switching to a full linux laptop setup. Don't get me wrong, I love linux and that's what my desktop runs but the Apple ecosystem is beneficial to me for on the go needs and network administration and software development.

Got it running super smoothly using the Game Porting Toolkit by Apple which has some pretty good translation from DirectX 11 and 12 into Metal. Using crossover with ESync and D3DMetal enabled, but I plan to compile CrossOver myself cus I'm broke, and I don't want to pay for crossover. I bought the game on Elite Dangerous so I'm using Heroic launcher to launch ED with Epic Games authorization, and I'm using the Min ED Launcher to bypass the need for C# (Mono/.Net) installation. All in all it is running fine
image

@robigan
Copy link
Author

robigan commented Mar 26, 2024

Also that ARM technology lets me run Elite Dangerous while keeping my laptop at a cool 45C if I manually spin up the fans at max it is crazy.

@Rixxan
Copy link
Contributor

Rixxan commented Mar 27, 2024 via email

@Rixxan
Copy link
Contributor

Rixxan commented Mar 27, 2024 via email

@robigan
Copy link
Author

robigan commented Mar 27, 2024

Tried with Python 3.11, still getting the same issue...
image

I'll try with EXEs now

@robigan
Copy link
Author

robigan commented Mar 27, 2024

Also, I'd check your journal mapping. Check this first line: 2024-03-26 21:13:57.283 UTC - WARNING - 9993:8332999360:83681 journal_lock.JournalLock.open_journal_dir_lockfile:73: Couldn't open "/Users/robigan/Library/Application Support/Frontier Developments/Elite Dangerous/edmc-journal-lock.txt" for "w+" Aborting duplicate process checks: FileNotFoundError(2, 'No such file or directory') On Wed, Mar 27, 2024 at 6:52 AM David Sangrey @.> wrote:

Interesting! I'm glad to see you've found something that works well. Have you also tried running the distributed EXE's via WINE or other tools like that? (Just because I don't know if future versions will continue to include the MacOS code, simply because nobody on the team currently knows how to maintain that code or how future updates might break things) Regarding the issue at hand, I found some resources that might point us in the right direction. python-poetry/poetry#7060 seems similar to the error you were reporting, but in that case it was referred to python-poetry/poetry#5596 where it was determined that the Poetry project wasn't the issue - an issue with the Python on MacOS issue was found. Some instances have said a clean/fresh virtualenv helped. Others had a core issue with their Python install. I'd recommend checking if a clean/fresh install of the latest Python 3.11 fixes things. If not, let me know and we'll give something else a shot :) On Tue, Mar 26, 2024 at 7:12 PM robigan @.
> wrote: > Also that ARM technology lets me run Elite Dangerous while keeping my > laptop at a cool 45C if I manually spin up the fans at max it is crazy. > > — > Reply to this email directly, view it on GitHub > < #2185 (comment)>, > or unsubscribe > < https://github.com/notifications/unsubscribe-auth/AGI6A2C7IF7KIPLOF2VSGSDY2HXDLAVCNFSM6AAAAABFJXAALOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRRGYZDAMJQGU> > . > You are receiving this because you commented.Message ID: > @.> > — Reply to this email directly, view it on GitHub <#2185 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGI6A2CWQNDGUX5SMD7BMULY2KQHPAVCNFSM6AAAAABFJXAALOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRSGQ3DIOBVGQ . You are receiving this because you are subscribed to this thread.Message ID: @.>

Haven't been able to setup journal mapping cus it won't load the GUI, I'll try manually editing the configuration files but yes it does make sense for it to be incorrect as ED is installed using wine

@robigan
Copy link
Author

robigan commented Mar 27, 2024

Regarding the issue at hand, I found some resources that might point us in the right direction. python-poetry/poetry#7060 seems similar to the error you were reporting, but in that case it was referred to python-poetry/poetry#5596 where it was determined that the Poetry project wasn't the issue - an issue with the Python on MacOS issue was found. Some instances have said a clean/fresh virtualenv helped. Others had a core issue with their Python install. I'd recommend checking if a clean/fresh install of the latest Python 3.11 fixes things. If not, let me know and we'll give something else a shot :)

And to switch to another python version, pipenv had to delete and recreate the virtual env so I tried that and pyenv just built the latest 3.11. Although, according to this website https://realpython.com/intro-to-pyenv/ you need to install openssl readline sqlite3 xz zlib and I got warnings being recommended to use homebrew's version. I wonder if they've got anything to do but I don't think an ObjC issue has got to do with those dependencies.

@robigan
Copy link
Author

robigan commented Mar 27, 2024

Tried with Python 3.11, still getting the same issue... image

I'll try with EXEs now

Ok got it to work with the EXEs, it seems to be running flawlessly but I haven't fired up ED yet. Lyk of anymore bugs.

Having said this, maybe it's time to deprecate macOS cus I doubt anyone will get native macOS working without FDev using the Game Porting Toolkit themselves

@Rixxan
Copy link
Contributor

Rixxan commented Mar 27, 2024

Glad to hear it's working!

Given it sounds like this is an underlying change to the NSlibrary and I have no (legal) way to really test it, we're going to continue with the deprecation of Darwin-based platforms (See: #2186)

If you do have any issues with running under WINE, please let me know and I'd be happy to keep taking a look!

@Rixxan
Copy link
Contributor

Rixxan commented Apr 16, 2024

Closing in favor of #2186 as it sounds like everything is working. Yay!

@Rixxan Rixxan closed this as completed Apr 16, 2024
@Rixxan Rixxan added this to the 5.11.0 milestone Apr 16, 2024
@Rixxan Rixxan self-assigned this Apr 16, 2024
@Rixxan Rixxan added won't fix OS Issue and removed unconfirmed An unconfirmed bug labels Apr 16, 2024
@robigan
Copy link
Author

robigan commented May 17, 2024

Closing in favor of #2186 as it sounds like everything is working. Yay!

Everything is still working very well

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

2 participants