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

Not working on macOS #3

Open
andyylin opened this issue Nov 8, 2024 · 10 comments
Open

Not working on macOS #3

andyylin opened this issue Nov 8, 2024 · 10 comments
Assignees

Comments

@andyylin
Copy link

andyylin commented Nov 8, 2024

I added the extension to Visual Studio Code on mac, but right-clicking Inspect Image Metadata doesn't pop up any new screen with the metadata. Nothing seems to happen.

@Gerkinfeltser
Copy link
Owner

Hey, thanks for reaching out!

I don’t have access to a Mac these days unfortunately. Could you provide me with the console logs please?

To find them you open the Visual Studio Code console (View > Output) and look for any errors or warnings that appear when you try to use the Inspect Image Metadata feature.

Sharing any relevant log messages here could help me diagnose the issue further.

@Gerkinfeltser Gerkinfeltser self-assigned this Nov 12, 2024
@andyylin
Copy link
Author

Nothing shows up under Output, Debug Console, Terminal, etc. Where else can I find logs?

Is it possible that the command isn't even being run?

@Gerkinfeltser
Copy link
Owner

Hi! I just updated & released a new version. It should now be reporting some log information so maybe we can get to the bottom of this issue.

See here for checking the log!

Let me know how it goes!

@andyylin
Copy link
Author

andyylin commented Nov 18, 2024

Thanks! I just installed 0.0.5. But the selection is missing in the Output panel:

image

Also, when I go to Extensions > Image Metadata Inspector > Features > Runtime Status, it shows under Activation that it is "Not yet activated"

image

@Gerkinfeltser
Copy link
Owner

Thanks for reporting this issue, and I appreciate your patience! I’m still pretty new to VS Code extension development, so I really appreciate you flagging this.

Current Status:

The extension currently relies on a Windows-specific binary (exiftool-vendored.exe), which doesn’t work on macOS. Unfortunately, this means the extension won’t function properly on your system right now. I’d like to address macOS compatibility in the future.

Next Steps:

  1. Software Versions:

    • Could you share your macOS and VS Code version? This will help me ensure compatibility when I eventually work on a fix.
  2. Developer Logs:

    • If possible, open Help -> Toggle Developer Tools -> Console in VS Code and check for any logs or errors related to the extension. Sharing those here might help narrow down the issue.
  3. Future Compatibility:

    • There’s a cross-platform tool called exiftool that I’m considering for macOS support. It’s not required now, but I might rely on it in future updates.

I’ll update the extension when I make progress on this. Thanks again for your understanding and for helping me identify this problem!

@andyylin
Copy link
Author

I appreciate you trying to fix this! I do have exiftool on my Mac.

macOS version: Sequoia 15.1 (24B83)
VS Code version:

Version: 1.95.3
Commit: f1a4fb101478ce6ec82fe9627c43efbf9e98c813
Date: 2024-11-13T14:50:04.152Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Darwin arm64 24.1.0

Developer Tools Console output:

Activating extension 'Gerkinfeltser.image-metadata-inspector' failed: Cannot find module 'exiftool-vendored.pl'
Require stack:
- /Users/andylin/.vscode/extensions/gerkinfeltser.image-metadata-inspector-0.0.5/node_modules/exiftool-vendored/dist/FindExiftool.js
- /Users/andylin/.vscode/extensions/gerkinfeltser.image-metadata-inspector-0.0.5/node_modules/exiftool-vendored/dist/DefaultExifToolOptions.js
- /Users/andylin/.vscode/extensions/gerkinfeltser.image-metadata-inspector-0.0.5/node_modules/exiftool-vendored/dist/ExifTool.js
- /Users/andylin/.vscode/extensions/gerkinfeltser.image-metadata-inspector-0.0.5/out/extension.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js.

Does seem to be related to exiftool-vendored

@Gerkinfeltser
Copy link
Owner

Gerkinfeltser commented Nov 20, 2024

Yeah, it's definitely exiftool-vendored related.
So far, my fixing efforts have not bore fruit.
I'll keep thinking on this!

@smlkdev
Copy link

smlkdev commented Dec 17, 2024

A solution to this problem is right in front of you.

Activating extension 'Gerkinfeltser.image-metadata-inspector' failed: Cannot find module 'exiftool-vendored.pl'

The exiftool-vendored package installs additional dependencies, either exiftool-vendored.exe or exiftool-vendored.pl, depending on the operating system. I’m not sure how the released extension works or what’s inside it, but it appears to install (or reference via package-lock.json) the .exe version, which is incompatible with macOS.

To fix this, all you need to do is run npm install --save exiftool-vendored inside the extension folder. This will ensure that the .pl version of the package is installed, which works correctly on macOS.

You should consider adding this extension to the VSCode extensions library - it’s a nice one!
I’m not sure what’s fully possible with extensions, but extracting a text prompt from metadata would be a cool feature (even if the user has to provide the JSON path to extract from) and then show it above/below image preview :)

Screenshot 2024-12-17 at 17 34 57

@smlkdev
Copy link

smlkdev commented Dec 17, 2024

I was curious what's happening inside .vsix bundle file and read that

The VSIX package format follows the Open Packaging Conventions (OPC) standard that means it can be opened by any tool that can open ZIP files.

so I simply unzipped it and as we can see that only ~.exe version is provided (bundled on maintainer's system).

Screenshot 2024-12-17 at 18 08 27

Some (maybe working) solutions:

@Gerkinfeltser
Copy link
Owner

Hi @smlkdev, thanks so much for poking around & the suggestions! When I originally tried to get the vendor stuff working, I ran into issues getting non-window stuff setup. I'll try to look into the .pl stuff you mention as it is definitely the kind of solution I was hoping for! (I'd really like not to have to include the .exe as it takes up 10 of the 10.x megabytes in the extension!)

Also, I haven't had any time to devote to this lately so I apologize @andyylin for no obvious movement! Unfortunately I probably won't be able to get back to this for a few weeks but hopefully when I can, I can fix this up using @smlkdev's suggestion! (I'll also look into getting this on the marketplace if I can get that working. Thank you for the compliment!)

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

No branches or pull requests

3 participants