yonatan-mitmit / onium

Extension injector into Electron apps
MIT License
21 stars 3 forks source link

I get error TypeError: expected str, bytes or os.PathLike object, not tuple #10

Closed OriIdan closed 1 year ago

OriIdan commented 1 year ago

Using Linux (Ubuntu 21.04) Issued the command onium -l /usr/bin/slack Without -l I get error that it did not find valid slack.

yonatan-mitmit commented 1 year ago

Can you try running it with onium -l /usr/lib/slack/slack instead? The /usr/bin/slack seems to be symlink (on debian based systems) to this location.

This might not work, but will give me a bit more details to fully diagnose. The contributor I had with Linux access is no longer working on the project, and I don't have a handy linux machine to test.

OriIdan commented 1 year ago

Still got the same error. I checked that the file exists. What I got is: Traceback (most recent call last): File "/home/ori/.local/bin/onium", line 8, in sys.exit(main()) File "/home/ori/.local/lib/python3.9/site-packages/onium/code.py", line 427, in main app_path, asar_path = find_app_path(args.location, 'Slack') File "/home/ori/.local/lib/python3.9/site-packages/onium/code.py", line 236, in find_app_path return p, os.path.join(path, "resources") File "/usr/lib/python3.9/posixpath.py", line 76, in join a = os.fspath(a) TypeError: expected str, bytes or os.PathLike object, not tuple

Message ID: @.***>

yonatan-mitmit commented 1 year ago

Just pushed a new fix to github, but am unable to test it. Found a bug that should cause it and deployed a fix.

Can you pull this code and let me know the output?

OriIdan commented 1 year ago

Thank you for the fix but it didn't work. The error is similar: onium -l /usr/lib/slack/slack Traceback (most recent call last): File "/usr/local/bin/onium", line 33, in sys.exit(load_entry_point('onium==0.9.1', 'console_scripts', 'onium')()) File "/home/ori/.local/lib/python3.9/site-packages/onium/code.py", line 427, in main app_path, asar_path = find_app_path(args.location, 'Slack') File "/home/ori/.local/lib/python3.9/site-packages/onium/code.py", line 236, in find_app_path return p, os.path.join(path, "resources") File "/usr/lib/python3.9/posixpath.py", line 76, in join a = os.fspath(a) TypeError: expected str, bytes or os.PathLike object, not tuple

On Tue, Aug 8, 2023 at 4:42 PM yonatan-mitmit @.***> wrote:

Can you try running it with onium -l /usr/lib/slack/slack instead? The /usr/bin/slack seems to be symlink (on debian based systems) to this location.

This might not work, but will give me a bit more details to fully diagnose. The contributor I had with Linux access is no longer working on the project, and I don't have a handy linux machine to test.

— Reply to this email directly, view it on GitHub https://github.com/yonatan-mitmit/onium/issues/10#issuecomment-1669645277, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB43QGLPWM6HYSHYCZK2TLXUI65PANCNFSM6AAAAAA3H5XHZE . You are receiving this because you authored the thread.Message ID: @.***>

yonatan-mitmit commented 1 year ago

Thanks! The line numbers show you're using an older version. Did you pull the latest from github (git clone / git pull) or did you run from pypi (pip install...) I haven't uploaded the new version to pypi yet. I'd prefer to do that once we confirm a fix works.

OriIdan commented 1 year ago

I did a git pull and than python setup.py install. Then I ran onium which was on /usr/local/bin I checked that the executable is new. I tried deleting all the old files and now it seems to work. The user names icons were still on the left hand side, but my Hebrew messages were on the right hand side.

I think you can now update pip. I have my employees computers one running Ubuntu 22.04 and one running mac os. How do I run it on those computers? I guess it will be simple once it is updated on pip.

On Tue, Aug 8, 2023 at 9:20 PM yonatan-mitmit @.***> wrote:

Thanks! The line numbers show you're using an older version. Did you pull the latest from github (git clone / git pull) or did you run from pypi (pip install...) I haven't uploaded the new version to pypi yet. I'd prefer to do that once we confirm a fix works.

— Reply to this email directly, view it on GitHub https://github.com/yonatan-mitmit/onium/issues/10#issuecomment-1670091058, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB43QADWPAQT2TGHK4WV2LXUJ7NBANCNFSM6AAAAAA3H5XHZE . You are receiving this because you authored the thread.Message ID: @.***>

yonatan-mitmit commented 1 year ago

Thanks for confirming. Closing this ticket.

On mac, you should run with sudo sudo onium ....